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

2021-06-07 Thread Miklos Vajna (via logerrit)
 sw/source/uibase/utlui/uitool.cxx |   35 ---
 1 file changed, 32 insertions(+), 3 deletions(-)

New commits:
commit 46cc1c79485f81f2e657c226de44d68cec752e6f
Author: Miklos Vajna 
AuthorDate: Mon Jun 7 21:18:46 2021 +0200
Commit: Miklos Vajna 
CommitDate: Tue Jun 8 08:44:07 2021 +0200

tdf#141805 sw: hide rtl gutter UI for ODF documents

ODF doesn't track RTLness of the gutter explicitly, it infers this
setting from the writing direction. This means that in case the UI is
used to set it explicitly to a custom value, it'll be lost after
export + import.

Fix the problem by hiding the widget in the ODF case, so it doesn't
confuse users; it's still visible for Word formats which store this
explicitly.

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

diff --git a/sw/source/uibase/utlui/uitool.cxx 
b/sw/source/uibase/utlui/uitool.cxx
index b971dc95bb2c..7f6432dbbf1d 100644
--- a/sw/source/uibase/utlui/uitool.cxx
+++ b/sw/source/uibase/utlui/uitool.cxx
@@ -43,6 +43,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -282,7 +284,8 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& 
rPageDesc )
 {
 rMaster.SetFormatAttr(SfxBoolItem(RES_BACKGROUND_FULL_SIZE, 
bValue));
 }
-if (pGrabBag->GetGrabBag().find("RtlGutter")->second >>= bValue)
+auto it = pGrabBag->GetGrabBag().find("RtlGutter");
+if (it != pGrabBag->GetGrabBag().end() && (it->second >>= bValue))
 {
 rMaster.SetFormatAttr(SfxBoolItem(RES_RTL_GUTTER, bValue));
 }
@@ -425,6 +428,27 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, 
SwPageDesc& rPageDesc )
 }
 }
 
+namespace
+{
+bool IsOwnFormat(const SwDoc& rDoc)
+{
+const SwDocShell* pDocShell = rDoc.GetDocShell();
+SfxMedium* pMedium = pDocShell->GetMedium();
+if (!pMedium)
+{
+return false;
+}
+
+std::shared_ptr pFilter = pMedium->GetFilter();
+if (!pFilter)
+{
+return false;
+}
+
+return pFilter->IsOwnFormat();
+}
+}
+
 void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet)
 {
 const SwFrameFormat& rMaster = rPageDesc.GetMaster();
@@ -597,8 +621,13 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, 
SfxItemSet& rSet)
 }
 oGrabBag->GetGrabBag()["BackgroundFullSize"] <<=
 
rMaster.GetAttrSet().GetItem(RES_BACKGROUND_FULL_SIZE)->GetValue();
-oGrabBag->GetGrabBag()["RtlGutter"] <<=
-rMaster.GetAttrSet().GetItem(RES_RTL_GUTTER)->GetValue();
+
+if (IsOwnFormat(*rMaster.GetDoc()))
+{
+oGrabBag->GetGrabBag()["RtlGutter"]
+<<= 
rMaster.GetAttrSet().GetItem(RES_RTL_GUTTER)->GetValue();
+}
+
 rSet.Put(*oGrabBag);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-06-07 Thread Dennis Francis (via logerrit)
 sc/qa/unit/tiledrendering/tiledrendering.cxx |  115 ++-
 1 file changed, 114 insertions(+), 1 deletion(-)

New commits:
commit 2881b2fa25bfe1933857738b0b551ebb6c687bdc
Author: Dennis Francis 
AuthorDate: Tue May 25 15:48:39 2021 +0530
Commit: Dennis Francis 
CommitDate: Tue Jun 8 08:08:20 2021 +0200

unit test: lok: edit cursor invalidation message

Conflicts:
sc/qa/unit/tiledrendering/tiledrendering.cxx

Change-Id: I255e3b637329fc1fb41d24e79a770051ee827162
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116428
Reviewed-by: Luboš Luňák 
Reviewed-by: Dennis Francis 
Tested-by: Jenkins CollaboraOffice 
(cherry picked from commit d1a1b8ac3d7eea4b571d8015e31549f39a0b20ed)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116542
Tested-by: Jenkins

diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index 08cc5d724dcd..b646868ce525 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -117,7 +117,7 @@ public:
 void testAutoInputStringBlock();
 void testAutoInputExactMatch();
 void testMoveShapeHandle();
-
+void testEditCursorBounds();
 
 CPPUNIT_TEST_SUITE(ScTiledRenderingTest);
 CPPUNIT_TEST(testRowColumnHeaders);
@@ -169,6 +169,7 @@ public:
 CPPUNIT_TEST(testAutoInputStringBlock);
 CPPUNIT_TEST(testAutoInputExactMatch);
 CPPUNIT_TEST(testMoveShapeHandle);
+CPPUNIT_TEST(testEditCursorBounds);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -426,6 +427,58 @@ void ScTiledRenderingTest::testEmptyColumnSelection()
 CPPUNIT_ASSERT_EQUAL(OString(), 
apitest::helper::transferable::getTextSelection(pModelObj->getSelection(), 
"text/plain;charset=utf-8"));
 }
 
+struct EditCursorMessage final {
+tools::Rectangle m_aRelRect;
+Point m_aRefPoint;
+
+void clear()
+{
+m_aRelRect.SetEmpty();
+m_aRefPoint = Point(-1, -1);
+}
+
+bool empty()
+{
+return m_aRelRect.IsEmpty() &&
+m_aRefPoint.X() == -1 &&
+m_aRefPoint.Y() == -1;
+}
+
+void parseMessage(const char* pMessage)
+{
+clear();
+if (!pMessage || !comphelper::LibreOfficeKit::isCompatFlagSet(
+comphelper::LibreOfficeKit::Compat::scPrintTwipsMsgs) ||
+!comphelper::LibreOfficeKit::isViewIdForVisCursorInvalidation())
+return;
+
+std::stringstream aStream(pMessage);
+boost::property_tree::ptree aTree;
+boost::property_tree::read_json(aStream, aTree);
+std::string aVal = 
aTree.get_child("refpoint").get_value();
+
+uno::Sequence aSeq = 
comphelper::string::convertCommaSeparated(OUString::createFromAscii(aVal.c_str()));
+CPPUNIT_ASSERT_EQUAL(2, aSeq.getLength());
+m_aRefPoint.setX(aSeq[0].toInt32());
+m_aRefPoint.setY(aSeq[1].toInt32());
+
+aVal = aTree.get_child("relrect").get_value();
+aSeq = 
comphelper::string::convertCommaSeparated(OUString::createFromAscii(aVal.c_str()));
+CPPUNIT_ASSERT_EQUAL(4, aSeq.getLength());
+m_aRelRect.setX(aSeq[0].toInt32());
+m_aRelRect.setY(aSeq[1].toInt32());
+m_aRelRect.setWidth(aSeq[2].toInt32());
+m_aRelRect.setHeight(aSeq[3].toInt32());
+}
+
+tools::Rectangle getBounds()
+{
+tools::Rectangle aBounds = m_aRelRect;
+aBounds.Move(m_aRefPoint.X(), m_aRefPoint.Y());
+return aBounds;
+}
+};
+
 /// A view callback tracks callbacks invoked on one specific view.
 class ViewCallback final
 {
@@ -440,10 +493,12 @@ public:
 bool m_bFullInvalidateTiles;
 bool m_bInvalidateTiles;
 std::vector m_aInvalidations;
+tools::Rectangle m_aCellCursorBounds;
 std::vector m_aInvalidationsParts;
 bool m_bViewLock;
 OString m_sCellFormula;
 boost::property_tree::ptree m_aCommentCallbackResult;
+EditCursorMessage m_aInvalidateCursorResult;
 OString m_sInvalidateHeader;
 OString m_sInvalidateSheetGeometry;
 OString m_ShapeSelection;
@@ -486,6 +541,14 @@ public:
 case LOK_CALLBACK_CELL_CURSOR:
 {
 m_bOwnCursorInvalidated = true;
+uno::Sequence aSeq = 
comphelper::string::convertCommaSeparated(OUString::createFromAscii(pPayload));
+m_aCellCursorBounds = tools::Rectangle();
+if (aSeq.getLength() == 6) {
+m_aCellCursorBounds.setX(aSeq[0].toInt32());
+m_aCellCursorBounds.setY(aSeq[1].toInt32());
+m_aCellCursorBounds.setWidth(aSeq[2].toInt32());
+m_aCellCursorBounds.setHeight(aSeq[3].toInt32());
+}
 }
 break;
 case LOK_CALLBACK_CELL_VIEW_CURSOR:
@@ -562,6 +625,11 @@ public:
 {
 m_sInvalidateSheetGeometry = pPayload;
 }
+break;
+case LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR:
+   

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

2021-06-07 Thread Dennis Francis (via logerrit)
 editeng/source/editeng/impedit.cxx |9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit c844aa36cc4268f182ec4f6627fb2b8f4cce7b15
Author: Dennis Francis 
AuthorDate: Tue May 25 10:53:22 2021 +0530
Commit: Dennis Francis 
CommitDate: Tue Jun 8 08:07:54 2021 +0200

sc: lok: apply the previous fix for selections too

Conflicts:
editeng/source/editeng/impedit.cxx

Change-Id: Ic1f6c1642da71e0ef8c23831786ae405dda21133
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116427
Reviewed-by: Luboš Luňák 
Reviewed-by: Dennis Francis 
Tested-by: Jenkins CollaboraOffice 
(cherry picked from commit c5e249877b93e9d11788ec04fffee1dcb142a0e5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116541
Tested-by: Jenkins

diff --git a/editeng/source/editeng/impedit.cxx 
b/editeng/source/editeng/impedit.cxx
index 919873893575..653072083f66 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -660,9 +660,12 @@ void ImpEditView::ImplDrawHighlightRect( OutputDevice& 
rTarget, const Point& rDo
 {
 MapUnit eDevUnit = rTarget.GetMapMode().GetMapUnit();
 tools::Rectangle aSelRect(rDocPosTopLeft, rDocPosBottomRight);
-aSelRect = mpLOKSpecialPositioning->GetWindowPos(aSelRect, eDevUnit);
-const Point aRefPoint = mpLOKSpecialPositioning->GetRefPoint();
-aSelRect.Move(-aRefPoint.X(), -aRefPoint.Y());
+aSelRect = GetWindowPos(aSelRect);
+Point aRefPointLogical = GetOutputArea().TopLeft();
+// Get the relative coordinates w.r.t refpoint in display units.
+aSelRect.Move(-aRefPointLogical.X(), -aRefPointLogical.Y());
+// Convert from display unit to twips.
+aSelRect = OutputDevice::LogicToLogic(aSelRect, MapMode(eDevUnit), 
MapMode(MapUnit::MapTwip));
 
 tools::Polygon aTmpPoly(4);
 aTmpPoly[0] = aSelRect.TopLeft();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-06-07 Thread Dennis Francis (via logerrit)
 editeng/source/editeng/impedit.cxx |   12 
 1 file changed, 8 insertions(+), 4 deletions(-)

New commits:
commit eed212b1cc03b8f131e5c28730b0e6a55c3e22af
Author: Dennis Francis 
AuthorDate: Tue May 25 10:35:22 2021 +0530
Commit: Dennis Francis 
CommitDate: Tue Jun 8 08:07:27 2021 +0200

sc: lokit: fix wrong edit cursor coordinates for numeric cells

The cursor coordinates returned by editengine implementation is computed
with respect to document-visible-area in "display" hmm and not "print"
hmm. For numeric cells, the visible top-left is always non-zero, hence
triggering this incorrect "refpoint" subtraction to compute "relrect".

The fix is to calculate the correct "relrect" by subtracting the display
hmm version of "refpoint" from the edit cursor rectange and then convert
to twips.

Change-Id: I4b663edcb1f74e1bdcc300788769d580fcfe7e17
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116426
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Luboš Luňák 
Reviewed-by: Dennis Francis 
(cherry picked from commit 77704022556bb97a64ef47666230a2c0232d45d3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116540
Tested-by: Jenkins

diff --git a/editeng/source/editeng/impedit.cxx 
b/editeng/source/editeng/impedit.cxx
index bf7ac05e868e..919873893575 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -1318,11 +1318,15 @@ void ImpEditView::ShowCursor( bool bGotoCursor, bool 
bForceVisCursor )
 
 MapUnit eDevUnit = rOutDev.GetMapMode().GetMapUnit();
 tools::Rectangle aCursorRectPureLogical(aEditCursor.TopLeft(), 
GetCursor()->GetSize());
-// Get rectangle in window-coordinates from editeng(doc) 
coordinates.
-aCursorRectPureLogical = 
mpLOKSpecialPositioning->GetWindowPos(aCursorRectPureLogical, eDevUnit);
+// Get rectangle in window-coordinates from editeng(doc) 
coordinates in hmm.
+aCursorRectPureLogical = GetWindowPos(aCursorRectPureLogical);
+Point aRefPointLogical = GetOutputArea().TopLeft();
+// Get the relative coordinates w.r.t refpoint in display hmm.
+aCursorRectPureLogical.Move(-aRefPointLogical.X(), 
-aRefPointLogical.Y());
+// Convert to twips.
+aCursorRectPureLogical = 
OutputDevice::LogicToLogic(aCursorRectPureLogical, MapMode(eDevUnit), 
MapMode(MapUnit::MapTwip));
+// "refpoint" in print twips.
 const Point aRefPoint = mpLOKSpecialPositioning->GetRefPoint();
-// Get the relative coordinates w.r.t rRefPoint.
-aCursorRectPureLogical.Move(-aRefPoint.X(), -aRefPoint.Y());
 aMessageParams.put("relrect", 
aCursorRectPureLogical.toString());
 aMessageParams.put("refpoint", aRefPoint.toString());
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/ooxml-analyze' - bin/compare-ooxml-analyze-results.py

2021-06-07 Thread Gülşah Köse (via logerrit)
 bin/compare-ooxml-analyze-results.py |   87 +++
 1 file changed, 68 insertions(+), 19 deletions(-)

New commits:
commit 4bf4b28b2d6316a34d0966d1109b76162aa0b336
Author: Gülşah Köse 
AuthorDate: Tue Jun 8 08:50:37 2021 +0300
Commit: Gülşah Köse 
CommitDate: Tue Jun 8 08:50:37 2021 +0300

Compare texts

Change-Id: I0aee62ffa79dbf716bb9ec2af2bc06078e1eb566

diff --git a/bin/compare-ooxml-analyze-results.py 
b/bin/compare-ooxml-analyze-results.py
index d0d89fc30a31..fdd4fa8a0243 100644
--- a/bin/compare-ooxml-analyze-results.py
+++ b/bin/compare-ooxml-analyze-results.py
@@ -1,6 +1,6 @@
 #!/usr/bin/python
 
-import sys, getopt, os, pprint, ast
+import sys, getopt, os, pprint, ast, difflib
 
 original_results_dir = ''
 saved_results_dir = ''
@@ -24,13 +24,18 @@ def main(argv):
  global saved_results_dir
  saved_results_dir = arg
 
-   # takes file list produced by ooxml-analyze.py tool.
-   original_result_files = get_list_of_files(original_results_dir)
-   saved_result_files = get_list_of_files(saved_results_dir)
+   # takes result file list produced by ooxml-analyze.py tool. 
.result
+   original_result_files = get_list_of_result_files(original_results_dir)
+   saved_result_files = get_list_of_result_files(saved_results_dir)
+   compare_results(original_result_files, saved_result_files)
 
-   compare(original_result_files, saved_result_files)
+   # takes concanated texts file list produced by ooxml-analyze.py tool. 
.text
+   original_text_files = get_list_of_text_files(original_results_dir)
+   saved_text_files = get_list_of_text_files(saved_results_dir)
+   compare_texts(original_text_files, saved_text_files)
 
-def get_list_of_files(directory_name):
+# collects .result files
+def get_list_of_result_files(directory_name):
 
list_of_file = os.listdir(directory_name)
all_files = list()
@@ -38,16 +43,32 @@ def get_list_of_files(directory_name):
for filename in list_of_file:
   full_path = os.path.join(directory_name, filename)
   if os.path.isdir(full_path):
- all_files = all_files + get_list_of_files(full_path)
+ all_files = all_files + get_list_of_result_files(full_path)
   else:
- all_files.append(full_path)
+ if filename.endswith(".result"):
+all_files.append(full_path)
+
+   return all_files
+
+# collecsts .text files
+def get_list_of_text_files(directory_name):
+
+   list_of_file = os.listdir(directory_name)
+   all_files = list()
+
+   for filename in list_of_file:
+  full_path = os.path.join(directory_name, filename)
+  if os.path.isdir(full_path):
+ all_files = all_files + get_list_of_result_files(full_path)
+  else:
+ if filename.endswith(".text"):
+all_files.append(full_path)
 
return all_files
 
 
 # compares the  elements the original results and and after saved results.
-def compare(original_result_files, saved_result_files):
-   ind = 1
+def compare_results(original_result_files, saved_result_files):
for original_filepath in original_result_files:
   saved_filepath = get_corresponding_file(original_filepath)
   if saved_filepath == '':
@@ -57,11 +78,31 @@ def compare(original_result_files, saved_result_files):
   original_result_list = create_list_from_result_file(original_filepath)
   saved_result_list = create_list_from_result_file(saved_filepath)
 
-  check_text_contents(original_result_list, saved_result_list)
+  check_text_contents(original_result_list, saved_result_list, 
original_filepath)
+
+def compare_texts(original_texts_file, saved_texts_file):
+   for original_filepath in original_texts_file:
+  saved_filepath = get_corresponding_file(original_filepath)
+  if saved_filepath == '':
+ print("No result text file after roundtrip for " + original_filepath)
+ continue
+
+  with open(original_filepath) as file_1:
+ original_file_text = file_1.readlines()
+
+  with open(saved_filepath) as file_2:
+ saved_file_text = file_2.readlines()
+
+ # if os.path.exists("./result"):
+ #os.remove("result")
 
+  for line in difflib.unified_diff(original_file_text, saved_file_text, 
fromfile=original_filepath, tofile=saved_filepath, lineterm=''):
+ with open("result", "a") as log_file:
+print(line, file=log_file)
+ log_file.close()
 
-# checks if we missed any text content after saving the file.
-def check_text_contents(original_result_list, saved_result_list):
+# checks if we missed any text content after saving the file. (except a:t, We 
are comparing them with compare_text function)
+def check_text_contents(original_result_list, saved_result_list, 
original_file_path):
 
# detect if we lost or added any text on existing texts of original version.
for line in original_result_list:
@@ -69,6 +110,10 @@ def check_text_contents(original_result_list, 
saved_result_list):
   if not bool(text_dict): # ch

[Libreoffice-commits] core.git: Branch 'feature/ooxml-analyze' - bin/ooxml-analyze.py

2021-06-07 Thread Gülşah Köse (via logerrit)
 bin/ooxml-analyze.py |  103 ---
 1 file changed, 57 insertions(+), 46 deletions(-)

New commits:
commit 7c03a4c092d9cba10ecb22e7f97aaca851259f1f
Author: Gülşah Köse 
AuthorDate: Tue Jun 8 08:43:30 2021 +0300
Commit: Gülşah Köse 
CommitDate: Tue Jun 8 08:43:30 2021 +0300

Improve error handling, exclude None texts

Change-Id: Idedad9c414311d95c355ea70a913f8e0ddf7

diff --git a/bin/ooxml-analyze.py b/bin/ooxml-analyze.py
index a7e2bc2a549f..87acd377c854 100755
--- a/bin/ooxml-analyze.py
+++ b/bin/ooxml-analyze.py
@@ -88,8 +88,11 @@ def extract_files(inputdir, extracted_files_dir):
 filepath = os.path.join(inputdir, filename)
 extracted_file_path = os.path.join(extracted_files_dir, filename)
 
-with ZipFile(filepath) as zipObj:
-zipObj.extractall(extracted_file_path)
+try:
+with ZipFile(filepath) as zipObj:
+zipObj.extractall(extracted_file_path)
+except:
+print("%s is problematic" % filename)
 else:
 continue
 
@@ -126,6 +129,11 @@ def is_file_in_accepted_files(filename):
"ppt/slideMasters" in filename or \
"ppt/theme" in filename or \
"ppt/notesMasters" in filename or \
+   "ppt/notesSlides" in filename or \
+   "ppt/handoutMasters" in filename or \
+   "ppt/tags" in filename or \
+   "pptx/customXml" in filename or \
+   "ppt/diagrams" in filename or \
filename.endswith("docProps/core.xml") or not \
filename.endswith(".xml")):
return False
@@ -149,51 +157,54 @@ def count_elements(extracted_files_dir, result_list, 
concanated_texts_list):
 
 print(xmlfile)
 
-# start to count
-for event, child in etree.iterparse(xmlfile, events=('start', 'end')):
-tag = replace_namespace_with_alias(xmlfile, child.tag)
-tag_idx = get_index_of_tag(tag, result_list)
-
-if event == "start":
-# count tags
-if (tag_idx == -1):
-tmp_list = [{tag: 1},{},{},{}]
-result_list.append(tmp_list)
-else:
-result_list[tag_idx][0][tag] += 1
-
-# count attribute names and values of current tag
-for attr_name, attr_value in child.attrib.items():
-attr_name = replace_namespace_with_alias(xmlfile, 
attr_name)
-if not attr_name in result_list[tag_idx][1].keys():
-result_list[tag_idx][1][attr_name] = 1
+try:
+# start to count
+for event, child in etree.iterparse(xmlfile, events=('start', 
'end')):
+tag = replace_namespace_with_alias(xmlfile, child.tag)
+tag_idx = get_index_of_tag(tag, result_list)
+
+if event == "start":
+# count tags
+if (tag_idx == -1):
+tmp_list = [{tag: 1},{},{},{}]
+result_list.append(tmp_list)
 else:
-result_list[tag_idx][1][attr_name] +=1
-
-if not attr_value in result_list[tag_idx][2].keys():
-result_list[tag_idx][2][attr_value] = 1
-else:
-result_list[tag_idx][2][attr_value] +=1
-
-# concanated text will be resetted in every paragraph begining
-if tag == "a:p":
-concatenated_text = ""
-
-
-if event == "end":
-# Detect seperate texts in paragraph and concanate them.
-if tag == "a:t":
-concatenated_text += str(child.text)
-# End of the paragraph element, add the text as list item.
-if tag == "a:p" and concatenated_text != "":
-concanated_texts_list.append(concatenated_text)
-
-# count text contents except consisted of whitespaces.
-if not (str(child.text) == "None" or 
str(child.text).strip()==""):
-if not child.text in result_list[tag_idx][3].keys():
-result_list[tag_idx][3][child.text] = 1
-else:
-result_list[tag_idx][3][child.text] += 1
+result_list[tag_idx][0][tag] += 1
+
+# count attribute names and values of current tag
+for attr_name, attr_value in child.attrib.items():
+attr_name = replace_namespace_with_alias(xmlfile, 
attr_name)
+if not attr_name in result_list[tag_idx][1].keys():
+result_list[tag_idx][1][attr_name] = 1
+else:
+result_list[tag_idx][1][attr_name] +=1
+
+if not attr_va

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

2021-06-07 Thread Xisco Fauli (via logerrit)
 sc/qa/unit/subsequent_export-test.cxx  |8 ++---
 sc/qa/unit/subsequent_export-test2.cxx |   48 +++--
 sd/qa/unit/SVGExportTests.cxx  |5 ---
 sd/qa/unit/export-tests-ooxml1.cxx |   25 -
 sd/qa/unit/export-tests-ooxml2.cxx |   32 +-
 sd/qa/unit/export-tests.cxx|   26 -
 sd/qa/unit/misc-tests.cxx  |   19 -
 test/source/xmltesttools.cxx   |   17 +++
 8 files changed, 53 insertions(+), 127 deletions(-)

New commits:
commit 2b7bfe009ac35cb5fda9ca14404fea924acb54fa
Author: Xisco Fauli 
AuthorDate: Mon Jun 7 20:50:34 2021 +0200
Commit: Xisco Fauli 
CommitDate: Mon Jun 7 22:57:57 2021 +0200

sd: use registerOOXMLNamespaces and registerODFNamespaces

While at it, fix incorrect r:Relationships with
rels:Relationships
Change-Id: Ia8e6556b0e7d3839e00936626627471a7a276071

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

diff --git a/sc/qa/unit/subsequent_export-test.cxx 
b/sc/qa/unit/subsequent_export-test.cxx
index bb22dbfefe36..ae2784a832e7 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -500,7 +500,7 @@ void ScExportTest::testTdf111876()
 
 xmlDocUniquePtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, 
m_xSFactory, "xl/worksheets/_rels/sheet1.xml.rels", FORMAT_XLSX);
 CPPUNIT_ASSERT(pDoc);
-OUString sTarget = getXPath(pDoc, "/r:Relationships/r:Relationship", 
"Target");
+OUString sTarget = getXPath(pDoc, "/rels:Relationships/rels:Relationship", 
"Target");
 
 // Document is saved to the temporary directory, relative path should be 
different than original one
 CPPUNIT_ASSERT(sTarget != "../xls/bug-fixes.xls");
@@ -3328,8 +3328,8 @@ void ScExportTest::testCustomXml()
 CPPUNIT_ASSERT(pRelsDoc);
 
 // Check there is a relation to itemProps1.xml.
-assertXPath(pRelsDoc, "/r:Relationships/r:Relationship", 1);
-assertXPath(pRelsDoc, "/r:Relationships/r:Relationship[@Id='rId1']", 
"Target", "itemProps1.xml");
+assertXPath(pRelsDoc, "/rels:Relationships/rels:Relationship", 1);
+assertXPath(pRelsDoc, "/rels:Relationships/rels:Relationship[@Id='rId1']", 
"Target", "itemProps1.xml");
 
 std::unique_ptr pStream = 
XPathHelper::parseExportStream(pXPathFile, m_xSFactory, "ddp/ddpfile.xen");
 CPPUNIT_ASSERT(pStream);
@@ -3935,7 +3935,7 @@ void ScExportTest::testHyperlinkXLSX()
 
 xmlDocUniquePtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, 
m_xSFactory, "xl/drawings/_rels/drawing1.xml.rels", FORMAT_XLSX);
 CPPUNIT_ASSERT(pDoc);
-assertXPath(pDoc, "/r:Relationships/r:Relationship", "Target", 
"#Sheet2!A1");
+assertXPath(pDoc, "/rels:Relationships/rels:Relationship", "Target", 
"#Sheet2!A1");
 
 xDocSh->DoClose();
 }
diff --git a/sc/qa/unit/subsequent_export-test2.cxx 
b/sc/qa/unit/subsequent_export-test2.cxx
index a47b9a413996..310d88a60f33 100644
--- a/sc/qa/unit/subsequent_export-test2.cxx
+++ b/sc/qa/unit/subsequent_export-test2.cxx
@@ -1198,9 +1198,11 @@ void ScExportTest2::testTdf115192XLSX()
 xmlDocUniquePtr pDoc = XPathHelper::parseExport2(
 *this, *xDocSh, m_xSFactory, "xl/drawings/_rels/drawing1.xml.rels", 
FORMAT_XLSX);
 CPPUNIT_ASSERT(pDoc);
-assertXPath(pDoc, "/r:Relationships/r:Relationship[@Id='rId1']", 
"TargetMode", "External");
-assertXPathNoAttribute(pDoc, 
"/r:Relationships/r:Relationship[@Id='rId2']", "TargetMode");
-assertXPath(pDoc, "/r:Relationships/r:Relationship[@Id='rId3']", 
"TargetMode", "External");
+assertXPath(pDoc, "/rels:Relationships/rels:Relationship[@Id='rId1']", 
"TargetMode",
+"External");
+assertXPathNoAttribute(pDoc, 
"/rels:Relationships/rels:Relationship[@Id='rId2']", "TargetMode");
+assertXPath(pDoc, "/rels:Relationships/rels:Relationship[@Id='rId3']", 
"TargetMode",
+"External");
 
 xDocSh->DoClose();
 }
@@ -1220,9 +1222,10 @@ void ScExportTest2::testTdf91634XLSX()
 xmlDocUniquePtr pXmlRels
 = XPathHelper::parseExport(pXPathFile, m_xSFactory, 
"xl/drawings/_rels/drawing1.xml.rels");
 CPPUNIT_ASSERT(pXmlRels);
-assertXPath(pXmlRels, "/r:Relationships/r:Relationship[@Id='rId1']", 
"Target",
+assertXPath(pXmlRels, "/rels:Relationships/rels:Relationship[@Id='rId1']", 
"Target",
 "https://www.google.com/";);
-assertXPath(pXmlRels, "/r:Relationships/r:Relationship[@Id='rId1']", 
"TargetMode", "External");
+assertXPath(pXmlRels, "/rels:Relationships/rels:Relationship[@Id='rId1']", 
"TargetMode",
+"External");
 
 xDocSh->DoClose();
 }
@@ -1367,13 +1370,17 @@ void ScExportTest2::testTdf123645XLSX()
 xmlDocUniquePtr pXmlRels
 = XPathHelper::parseExport(pXPathFile, m_xSFactory, 
"xl/drawings/_rels/drawing1.x

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

2021-06-07 Thread Noel Grandin (via logerrit)
 binaryurp/source/reader.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 039180f8255b6356cb89b1777e4e53323541898d
Author: Noel Grandin 
AuthorDate: Mon Jun 7 20:55:51 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Jun 7 22:05:23 2021 +0200

Revert "improve logging message"

This reverts commit 9f0484c2bca8e7ec5e0d83289fae9b474b8598e0.

Reason for revert: this patch was unnecessary, the operator<< for 
css::uno::Exception alreadys logs the message, I got confused

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

diff --git a/binaryurp/source/reader.cxx b/binaryurp/source/reader.cxx
index 902225e1bd54..b11b77ffe658 100644
--- a/binaryurp/source/reader.cxx
+++ b/binaryurp/source/reader.cxx
@@ -120,9 +120,9 @@ void Reader::execute() {
 block.done();
 }
 } catch (const css::uno::Exception & e) {
-SAL_WARN("binaryurp", "caught UNO exception, " << e << " " << 
e.Message);
+SAL_WARN("binaryurp", "caught UNO exception '" << e << '\'');
 } catch (const std::exception & e) {
-SAL_WARN("binaryurp", "caught C++ exception, " << e.what() );
+SAL_WARN("binaryurp", "caught C++ exception '" << e.what() << '\'');
 }
 bridge_->terminate(false);
 bridge_.clear();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-06-07 Thread Caolán McNamara (via logerrit)
 vcl/workben/dxffuzzer.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 01c20a75b388ded73a4f220970cf3c2e95f83dff
Author: Caolán McNamara 
AuthorDate: Mon Jun 7 20:32:26 2021 +0100
Commit: Caolán McNamara 
CommitDate: Mon Jun 7 21:33:45 2021 +0200

ofz#35033 missing components

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

diff --git a/vcl/workben/dxffuzzer.cxx b/vcl/workben/dxffuzzer.cxx
index 8768072c93fb..89d6e19a69e8 100644
--- a/vcl/workben/dxffuzzer.cxx
+++ b/vcl/workben/dxffuzzer.cxx
@@ -19,6 +19,8 @@ extern "C" {
 void * com_sun_star_i18n_LocaleDataImpl_get_implementation( void *, void * );
 void * com_sun_star_i18n_BreakIterator_Unicode_get_implementation( void *, 
void * );
 void * com_sun_star_i18n_BreakIterator_get_implementation( void *, void * );
+void * com_sun_star_i18n_NativeNumberSupplier_get_implementation( void *, void 
* );
+void * com_sun_star_i18n_NumberFormatCodeMapper_get_implementation( void *, 
void * );
 }
 
 const lib_to_factory_mapping *
@@ -38,6 +40,8 @@ lo_get_constructor_map(void)
 { "com_sun_star_i18n_LocaleDataImpl_get_implementation", 
com_sun_star_i18n_LocaleDataImpl_get_implementation },
 { "com_sun_star_i18n_BreakIterator_Unicode_get_implementation", 
com_sun_star_i18n_BreakIterator_Unicode_get_implementation },
 { "com_sun_star_i18n_BreakIterator_get_implementation", 
com_sun_star_i18n_BreakIterator_get_implementation },
+{ "com_sun_star_i18n_NativeNumberSupplier_get_implementation", 
com_sun_star_i18n_NativeNumberSupplier_get_implementation },
+{ "com_sun_star_i18n_NumberFormatCodeMapper_get_implementation", 
com_sun_star_i18n_NumberFormatCodeMapper_get_implementation },
 { 0, 0 }
 };
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-06-07 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtkinst.cxx |1 +
 vcl/unx/gtk4/convert3to4.cxx |   31 ++-
 2 files changed, 27 insertions(+), 5 deletions(-)

New commits:
commit f9b721bb6fb243465029273265b757288cf391c9
Author: Caolán McNamara 
AuthorDate: Sun Jun 6 21:28:40 2021 +0100
Commit: Caolán McNamara 
CommitDate: Mon Jun 7 21:33:14 2021 +0200

gtk4: convert pack-type to child type

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

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 533e2628cf6f..470ada586aa2 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -22059,6 +22059,7 @@ weld::Builder* GtkInstance::CreateBuilder(weld::Widget* 
pParent, const OUString&
 rUIFile != "sfx/ui/printeroptionsdialog.ui" &&
 rUIFile != "sfx/ui/securityinfopage.ui" &&
 rUIFile != "sfx/ui/singletabdialog.ui" &&
+rUIFile != "sfx/ui/templatecategorydlg.ui" &&
 rUIFile != "sfx/ui/templatedlg.ui" &&
 rUIFile != "svt/ui/addresstemplatedialog.ui" &&
 rUIFile != "svt/ui/datewindow.ui" &&
diff --git a/vcl/unx/gtk4/convert3to4.cxx b/vcl/unx/gtk4/convert3to4.cxx
index 51649c981503..78e2f0dd7314 100644
--- a/vcl/unx/gtk4/convert3to4.cxx
+++ b/vcl/unx/gtk4/convert3to4.cxx
@@ -631,8 +631,6 @@ ConvertResult Convert3To4(const 
css::uno::Reference& xNode
 if (sPropName == "icon-name")
 {
 OUString 
sIconName(xProp->getFirstChild()->getNodeValue());
-fprintf(stderr, "icon name is %s\n",
-sIconName.toUtf8().getStr());
 auto xIconName
 = CreateProperty(xDoc, 
"icon-name", sIconName);
 
xObjectCandidate->insertBefore(xIconName, xChild);
@@ -678,8 +676,10 @@ ConvertResult Convert3To4(const 
css::uno::Reference& xNode
 bContentArea = true;
 }
 else if (sName == "accessible")
-xRemoveList.push_back(
-xChild); // Yikes!, what's the replacement for this 
going to be
+{
+// TODO what's the replacement for this going to be?
+xRemoveList.push_back(xChild);
+}
 }
 
 if (bContentArea)
@@ -759,6 +759,26 @@ ConvertResult Convert3To4(const 
css::uno::Reference& xNode
 xParent, css::uno::UNO_QUERY_THROW);
 xElem->setAttributeNode(xTypeStart);
 }
+else if (sName == "pack-type")
+{
+// turn parent tag of  into 
+auto xParent = xChild->getParentNode();
+
+css::uno::Reference 
xParentMap
+= xParent->getAttributes();
+css::uno::Reference xParentType
+= xParentMap->getNamedItem("type");
+assert(!xParentType || xParentType->getNodeValue() == 
"titlebar");
+if (!xParentType)
+{
+css::uno::Reference 
xTypeStart
+= xDoc->createAttribute("type");
+
xTypeStart->setValue(xCurrent->getFirstChild()->getNodeValue());
+css::uno::Reference xElem(
+xParent, css::uno::UNO_QUERY_THROW);
+xElem->setAttributeNode(xTypeStart);
+}
+}
 }
 xNew->appendChild(xChild->removeChild(xCurrent));
 }
@@ -1036,7 +1056,8 @@ ConvertResult Convert3To4(const 
css::uno::Reference& xNode
 xChild->appendChild(CreateProperty(xDoc, "visible", "False"));
 }
 
-if (bChildAlwaysShowImage)
+// only create the child box for GtkButton/GtkToggleButton
+if (bChildAlwaysShowImage && sClass != "GtkMenuButton")
 {
 auto xImageCandidateNode = xChild->getLastChild();
 if (xImageCandidateNode && xImageCandidateNode->getNodeName() 
!= "child")
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-06-07 Thread Henry Castro (via logerrit)
 sw/qa/uitest/writer_tests2/fontworks.py |   36 ++--
 uitest/uitest/uihelper/guarded.py   |   10 
 2 files changed, 26 insertions(+), 20 deletions(-)

New commits:
commit 7f49c4eea51c6c84ee7adacd5ba45e1e0fc4c1f7
Author: Henry Castro 
AuthorDate: Fri Apr 9 17:32:56 2021 -0400
Commit: Henry Castro 
CommitDate: Mon Jun 7 20:13:04 2021 +0200

sw/qa/uitest: close the dialog if thrown an exception

if a unit test opens a dialog and exception
is thrown if does not exist a control, the
terminate() method fails, the unit test will
wait indefinitely for the subprocess to terminate.

Change-Id: I6dc77b2db8ce042ead78d13ce57e91892cd2db90
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113896
Tested-by: Jenkins
Reviewed-by: Henry Castro 

diff --git a/sw/qa/uitest/writer_tests2/fontworks.py 
b/sw/qa/uitest/writer_tests2/fontworks.py
index 4d4044ab2bd0..d9ef76c10602 100644
--- a/sw/qa/uitest/writer_tests2/fontworks.py
+++ b/sw/qa/uitest/writer_tests2/fontworks.py
@@ -10,6 +10,7 @@
 from uitest.framework import UITestCase
 from uitest.uihelper.common import get_state_as_dict
 from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper import guarded
 #test FontWorks dialog
 class fontWorksDialog(UITestCase):
 
@@ -18,26 +19,21 @@ class fontWorksDialog(UITestCase):
 xWriterDoc = self.xUITest.getTopFocusWindow()
 xWriterEdit = xWriterDoc.getChild("writer_edit")
 
-
self.ui_test.execute_dialog_through_command(".uno:FontworkGalleryFloater")
-xDialog = self.xUITest.getTopFocusWindow()
-
-FontWorkSelector = xDialog.getChild("ctlFavoriteswin")
-# Select element with id (3)
-element3 = FontWorkSelector.getChild("2")
-element3.executeAction("SELECT", mkPropertyValues({}))
-print(get_state_as_dict(FontWorkSelector))
-
self.assertEqual(get_state_as_dict(FontWorkSelector)["SelectedItemPos"], "2")
-
self.assertEqual(get_state_as_dict(FontWorkSelector)["SelectedItemId"], "3")
-self.assertEqual(get_state_as_dict(FontWorkSelector)["VisibleCount"], 
"36")
-
-# Select element with id (7)
-element7 = FontWorkSelector.getChild("6")
-element7.executeAction("SELECT", mkPropertyValues({}))
-
self.assertEqual(get_state_as_dict(FontWorkSelector)["SelectedItemPos"], "6")
-
self.assertEqual(get_state_as_dict(FontWorkSelector)["SelectedItemId"], "7")
-
-xCloseBtn = xDialog.getChild("cancel")
-self.ui_test.close_dialog_through_button(xCloseBtn)
+with guarded.execute_dialog_through_command(self, 
".uno:FontworkGalleryFloater", close_button="cancel") as xDialog:
+FontWorkSelector = xDialog.getChild("ctlFavoriteswin")
+# Select element with id (3)
+element3 = FontWorkSelector.getChild("2")
+element3.executeAction("SELECT", mkPropertyValues({}))
+print(get_state_as_dict(FontWorkSelector))
+
self.assertEqual(get_state_as_dict(FontWorkSelector)["SelectedItemPos"], "2")
+
self.assertEqual(get_state_as_dict(FontWorkSelector)["SelectedItemId"], "3")
+
self.assertEqual(get_state_as_dict(FontWorkSelector)["VisibleCount"], "36")
+
+# Select element with id (7)
+element7 = FontWorkSelector.getChild("6")
+element7.executeAction("SELECT", mkPropertyValues({}))
+
self.assertEqual(get_state_as_dict(FontWorkSelector)["SelectedItemPos"], "6")
+
self.assertEqual(get_state_as_dict(FontWorkSelector)["SelectedItemId"], "7")
 
 self.ui_test.close_doc()
 
diff --git a/uitest/uitest/uihelper/guarded.py 
b/uitest/uitest/uihelper/guarded.py
index b7e5ce099d1e..871fa697d584 100644
--- a/uitest/uitest/uihelper/guarded.py
+++ b/uitest/uitest/uihelper/guarded.py
@@ -28,4 +28,14 @@ def execute_dialog_through_action(testCase, ui_object, 
action, parameters = None
 finally:
 
testCase.ui_test.close_dialog_through_button(xDialog.getChild(close_button))
 
+# Calls UITest.close_dialog_through_button at exit
+@contextmanager
+def execute_dialog_through_command(testCase, unoCommand, close_button = "ok"):
+testCase.ui_test.execute_dialog_through_command(unoCommand)
+xDialog = testCase.xUITest.getTopFocusWindow()
+try:
+yield xDialog
+finally:
+
testCase.ui_test.close_dialog_through_button(xDialog.getChild(close_button))
+
 # 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: sd/CppunitTest_sd_export_ooxml1.mk sd/CppunitTest_sd_export_ooxml2.mk sd/CppunitTest_sd_export_tests.mk sd/CppunitTest_sd_export_tests-ooxml1.mk sd/CppunitTest_sd_expor

2021-06-07 Thread Xisco Fauli (via logerrit)
 sd/CppunitTest_sd_export_ooxml1.mk   |   81 -
 sd/CppunitTest_sd_export_ooxml2.mk   |   81 -
 sd/CppunitTest_sd_export_tests-ooxml1.mk |   14 +
 sd/CppunitTest_sd_export_tests-ooxml2.mk |   14 +
 sd/CppunitTest_sd_export_tests.mk|   70 -
 sd/Module_sd.mk  |6 +-
 sd/export_setup.mk   |   86 +++
 7 files changed, 120 insertions(+), 232 deletions(-)

New commits:
commit 6004f17ae68cc6c15ef9cc96cc502dd4a09d6cf1
Author: Xisco Fauli 
AuthorDate: Mon Jun 7 16:42:37 2021 +0200
Commit: Xisco Fauli 
CommitDate: Mon Jun 7 19:50:47 2021 +0200

sd: Use template for export test modules

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

diff --git a/sd/CppunitTest_sd_export_ooxml1.mk 
b/sd/CppunitTest_sd_export_ooxml1.mk
deleted file mode 100644
index ed3fd32dd10c..
--- a/sd/CppunitTest_sd_export_ooxml1.mk
+++ /dev/null
@@ -1,81 +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_CppunitTest_CppunitTest,sd_export_ooxml1))
-
-$(eval $(call gb_CppunitTest_use_externals,sd_export_ooxml1,\
-   boost_headers \
-   libxml2 \
-))
-
-$(eval $(call gb_CppunitTest_use_common_precompiled_header,sd_export_ooxml1))
-
-$(eval $(call gb_CppunitTest_add_exception_objects,sd_export_ooxml1, \
-   sd/qa/unit/export-tests-ooxml1 \
-))
-
-$(eval $(call gb_CppunitTest_use_libraries,sd_export_ooxml1, \
-   $(call gb_Helper_optional,AVMEDIA,avmedia) \
-   basegfx \
-   comphelper \
-   cppu \
-   cppuhelper \
-   drawinglayer \
-   editeng \
-   for \
-   forui \
-   i18nlangtag \
-   msfilter \
-   oox \
-   sal \
-   salhelper \
-   sax \
-   sd \
-   sfx \
-   sot \
-   svl \
-   svt \
-   svx \
-   svxcore \
-   test \
-   tl \
-   tk \
-   ucbhelper \
-   unotest \
-   utl \
-   vcl \
-   xo \
-))
-
-$(eval $(call gb_CppunitTest_set_include,sd_export_ooxml1,\
-   -I$(SRCDIR)/sd/source/ui/inc \
-   -I$(SRCDIR)/sd/inc \
-   $$(INCLUDE) \
-))
-
-$(eval $(call gb_CppunitTest_use_sdk_api,sd_export_ooxml1))
-
-$(eval $(call gb_CppunitTest_use_ure,sd_export_ooxml1))
-$(eval $(call gb_CppunitTest_use_vcl,sd_export_ooxml1))
-
-$(eval $(call gb_CppunitTest_use_rdb,sd_export_ooxml1,services))
-
-$(eval $(call gb_CppunitTest_use_custom_headers,sd_export_ooxml1,\
-   officecfg/registry \
-))
-
-$(eval $(call gb_CppunitTest_use_configuration,sd_export_ooxml1))
-
-$(eval $(call gb_CppunitTest_add_arguments,sd_export_ooxml1,\
-   -env:SVG_DISABLE_FONT_EMBEDDING= \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/sd/CppunitTest_sd_export_ooxml2.mk 
b/sd/CppunitTest_sd_export_ooxml2.mk
deleted file mode 100644
index 947e4c39d917..
--- a/sd/CppunitTest_sd_export_ooxml2.mk
+++ /dev/null
@@ -1,81 +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_CppunitTest_CppunitTest,sd_export_ooxml2))
-
-$(eval $(call gb_CppunitTest_use_externals,sd_export_ooxml2,\
-   boost_headers \
-   libxml2 \
-))
-
-$(eval $(call gb_CppunitTest_use_common_precompiled_header,sd_export_ooxml2))
-
-$(eval $(call gb_CppunitTest_add_exception_objects,sd_export_ooxml2, \
-sd/qa/unit/export-tests-ooxml2 \
-))
-
-$(eval $(call gb_CppunitTest_use_libraries,sd_export_ooxml2, \
-   $(call gb_Helper_optional,AVMEDIA,avmedia) \
-   basegfx \
-   comphelper \
-   cppu \
-   cppuhelper \
-   drawinglayer \
-   editeng \
-   for \
-   forui \
-   i18nlangtag \
-   msfilter \
-   oox \
-   sal \
-   salhelper \
-   sax \
-   sd \
-   sfx \
-   sot \
-   svl \
-   svt \
-   svx \
-   svxcore \
-   test \
-   tl \
-   tk \
-   ucbhelper \
-   unotest \
-   utl \
-   vcl \
-   xo \
-))
-
-$(eva

[Libreoffice-commits] core.git: helpcontent2

2021-06-07 Thread Olivier Hallot (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3893b54e3656c07e182947a4fd5ef1b0be82bd2e
Author: Olivier Hallot 
AuthorDate: Mon Jun 7 14:36:15 2021 -0300
Commit: Gerrit Code Review 
CommitDate: Mon Jun 7 19:36:15 2021 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to 68a8e252d2600cabc694d9c489ec641dbd3c902a
  - tdf#124066 Help for VBA StrConv function

1) LCID codes linked to LibreOffice internal LCID file
2) Examples borrowed from QA tests

Change-Id: I1b00a1901f32de0243b518de39abd633ba08eadc
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/116684
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/helpcontent2 b/helpcontent2
index 84d49dae2c04..68a8e252d260 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 84d49dae2c041fa294415d4deba31f4477a663a3
+Subproject commit 68a8e252d2600cabc694d9c489ec641dbd3c902a
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-06-07 Thread Olivier Hallot (via logerrit)
 AllLangHelp_sbasic.mk  |1 
 source/auxiliary/sbasic.tree   |1 
 source/text/sbasic/shared/special_vba_func.xhp |   51 +++
 source/text/sbasic/shared/strconv.xhp  |  179 +
 4 files changed, 203 insertions(+), 29 deletions(-)

New commits:
commit 68a8e252d2600cabc694d9c489ec641dbd3c902a
Author: Olivier Hallot 
AuthorDate: Fri Jun 4 00:18:32 2021 -0300
Commit: Olivier Hallot 
CommitDate: Mon Jun 7 19:36:15 2021 +0200

tdf#124066 Help for VBA StrConv function

1) LCID codes linked to LibreOffice internal LCID file
2) Examples borrowed from QA tests

Change-Id: I1b00a1901f32de0243b518de39abd633ba08eadc
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/116684
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/AllLangHelp_sbasic.mk b/AllLangHelp_sbasic.mk
index 0f7e60542..f40dd2d0f 100644
--- a/AllLangHelp_sbasic.mk
+++ b/AllLangHelp_sbasic.mk
@@ -402,6 +402,7 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,sbasic,\
 helpcontent2/source/text/sbasic/shared/main0601 \
 helpcontent2/source/text/sbasic/shared/Resume \
 helpcontent2/source/text/sbasic/shared/special_vba_func \
+helpcontent2/source/text/sbasic/shared/strconv \
 helpcontent2/source/text/sbasic/shared/vbasupport \
 helpcontent2/source/text/sbasic/python/main \
 helpcontent2/source/text/sbasic/python/python_2_basic \
diff --git a/source/auxiliary/sbasic.tree b/source/auxiliary/sbasic.tree
index 40d7c6bf2..b52b277ee 100644
--- a/source/auxiliary/sbasic.tree
+++ b/source/auxiliary/sbasic.tree
@@ -285,6 +285,7 @@
 Static 
keyword
 Stop 
Statement
 StrComp 
Function
+StrConv 
Function [VBA]
 Str 
Function
 StrReverse Function [VBA]
 String 
Function
diff --git a/source/text/sbasic/shared/special_vba_func.xhp 
b/source/text/sbasic/shared/special_vba_func.xhp
index 32d98942e..8a257ee26 100644
--- a/source/text/sbasic/shared/special_vba_func.xhp
+++ b/source/text/sbasic/shared/special_vba_func.xhp
@@ -26,23 +26,20 @@
 
 
 
-
-
 
 
-  VBA Functions;Introduction
+VBA Functions;Introduction
 
 
-
-Exclusive VBA Functions and 
Statements
+Exclusive VBA Functions and 
Statements
 %PRODUCTNAME Basic adds this set of functions 
when VBA support is enabled.
 
 These exclusive VBA functions are enabled when the statement 
Option VBASupport 1 is placed before the first 
macro of a %PRODUCTNAME Basic module. 
 
 
-
-VBA Statements
-
+
+VBA Statements
+
 VBA Statements
 
 
@@ -51,20 +48,21 @@
 
 
 
-  VBA Functions;Text Functions
+VBA Functions;Text Functions
 
-Text functions
+Text functions
 
 
 
 
+
 
 
 
-
-VBA Functions;Financial Functions
-
-Financial functions
+
+VBA Functions;Financial Functions
+
+Financial functions
 
 
 
@@ -82,9 +80,9 @@
 
 
 
-VBA Functions;Date and Time Functions
+VBA Functions;Date and Time Functions
 
-Date and time functions
+Date and time functions
 
 
 
@@ -92,36 +90,31 @@
 
 
 
-  VBA Functions;I/O Functions
+VBA Functions;I/O Functions
 
 
-I/O Functions
+I/O Functions
 
 
 
 
 
-  VBA Functions;Mathematical Functions
-  VBA Functions;formatting numbers
-  VBA Functions;partitioning numbers
+VBA Functions;Mathematical Functions
+VBA Functions;formatting numbers
+VBA Functions;partitioning numbers
 
-
-Mathematical Functions
+Mathematical Functions
 
 
 
-
 
 
 
-
 
-  VBA Functions;Object Properties and Methods
+VBA Functions;Object Properties and Methods
 
-
-Object Properties and Methods
+Object Properties and Methods
 
-
 
 
 
diff --git a/source/text/sbasic/shared/strconv.xhp 
b/source/text/sbasic/shared/strconv.xhp
new file mode 100644
index 0..81267e187
--- /dev/null
+++ b/source/text/sbasic/shared/strconv.xhp
@@ -0,0 +1,179 @@
+
+
+
+
+  
+StrConv Function [VBA]
+/text/sbasic/shared/strconv.xhp
+  
+
+
+
+StrConv function
+
+
+StrConv Function
+Convert a string as specified by 
a conversion type.
+
+
+
+StrConv(Text, Conversion, [ 
LCID ])
+
+String
+
+Text: Any 
valid string expression.
+Conversion: The type of conversion to 
perform, as defined in the table below.
+
+
+
+Conversion
+
+
+Value
+
+
+Description
+
+
+
+
+vbUpperCase
+
+
+1
+
+
+Converts 
Text characters to uppercase.
+
+
+
+
+vbLowerCase
+
+
+2
+
+
+Converts Text characters lowercase.
+
+
+
+
+vbProperCase
+
+
+3
+
+
+Converts the first letter of every word in Text 
to uppercase.
+
+
+
+
+v

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

2021-06-07 Thread Mike Kaganski (via logerrit)
 sd/qa/unit/layout-tests.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a50f482fa1b2239f317add1b83ffeb08b14a44a8
Author: Mike Kaganski 
AuthorDate: Mon Jun 7 18:24:29 2021 +0300
Commit: Mike Kaganski 
CommitDate: Mon Jun 7 19:35:23 2021 +0200

Move PPTX testdoc to respective directory

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

diff --git a/sd/qa/unit/data/odp/tdf128212.pptx 
b/sd/qa/unit/data/pptx/tdf128212.pptx
similarity index 100%
rename from sd/qa/unit/data/odp/tdf128212.pptx
rename to sd/qa/unit/data/pptx/tdf128212.pptx
diff --git a/sd/qa/unit/layout-tests.cxx b/sd/qa/unit/layout-tests.cxx
index 7498f24227ac..1d10ab0a2a1e 100644
--- a/sd/qa/unit/layout-tests.cxx
+++ b/sd/qa/unit/layout-tests.cxx
@@ -68,7 +68,7 @@ void SdLayoutTest::testTdf136949()
 void SdLayoutTest::testTdf128212()
 {
 sd::DrawDocShellRef xDocShRef
-= 
loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf128212.pptx"), 
PPTX);
+= 
loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf128212.pptx"), 
PPTX);
 
 std::shared_ptr xMetaFile = xDocShRef->GetPreviewMetaFile();
 MetafileXmlDump dumper;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-06-07 Thread Andreas Heinisch (via logerrit)
 sfx2/source/dialog/dinfdlg.cxx |8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 629fe3a8e6fdf1602add0803b7d06e70215cda33
Author: Andreas Heinisch 
AuthorDate: Thu May 20 14:38:16 2021 +0200
Commit: Andreas Heinisch 
CommitDate: Mon Jun 7 19:02:52 2021 +0200

tdf#132667 - Grab focus on the last inserted property

On removing/adding custom document properties, grab the focus on the
last empty shown name box.

Change-Id: Ifd66566d4ae9fa57b9f1a9aae5f9cb93dbb74070
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115872
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch 

diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 40bd42c63f6e..13349d3bf47c 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -1492,7 +1492,6 @@ void CustomPropertiesWindow::CreateNewLine()
 pNewLine->m_xRemoveButton->get_buildable_name() + 
OString::number(nSize));
 
 pNewLine->DoTypeHdl(*pNewLine->m_xTypeBox);
-pNewLine->m_xNameBox->grab_focus();
 }
 
 bool CustomPropertiesWindow::AreAllLinesValid() const
@@ -1770,6 +1769,13 @@ void CustomPropertiesWindow::ReloadLinesContent()
 pLine->DoTypeHdl(*pLine->m_xTypeBox);
 }
 
+// tdf#132667 - grab focus on the last inserted property
+if (i > 0 && m_aCustomProperties[nDataModelPos + i - 1]->m_sName.isEmpty())
+{
+CustomPropertyLine* pLine = m_aCustomPropertiesLines[i - 1].get();
+pLine->m_xNameBox->grab_focus();
+}
+
 while (nDataModelPos + i >= GetTotalLineCount() && i < 
GetExistingLineCount())
 {
 CustomPropertyLine* pLine = m_aCustomPropertiesLines[i].get();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] dev-tools.git: help3/xhpeditor

2021-06-07 Thread Olivier Hallot (via logerrit)
 help3/xhpeditor/links.txt.xsl |  184 +++---
 1 file changed, 105 insertions(+), 79 deletions(-)

New commits:
commit 335d75a0fabbe5d674c910a1093d254989a48882
Author: Olivier Hallot 
AuthorDate: Mon Jun 7 12:51:18 2021 -0300
Commit: Olivier Hallot 
CommitDate: Mon Jun 7 18:50:07 2021 +0200

Update icons links for transformation

Change-Id: I205847fafb376663662216531769da256152101b
Reviewed-on: https://gerrit.libreoffice.org/c/dev-tools/+/116789
Tested-by: Olivier Hallot 
Reviewed-by: Olivier Hallot 

diff --git a/help3/xhpeditor/links.txt.xsl b/help3/xhpeditor/links.txt.xsl
index d9394b1..87a6fdf 100644
--- a/help3/xhpeditor/links.txt.xsl
+++ b/help3/xhpeditor/links.txt.xsl
@@ -331,22 +331,20 @@
 cmd/32/redo.svg
 cmd/32/undo.svg
 cmd/32/redo.svg
-cmd/32/ca/underline.svg
-cmd/32/ca/bold.svg
 cmd/32/de/italic.svg
 cmd/32/de/numberformatdecdecimals.svg
 cmd/32/de/numberformatdecimal.svg
 cmd/32/de/numberformatincdecimals.svg
 cmd/32/de/numberformatthousands.svg
-cmd/32/ca/underline.svg
-cmd/32/ca/underlinedouble.svg
-cmd/32/ca/underline.svg
+cmd/32/es/underline.svg
+cmd/32/es/underline.svg
 cmd/32/ar/absoluterecord.svg
 cmd/32/ar/alphaliststyle.svg
 cmd/32/ar/alphalowliststyle.svg
 cmd/32/ar/defaultbullet.svg
 cmd/32/ar/bulletsandnumberingdialog.svg
 cmd/32/ar/chapternumberingdialog.svg
+cmd/32/ar/continuenumbering.svg
 cmd/32/ar/defaultbullet.svg
 cmd/32/ar/defaultnumbering.svg
 cmd/32/ar/deleterecord.svg
@@ -369,15 +367,17 @@
 cmd/32/de/numberformatdecimal.svg
 cmd/32/de/numberformatincdecimals.svg
 cmd/32/de/numberformatthousands.svg
-cmd/32/ca/underline.svg
-cmd/32/ca/underlinedouble.svg
-cmd/32/ca/underline.svg
+cmd/32/es/underline.svg
+cmd/32/es/underlinedouble.svg
+cmd/32/es/underline.svg
+cmd/32/es/underline.svg
 cmd/32/ar/absoluterecord.svg
 cmd/32/ar/alphaliststyle.svg
 cmd/32/ar/alphalowliststyle.svg
 cmd/32/ar/defaultbullet.svg
 cmd/32/ar/bulletsandnumberingdialog.svg
 cmd/32/ar/chapternumberingdialog.svg
+cmd/32/ar/continuenumbering.svg
 cmd/32/ar/defaultbullet.svg
 cmd/32/ar/defaultnumbering.svg
 cmd/32/ar/deleterecord.svg
@@ -398,16 +398,18 @@
 cmd/32/redo.svg
 cmd/32/de/bold.svg
 cmd/32/hu/underline.svg
+cmd/32/hu/underline.svg
 cmd/32/de/numberformatdecdecimals.svg
 cmd/32/de/numberformatdecimal.svg
 cmd/32/de/numberformatincdecimals.svg
 cmd/32/de/numberformatthousands.svg
 cmd/32/fr/bold.svg
-cmd/32/ca/italic.svg
-cmd/32/ca/underline.svg
-cmd/32/ca/underlinedouble.svg
-cmd/32/ca/underline.svg
+cmd/32/es/underline.svg
+cmd/32/es/underlinedouble.svg
+cmd/32/es/underline.svg
+cmd/32/es/underline.svg
 cmd/32/km/underline.svg
+cmd/32/km/underline.svg
 cmd/32/ko/fontdialog.svg
 cmd/32/ko/text.svg
 cmd/32/ko/editstyle.svg
@@ -421,38 +423,48 @@
 cmd/32/ko/fontdialog.svg
 cmd/32/ko/text.svg
 cmd/32/ko/underline.svg
+cmd/32/ko/underline.svg
 cmd/32/ko/designerdialog.svg
-cmd/32/ca/italic.svg
+cmd/32/it/italic.svg
 cmd/32/nl/underline.svg
+cmd/32/nl/underline.svg
 cmd/32/fr/bold.svg
 cmd/32/de/italic.svg
 cmd/32/pl/underline.svg
-cmd/32/ca/bold.svg
-cmd/32/ca/underline.svg
-cmd/32/ca/underlinedouble.svg
-cmd/32/ca/underline.svg
-cmd/32/ca/bold.svg
-cmd/32/ca/underline.svg
-cmd/32/ca/underlinedouble.svg
-cmd/32/ca/underline.svg
+cmd/32/pl/underline.svg
+cmd/32/es/bold.svg
+cmd/32/es/underline.svg
+cmd/32/es/underlinedouble.svg
+cmd/32/es/underline.svg
+cmd/32/es/underline.svg
+cmd/32/es/bold.svg
+cmd/32/es/underline.svg
+cmd/32/es/underlinedouble.svg
+cmd/32/es/underline.svg
+cmd/32/es/underline.svg
 cmd/32/de/italic.svg
 cmd/32/ru/underline.svg
+cmd/32/ru/underline.svg
 cmd/32/pl/underline.svg
 cmd/32/pl/underlinedouble.svg
 cmd/32/pl/underline.svg
+cmd/32/pl/underline.svg
 cmd/32/de/bold.svg
 cmd/32/de/italic.svg
 cmd/32/sl/bold.svg
 cmd/32/hu/underline.svg
 cmd/32/hu/underlinedouble.svg
 cmd/32/hu/underline.svg
+cmd/32/hu/underline.svg
 cmd/32/underline.svg
+cmd/32/underline.svg
 cmd/32/ar/absoluterecord.svg
 cmd/32/ar/alphaliststyle.svg
 cmd/32/ar/alphalowliststyle.svg
 cmd/32/ar/defaultbullet.svg
 cmd/32/ar/bulletsandnumberingdialog.svg
 cmd/32/ar/chapternumberingdialog.svg
+cmd/32/ar/continuenumbering.svg
 cmd/32/ar/defaultbullet.svg
 cmd/32/ar/defaultnumbering.svg
 cmd/32/ar/deleterecord.svg
@@ -479,32 +491,27 @@
 cmd/ar/sc_defaultnumbering.svg
 cmd/sc_undo.svg
 cmd/sc_redo.svg
-cmd/ca/lc_underline.svg
-cmd/ca/sc_underline.svg
-cmd/ca/lc_bold.svg
 cmd/de/lc_italic.svg
 cmd/de/lc_numberformatdecdecimals.svg
 cmd/de/lc_numberformatdecimal.svg
 cmd/de/lc_numberformatincdecimals.svg
 cmd/de/lc_numberformatthousands.svg
-cmd/ca/lc_underline.svg
-cmd/ca/lc_underlinedouble.svg
-cmd/ca/lc_underline.svg
-cmd/ca/sc_bold.svg
+cmd/es/lc_underline.svg
+cmd/es/lc_underline.svg
 cmd/de/sc_italic.svg
 cmd/de/sc_numberformatdecdecimals.svg
 cmd/de/sc_numberformatdecimal.svg
 cmd/de/sc_numberformatincdecimals.svg
 cmd/de/sc_numberformatthousands.svg
-cmd/ca/sc_underline.svg
-cmd/ca/sc_underlinedouble.svg
-cmd/ca/sc_underline.svg
+cmd/es/sc_underl

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

2021-06-07 Thread Miklos Vajna (via logerrit)
 sw/qa/uibase/uiview/data/keep-ratio.fodt |   21 +
 sw/qa/uibase/uiview/uiview.cxx   |   38 +++
 sw/source/uibase/uiview/view.cxx |   18 ++
 3 files changed, 77 insertions(+)

New commits:
commit 02c435082058ecf7f9d4d73cb47d31d0218dc10d
Author: Miklos Vajna 
AuthorDate: Mon Jun 7 18:03:33 2021 +0200
Commit: Miklos Vajna 
CommitDate: Mon Jun 7 18:49:07 2021 +0200

sw keep aspect ratio: add filter for this setting

SwViewOption::IsKeepRatio() was only in-memory, so ticking that checkbox
and restarting soffice disabled it again.

Handle this similar to e.g. the zoom factor which is mapped to a
view-specific settings.xml key.

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

diff --git a/sw/qa/uibase/uiview/data/keep-ratio.fodt 
b/sw/qa/uibase/uiview/data/keep-ratio.fodt
new file mode 100644
index ..7cfffbec567a
--- /dev/null
+++ b/sw/qa/uibase/uiview/data/keep-ratio.fodt
@@ -0,0 +1,21 @@
+
+http://openoffice.org/2004/office"; 
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" 
office:mimetype="application/vnd.oasis.opendocument.text">
+  
+
+  
+
+  0
+  0
+  40190
+  22728
+  true
+
+  
+
+  
+  
+
+  
+
+  
+
diff --git a/sw/qa/uibase/uiview/uiview.cxx b/sw/qa/uibase/uiview/uiview.cxx
index 0c12fd6dd81d..6711aa15b115 100644
--- a/sw/qa/uibase/uiview/uiview.cxx
+++ b/sw/qa/uibase/uiview/uiview.cxx
@@ -12,6 +12,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -20,6 +21,11 @@
 #include 
 #include 
 
+#include 
+#include 
+#include 
+#include 
+
 constexpr OUStringLiteral DATA_DIRECTORY = u"/sw/qa/uibase/uiview/data/";
 
 /// Covers sw/source/uibase/uiview/ fixes.
@@ -108,6 +114,38 @@ CPPUNIT_TEST_FIXTURE(SwUibaseUiviewTest, 
testUpdateReplacementNosetting)
 CPPUNIT_ASSERT(xNameAccess->hasByName("ObjectReplacements/Components"));
 }
 
+CPPUNIT_TEST_FIXTURE(SwUibaseUiviewTest, testKeepRatio)
+{
+// Given a document with a custom KeepRatio:
+OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"keep-ratio.fodt";
+
+// When loading that document:
+mxComponent = loadFromDesktop(aURL);
+
+// Then make sure we read the custom value:
+auto pXTextDocument = dynamic_cast(mxComponent.get());
+SwWrtShell* pWrtShell = pXTextDocument->GetDocShell()->GetWrtShell();
+const SwViewOption* pViewOption = pWrtShell->GetViewOptions();
+comphelper::ScopeGuard g([pWrtShell, pViewOption] {
+SwViewOption aViewOption(*pViewOption);
+aViewOption.SetKeepRatio(false);
+SW_MOD()->ApplyUsrPref(aViewOption, &pWrtShell->GetView());
+});
+// Without the accompanying fix in place, this test would have failed, 
because KeepRatio was not
+// mapped to settings.xml
+CPPUNIT_ASSERT(pViewOption->IsKeepRatio());
+
+// Then export as well:
+uno::Reference xStorable(mxComponent, uno::UNO_QUERY);
+uno::Sequence aStoreArgs = {
+comphelper::makePropertyValue("FilterName", OUString("writer8")),
+};
+xStorable->storeToURL(maTempFile.GetURL(), aStoreArgs);
+mbExported = true;
+xmlDocUniquePtr pXmlDoc = parseExport("settings.xml");
+assertXPathContent(pXmlDoc, 
"//config:config-item[@config:name='KeepRatio']", "true");
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index 5612191cc77a..7880e4fcacd8 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -1316,6 +1316,8 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < 
beans::PropertyValue >
  bGotZoomFactor = false, bGotIsSelectedFrame = false,
  bGotViewLayoutColumns = false, bGotViewLayoutBookMode = false,
  bBrowseMode = false, bGotBrowseMode = false;
+bool bKeepRatio = pVOpt->IsKeepRatio();
+bool bGotKeepRatio = false;
 
 for (const beans::PropertyValue& rValue : rSequence)
 {
@@ -1383,6 +1385,11 @@ void SwView::ReadUserDataSequence ( const uno::Sequence 
< beans::PropertyValue >
rValue.Value >>= bBrowseMode;
bGotBrowseMode = true;
 }
+else if (rValue.Name == "KeepRatio")
+{
+rValue.Value >>= bKeepRatio;
+bGotKeepRatio = true;
+}
 // Fallback to common SdrModel processing
 else

GetDocShell()->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel()->ReadUserDataSequenceValue(&rValue);
@@ -1459,6 +1466,14 @@ void SwView::ReadUserDataSequence ( const uno::Sequence 
< beans::PropertyValue >
 m_pWrtShell->SetMacroExecAllowed( bSavedFlagValue );
 }
 
+if (bGotKeepRatio && bKeepRat

[Libreoffice-commits] core.git: sw/CppunitTest_sw_uiwriter4.mk sw/Module_sw.mk sw/qa

2021-06-07 Thread Xisco Fauli (via logerrit)
 sw/CppunitTest_sw_uiwriter4.mk  |   14 
 sw/Module_sw.mk |1 
 sw/qa/extras/uiwriter/uiwriter.cxx  | 3296 
 sw/qa/extras/uiwriter/uiwriter4.cxx | 3651 
 4 files changed, 3686 insertions(+), 3276 deletions(-)

New commits:
commit a0bbeef0a8d9eeccc9ab9857851e0658139f2e1c
Author: Xisco Fauli 
AuthorDate: Mon Jun 7 15:31:29 2021 +0200
Commit: Xisco Fauli 
CommitDate: Mon Jun 7 16:52:14 2021 +0200

sw_uiwriter: split uiwriter into 2

it already has 230 tests

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

diff --git a/sw/CppunitTest_sw_uiwriter4.mk b/sw/CppunitTest_sw_uiwriter4.mk
new file mode 100644
index ..8614c3746008
--- /dev/null
+++ b/sw/CppunitTest_sw_uiwriter4.mk
@@ -0,0 +1,14 @@
+# -*- 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 sw_uiwriter_test,4))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk
index d0ebbea8df45..80cad58b1bdc 100644
--- a/sw/Module_sw.mk
+++ b/sw/Module_sw.mk
@@ -109,6 +109,7 @@ $(eval $(call gb_Module_add_slowcheck_targets,sw,\
 CppunitTest_sw_uiwriter \
 CppunitTest_sw_uiwriter2 \
 CppunitTest_sw_uiwriter3 \
+CppunitTest_sw_uiwriter4 \
 ) \
 CppunitTest_sw_layoutwriter \
 CppunitTest_sw_layoutwriter2 \
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx 
b/sw/qa/extras/uiwriter/uiwriter.cxx
index a70cab6cd394..c6bac664bac3 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -287,122 +287,7 @@ public:
 void testTdf77014();
 void testTdf92648();
 void testTdf103978_backgroundTextShape();
-void testTdf96515();
-void testTdf96943();
-void testTdf96536();
-void testTdf96479();
-void testBookmarkCollapsed();
-void testRemoveBookmarkText();
-void testRemoveBookmarkTextAndAddNew();
-void testRemoveBookmarkTextAndAddNewAfterReload();
-void testTdf96961();
-void testTdf88453();
-void testTdf88453Table();
-void testClassificationPaste();
-void testSmallCaps();
-void testTdf98987();
-void testTdf99004();
-void testTdf84695();
-void testTdf84695NormalChar();
-void testTdf84695Tab();
-void testTableStyleUndo();
-void testRedlineCopyPaste();
-void testTdf135260();
-void testRedlineParam();
-void testRedlineViewAuthor();
-void testTdf91292();
-void testTdf78727();
-void testRedlineTimestamp();
-void testCursorWindows();
-void testLandscape();
-void testTdf95699();
-void testTdf104032();
-void testTdf104440();
-void testTdf104425();
-void testTdf104814();
-void testTdf66405();
-void testTdf35021_tabOverMarginDemo();
-void testTdf106701_tabOverMarginAutotab();
-void testTdf104492();
-void testTdf107025();
-void testTdf107362();
-void testTdf105417();
-void testTdf105625();
-void testTdf125151_protected();
-void testTdf125151_protectedB();
-void testTdf106736();
-void testTdf58604();
-void testTdf112025();
-void testTdf72942();
-
-void testTdf113877_mergeDocs(const char* aDestDoc, const char* aInsertDoc);
-void testTdf113877();
-void testTdf113877NoMerge();
-void testTdf113877_default_style();
-void testTdf113877_Standard_style();
-void testTdf113877_blank_bold_on();
-void testTdf113877_blank_bold_off();
-
-void testMsWordCompTrailingBlanks();
-void testCreateDocxAnnotation();
-void testTdf107976();
-void testTdf142157();
-void testTdf108524();
-void testRhbz1810732();
-void testTableInSection();
-void testTableInNestedSection();
-void testTableInSectionInTable();
-void testSectionInTableInTable();
-void testSectionInTableInTable2();
-void testSectionInTableInTable3();
-void testSectionInTableInTable4();
-void testTdf112160();
-void testLinesMoveBackwardsInSectionInTable();
-void testTdf112741();
-void testTdf112860();
-void testTdf113287();
-void testTdf113445();
-void testTdf113686();
-void testFontEmbedding();
-void testLinesInSectionInTable();
-void testParagraphOfTextRange();
-void testTdf99689TableOfContents();
-void testTdf99689TableOfFigures();
-void testTdf99689TableOfTables();
-void testTdf112448();
-void testTdf113790();
-void testTdf108048();
-voi

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

2021-06-07 Thread Xisco Fauli (via logerrit)
 sw/qa/extras/uiwriter/uiwriter.cxx  |  263 --
 sw/qa/extras/uiwriter/uiwriter2.cxx |  274 
 2 files changed, 274 insertions(+), 263 deletions(-)

New commits:
commit 95f40ec1cdfe5c9db3e86c1092538dba8a129a72
Author: Xisco Fauli 
AuthorDate: Mon Jun 7 14:30:10 2021 +0200
Commit: Xisco Fauli 
CommitDate: Mon Jun 7 16:50:41 2021 +0200

uiwriter: keep CPPUNIT_TEST_FIXTURE tests together

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

diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx 
b/sw/qa/extras/uiwriter/uiwriter.cxx
index c47e5402304e..a70cab6cd394 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -1182,116 +1182,6 @@ void SwUiWriterTest::testWatermarkDOCX()
 CPPUNIT_ASSERT_EQUAL(sal_Int16(50), pWatermark->GetTransparency());
 }
 
-CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf134252)
-{
-load(DATA_DIRECTORY, "tdf134252.fodt");
-
-SwXTextDocument* pTextDoc = 
dynamic_cast(mxComponent.get());
-CPPUNIT_ASSERT(pTextDoc);
-
-uno::Reference xModel(mxComponent, uno::UNO_QUERY);
-uno::Reference 
xTextViewCursorSupplier(xModel->getCurrentController(), uno::UNO_QUERY);
-uno::Reference 
xCursor(xTextViewCursorSupplier->getViewCursor());
-uno::Reference xTextTablesSupplier(mxComponent, 
uno::UNO_QUERY);
-uno::Reference 
xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
-uno::Reference 
xTextSectionsSupplier(mxComponent, uno::UNO_QUERY);
-uno::Reference 
xSections(xTextSectionsSupplier->getTextSections(), uno::UNO_QUERY);
-
-// select all with section
-dispatchCommand(mxComponent, ".uno:SelectAll", {});
-
-CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
-CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xSections->getCount());
-CPPUNIT_ASSERT_EQUAL(OUString("bar" SAL_NEWLINE_STRING "baz" 
SAL_NEWLINE_STRING), xCursor->getString());
-
-dispatchCommand(mxComponent, ".uno:Delete", {});
-Scheduler::ProcessEventsToIdle();
-
-CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xTables->getCount());
-CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
-CPPUNIT_ASSERT_EQUAL(OUString(""), xCursor->getString());
-
-// this would crash
-dispatchCommand(mxComponent, ".uno:Undo", {});
-Scheduler::ProcessEventsToIdle();
-
-CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
-CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xSections->getCount());
-CPPUNIT_ASSERT_EQUAL(OUString("bar" SAL_NEWLINE_STRING "baz" 
SAL_NEWLINE_STRING), xCursor->getString());
-
-dispatchCommand(mxComponent, ".uno:Redo", {});
-Scheduler::ProcessEventsToIdle();
-
-CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xTables->getCount());
-CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
-CPPUNIT_ASSERT_EQUAL(OUString(""), xCursor->getString());
-
-dispatchCommand(mxComponent, ".uno:Undo", {});
-Scheduler::ProcessEventsToIdle();
-
-CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
-CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xSections->getCount());
-CPPUNIT_ASSERT_EQUAL(OUString("bar" SAL_NEWLINE_STRING "baz" 
SAL_NEWLINE_STRING), xCursor->getString());
-
-dispatchCommand(mxComponent, ".uno:Redo", {});
-Scheduler::ProcessEventsToIdle();
-
-CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xTables->getCount());
-CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
-CPPUNIT_ASSERT_EQUAL(OUString(""), xCursor->getString());
-}
-
-CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf136453)
-{
-load(DATA_DIRECTORY, "tdf136453.fodt");
-
-SwXTextDocument *const 
pTextDoc(dynamic_cast(mxComponent.get()));
-CPPUNIT_ASSERT(pTextDoc);
-SwDoc* const pDoc(pTextDoc->GetDocShell()->GetDoc());
-SwWrtShell *const pWrtShell(pDoc->GetDocShell()->GetWrtShell());
-
-sal_uLong const nNodes(pDoc->GetNodes().Count());
-
-pWrtShell->SttEndDoc(false);
-pWrtShell->SetMark();
-pWrtShell->Up(true, 1);
-pWrtShell->SttPara(true);
-pWrtShell->Delete();
-
-// one paragraph deleted, section is gone
-CPPUNIT_ASSERT_EQUAL(nNodes - 3, pDoc->GetNodes().Count());
-
-pWrtShell->Undo();
-
-CPPUNIT_ASSERT_EQUAL(nNodes, pDoc->GetNodes().Count());
-
-// check that every node has 1 frame
-xmlDocUniquePtr pXmlDoc = parseLayoutDump();
-assertXPath(pXmlDoc, "/root/page[1]/body/txt", 3);
-assertXPath(pXmlDoc, "/root/page[1]/body/section", 1);
-assertXPath(pXmlDoc, "/root/page[1]/body/section/txt", 1);
-
-pWrtShell->Redo();
-
-// one paragraph deleted, section is gone
-CPPUNIT_ASSERT_EQUAL(nNodes - 3, pDoc->GetNodes().Count());
-
-discardDumpedLayout();
-pXmlDoc = parseLayoutDump();
-assertXPath(pXmlDoc, "/root/page[1]/body/txt", 3);
-assertXPath(pXmlDoc, "/root/page[1]/body/section", 0);
-
-pWrtShell->Undo();
-
-CPPUNIT_A

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

2021-06-07 Thread Noel Grandin (via logerrit)
 binaryurp/source/reader.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 9f0484c2bca8e7ec5e0d83289fae9b474b8598e0
Author: Noel Grandin 
AuthorDate: Mon Jun 7 12:52:21 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Jun 7 16:07:23 2021 +0200

improve logging message

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

diff --git a/binaryurp/source/reader.cxx b/binaryurp/source/reader.cxx
index b11b77ffe658..902225e1bd54 100644
--- a/binaryurp/source/reader.cxx
+++ b/binaryurp/source/reader.cxx
@@ -120,9 +120,9 @@ void Reader::execute() {
 block.done();
 }
 } catch (const css::uno::Exception & e) {
-SAL_WARN("binaryurp", "caught UNO exception '" << e << '\'');
+SAL_WARN("binaryurp", "caught UNO exception, " << e << " " << 
e.Message);
 } catch (const std::exception & e) {
-SAL_WARN("binaryurp", "caught C++ exception '" << e.what() << '\'');
+SAL_WARN("binaryurp", "caught C++ exception, " << e.what() );
 }
 bridge_->terminate(false);
 bridge_.clear();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [libreoffice-documentation] Calc's ENCODEURL, FILTERXML and WEBSERVICE functions

2021-06-07 Thread Vasudev Narayanan
Greetings:
For the ENCOREURL function, the given URL returns an empty page as in

For the other two functions, I will also share my review comments.
Thank you-Dev


-Original Message-
From: Steve Fanning 
To: LibreOffice Developers 
Cc: LibreOffice Documentation 
Sent: Mon, Jun 7, 2021 12:36 am
Subject: [libreoffice-documentation] Calc's ENCODEURL, FILTERXML and WEBSERVICE 
functions

Hello All,

Please could somebody with technical knowledge of these three functions 
help me?

I have been upgrading their descriptions in the Calc Functions Wiki area 
(https://wiki.documentfoundation.org/Documentation/Calc_Functions/ENCODEURL, 
https://wiki.documentfoundation.org/Documentation/Calc_Functions/FILTERXML 
and 
https://wiki.documentfoundation.org/Documentation/Calc_Functions/WEBSERVICE).

I am not an expert on these functions but have extended the descriptions 
beyond the explanations given in the Help by a combination of code 
inspection and experimentation.

Would it be possible for somebody who has expertise in this area to 
review these three wiki pages from a technical perspective? Is what I 
have written technically correct? Have I missed anything that might be 
significant to a user who is looking for more background? (Please don't 
think I'm looking for somebody to find typos - there may be some, but we 
can resolve those without wasting any of a developer's valuable time!)

On a specific point, do we need to declare the versions of XML and XPath 
that are relevant for FILTERXML? If so, can somebody confirm what they are?

Thanks in advance.

Regards,

Steve Fanning (LibreOffice Documentation Team)



-- 
To unsubscribe e-mail to: documentation+unsubscr...@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/documentation/
Privacy Policy: https://www.documentfoundation.org/privacy
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: helpcontent2

2021-06-07 Thread Olivier Hallot (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ddfec46bcebc36fdf0191d46bd3bcce6ae7cfa67
Author: Olivier Hallot 
AuthorDate: Mon Jun 7 15:16:24 2021 +0200
Commit: Gerrit Code Review 
CommitDate: Mon Jun 7 15:16:24 2021 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to 84d49dae2c041fa294415d4deba31f4477a663a3
  - Add link to half-width / full-width glossary entry to search&replace 
dialog help page

Change-Id: I54d892b1112375c6dce64904df61a79c37f4
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/116705
Tested-by: Jenkins
Tested-by: Olivier Hallot 
Reviewed-by: Olivier Hallot 

diff --git a/helpcontent2 b/helpcontent2
index 47df6ad11ac2..84d49dae2c04 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 47df6ad11ac2e9c8c8d1f6e9c1049acbb56785e1
+Subproject commit 84d49dae2c041fa294415d4deba31f4477a663a3
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-06-07 Thread Olivier Hallot (via logerrit)
 source/text/shared/01/0210.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 84d49dae2c041fa294415d4deba31f4477a663a3
Author: Olivier Hallot 
AuthorDate: Mon Jun 7 15:10:54 2021 +0200
Commit: Olivier Hallot 
CommitDate: Mon Jun 7 15:16:24 2021 +0200

Add link to half-width / full-width glossary entry to search&replace dialog 
help page

Change-Id: I54d892b1112375c6dce64904df61a79c37f4
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/116705
Tested-by: Jenkins
Tested-by: Olivier Hallot 
Reviewed-by: Olivier Hallot 

diff --git a/source/text/shared/01/0210.xhp 
b/source/text/shared/01/0210.xhp
index 452eee0fa..05e3035b6 100644
--- a/source/text/shared/01/0210.xhp
+++ b/source/text/shared/01/0210.xhp
@@ -156,7 +156,7 @@ Ext help text not found within switches. Solution: Keep 
switched text for normal
 
 
 Match 
character width (only if Asian languages are enabled)
-  Distinguishes between half-width 
and full-width character forms.
+  Distinguishes between half-width and 
full width character forms.
 
 
 Sounds 
like (Japanese) (only if Asian languages are enabled)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Calc's ENCODEURL, FILTERXML and WEBSERVICE functions

2021-06-07 Thread Eike Rathke
Hi Steve,

On Sunday, 2021-06-06 20:06:27 +0100, Steve Fanning wrote:

https://wiki.documentfoundation.org/Documentation/Calc_Functions/ENCODEURL

Just some remarks.

URL is not Universal Resource Locator but Uniform Resource Locator.
URI is Uniform Resource Identifier.
See also https://en.wikipedia.org/wiki/URL and
https://en.wikipedia.org/wiki/Uniform_Resource_Identifier

I find it a tad unfortunate that the first example of ENCODEURL() uses
a valid URI to encode it, i.e.
=ENCODEURL("https://www.libreoffice.org/";)
that produces "https%3A%2F%2Fwww%2Elibreoffice%2Eorg%2F".
ENCODEURL() is more used on path components or query parameter arguments
that are appended to the path.

Also, using the libreoffice.org site should be avoided for examples as
when loaded
a) it generates quite some traffic
b) the result is overly complex

Rather use https://example.org/ instead that's made and reserved for,
well, examples, and delivers a short page if someone tries out.

Using actual queries for FILTERXML() is of course fine to demonstrate
functionality, with examples that keep the result not overly complex.

For ENCODEURL() "Additional details" "URL is constructed from a limited
set of characters" ... maybe also link to
https://datatracker.ietf.org/doc/html/rfc3986 the "Uniform Resource
Identifier (URI): Generic Syntax", and "A few special characters" should
be replaced by "A few reserved characters" linking to
https://datatracker.ietf.org/doc/html/rfc3986/#section-2.2 (Reserved
Characters)


> https://wiki.documentfoundation.org/Documentation/Calc_Functions/FILTERXML
> https://wiki.documentfoundation.org/Documentation/Calc_Functions/WEBSERVICE

The WEBSERVICE() example for "Accessing non-XML data" probably should
also be changed to https://example.org/ to not deliver the
"exceptionally long, multi-line string" ...

In "Accessing XML data" the example lacks the protocol scheme and //
before host component, i.e. https://


> On a specific point, do we need to declare the versions of XML and XPath
> that are relevant for FILTERXML? If so, can somebody confirm what they are?

I don't think the versions are somewhere nailed.

  Eike

-- 
GPG key 0x6A6CD5B765632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A


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


[Libreoffice-commits] core.git: helpcontent2

2021-06-07 Thread Ming Hua (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4642cddcc54c352e26272dab3099f0fe65bd170e
Author: Ming Hua 
AuthorDate: Mon Jun 7 20:46:59 2021 +0800
Commit: Gerrit Code Review 
CommitDate: Mon Jun 7 14:46:59 2021 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to 47df6ad11ac2e9c8c8d1f6e9c1049acbb56785e1
  - [WIP] tdf#142652 Add glossary entry about half-width ...

...and full-width characters

Change-Id: If12dbc28de60fa7430d02530cf2d7fa7900c6675
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/116771
Tested-by: Olivier Hallot 
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/helpcontent2 b/helpcontent2
index 096e8e98912a..47df6ad11ac2 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 096e8e98912ae2d7eee5975e7e2beb4d5883180b
+Subproject commit 47df6ad11ac2e9c8c8d1f6e9c1049acbb56785e1
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-06-07 Thread Ming Hua (via logerrit)
 source/text/shared/00/0005.xhp |   14 ++
 1 file changed, 14 insertions(+)

New commits:
commit 47df6ad11ac2e9c8c8d1f6e9c1049acbb56785e1
Author: Ming Hua 
AuthorDate: Mon Jun 7 14:16:01 2021 +0800
Commit: Olivier Hallot 
CommitDate: Mon Jun 7 14:46:58 2021 +0200

[WIP] tdf#142652 Add glossary entry about half-width ...

...and full-width characters

Change-Id: If12dbc28de60fa7430d02530cf2d7fa7900c6675
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/116771
Tested-by: Olivier Hallot 
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/source/text/shared/00/0005.xhp 
b/source/text/shared/00/0005.xhp
index bc01c9099..a587fe331 100644
--- a/source/text/shared/00/0005.xhp
+++ b/source/text/shared/00/0005.xhp
@@ -120,6 +120,20 @@
Formatting 
refers to the visual layout of text using a word-processing or DTP program. 
This includes defining the paper format, page borders, fonts and font effects, 
as well as indents and spacing. You can format text directly or with Styles 
provided by $[officename].
 
   
+
+  
+
+  half-width;definition
+  halfwidth;definition
+  full-width;definition
+  fullwidth;definition
+
+Half-width and Full-width 
Characters
+Half-width and full-width are properties used to 
differentiate characters used by some East Asian languages and scripts, mainly 
Chinese, Japanese, and Korean (CJK).
+The Han characters, Hiragana and Katakana 
characters, as well as Hangul characters used by these scripts are usually of 
square shape, and on fixed-width (monospace) display they occupy space of two 
Latin/ASCII characters. They are therefore called full-width characters, while 
the letters in Latin alphabet, digits, and punctuation marks included in ASCII 
character set are called half-width characters.
+For historical reasons, a set of square-shaped Latin 
letters, digits, and punctuation marks are also defined and used in CJK 
typography, in addition to or in place of their half-width counterparts. They 
are called full-width forms. Similarly, there are also half-width forms of the 
usually full-width Katakanas and Hangul Jamos, and they have narrower shapes 
instead of square ones. A character's half-width and full-width forms are 
essentially two ways of writing the same character, just like uppercase and 
lowercase forms of Latin alphabet. $[officename] supports conversion between 
half-width and full-width, as well as ignoring width difference when matching 
text strings.
+  
+
   
 
 IME; definition
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-06-07 Thread Eike Rathke (via logerrit)
 i18npool/source/localedata/data/hu_HU.xml |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 8e7a9b0243a4a63841d1cb1faba118274d574053
Author: Eike Rathke 
AuthorDate: Fri Jun 4 13:37:55 2021 +0200
Commit: Eike Rathke 
CommitDate: Mon Jun 7 13:59:54 2021 +0200

Resolves: tdf#142216 Fix {hu-HU} AM/PM words, default time without leading 0

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

diff --git a/i18npool/source/localedata/data/hu_HU.xml 
b/i18npool/source/localedata/data/hu_HU.xml
index 29b8068e23cd..35b2a9cfdda3 100644
--- a/i18npool/source/localedata/data/hu_HU.xml
+++ b/i18npool/source/localedata/data/hu_HU.xml
@@ -47,8 +47,8 @@
   „
   ”
 
-DE
-DU
+de.
+du.
 metric
   
   
@@ -277,10 +277,10 @@
   [NatNum12 ordinal year]
 
 
-  HH:MM
+  H:MM
 
 
-  HH:MM:SS
+  H:MM:SS
 
 
   HH:MM AM/PM
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-06-07 Thread Xisco Fauli (via logerrit)
 sw/qa/extras/htmlexport/xhtmlexport.cxx   |   36 ++
 sw/qa/extras/odfexport/data/tdf142483.odt |binary
 2 files changed, 36 insertions(+)

New commits:
commit d161c4de0b145b975bc90ce4b0a1ff7c234b676e
Author: Xisco Fauli 
AuthorDate: Mon Jun 7 10:45:23 2021 +0200
Commit: Xisco Fauli 
CommitDate: Mon Jun 7 13:38:59 2021 +0200

tdf#142483: sw_xhtmlexport: Add unittest

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

diff --git a/sw/qa/extras/htmlexport/xhtmlexport.cxx 
b/sw/qa/extras/htmlexport/xhtmlexport.cxx
index 4fa48cf77cdb..17efc1607b57 100644
--- a/sw/qa/extras/htmlexport/xhtmlexport.cxx
+++ b/sw/qa/extras/htmlexport/xhtmlexport.cxx
@@ -70,6 +70,42 @@ DECLARE_HTMLEXPORT_TEST(testTdf118637, "tdf118637.odt")
 != -1);
 }
 
+DECLARE_HTMLEXPORT_TEST(testTdf142483, "tdf142483.odt")
+{
+SvStream* pStream = maTempFile.GetStream(StreamMode::READ);
+CPPUNIT_ASSERT(pStream);
+sal_uInt64 nLength = pStream->TellEnd();
+OString aStream(read_uInt8s_ToOString(*pStream, nLength));
+CPPUNIT_ASSERT(
+aStream.indexOf("padding:0.0382in; border-left-width:thin; 
border-left-style:solid; "
+"border-left-color:#00; border-right-style:none; "
+"border-top-width:thin; border-top-style:solid; 
border-top-color:#00; "
+"border-bottom-width:thin; border-bottom-style:solid; "
+"border-bottom-color:#00;")
+!= -1);
+CPPUNIT_ASSERT(
+aStream.indexOf("padding:0.0382in; border-left-width:thin; 
border-left-style:solid; "
+"border-left-color:#00; border-right-style:none; "
+"border-top-style:none; border-bottom-width:thin; "
+"border-bottom-style:solid; 
border-bottom-color:#00;")
+!= -1);
+CPPUNIT_ASSERT(
+aStream.indexOf("border-top-width:thin; border-top-style:solid; 
border-top-color:#00; "
+"border-left-width:thin; border-left-style:solid; "
+"border-left-color:#00; border-bottom-width:thin; "
+"border-bottom-style:solid; 
border-bottom-color:#00; "
+"border-right-width:thin; border-right-style:solid; "
+"border-right-color:#00; padding:0.0382in;")
+!= -1);
+CPPUNIT_ASSERT(
+aStream.indexOf("padding:0.0382in; border-left-width:thin; 
border-left-style:solid; "
+"border-left-color:#00; border-right-width:thin; "
+"border-right-style:solid; border-right-color:#00; 
"
+"border-top-style:none; border-bottom-width:thin; "
+"border-bottom-style:solid; 
border-bottom-color:#00;")
+!= -1);
+}
+
 DECLARE_HTMLEXPORT_TEST(testTdf107696, "tdf107696.odt")
 {
 SvStream* pStream = maTempFile.GetStream(StreamMode::READ);
diff --git a/sw/qa/extras/odfexport/data/tdf142483.odt 
b/sw/qa/extras/odfexport/data/tdf142483.odt
new file mode 100644
index ..d6aba2bbd959
Binary files /dev/null and b/sw/qa/extras/odfexport/data/tdf142483.odt differ
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-06-07 Thread Bartosz Kosiorek (via logerrit)
 emfio/source/reader/wmfreader.cxx |   41 ++
 vcl/source/bitmap/dibtools.cxx|2 -
 2 files changed, 34 insertions(+), 9 deletions(-)

New commits:
commit 6bebaddb39849422dffa16316c543fc69305f31a
Author: Bartosz Kosiorek 
AuthorDate: Sun Jun 6 21:32:47 2021 +0200
Commit: Bartosz Kosiorek 
CommitDate: Mon Jun 7 13:36:57 2021 +0200

WMF tdf#142625 Continue read records if unimlemented features found

Most of DIB records (DIBCREATEPATTERNBRUSH, STRETCHDIB)
are implemented partially. If the unimplemted feature are inside
WMF, then the whole reading steam is interrupted and nothing
is displayed.

With this commit if DIB record used missing feature,
then the warning is displayed, and the displaying continue.

The fix allows for displaying WMF image from tdf#55058

Change-Id: I6cc88d41486c52a2b1a6ec0b89166460a78ce7d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116763
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek 

diff --git a/emfio/source/reader/wmfreader.cxx 
b/emfio/source/reader/wmfreader.cxx
index 7cd98315adef..73d059aa5df3 100644
--- a/emfio/source/reader/wmfreader.cxx
+++ b/emfio/source/reader/wmfreader.cxx
@@ -825,7 +825,7 @@ namespace emfio
 SAL_WARN("emfio", "\t\t Raster operation: 0x" << std::hex << 
nRasterOperation << std::dec);
 if ( nRecordSize == ( ( static_cast< sal_uInt32 >( nFunc ) >> 
8 ) + 3 ) )
 {
-SAL_WARN("emfio", "\t\t TODO The Bitmap record detected 
without Bitmap. This case in not supported. Please fill a bug.");
+SAL_WARN("emfio", "\t\t TODO The unsupported Bitmap record 
(without embedded source Bitmap). Please fill a bug.");
 break;
 }
 mpInputStream->ReadUInt16( nYSrc ).ReadUInt16( nXSrc 
).ReadUInt16( nSye ).ReadUInt16( nSxe );
@@ -893,7 +893,7 @@ namespace emfio
 
 if ( nRecordSize == ( ( static_cast< sal_uInt32 >( nFunc ) >> 
8 ) + 3 ) )
 {
-SAL_WARN("emfio", "\t\t TODO The Bitmap record detected 
without Bitmap. This case in not supported. Please fill a bug.");
+SAL_WARN("emfio", "\t\t TODO The unsupported Bitmap record 
(without embedded source Bitmap). Please fill a bug.");
 break;
 }
 if( nFunc == W_META_STRETCHDIB )
@@ -922,8 +922,25 @@ namespace emfio
 {
 tools::Rectangle aDestRect( ReadYX(), aDestSize );
 if ( nRasterOperation != PATCOPY )
-ReadDIB(aBmp, *mpInputStream, false);
-
+{
+// tdf#142625 Read the DIBHeader and check if 
bitmap is supported
+// If bitmap is not supported don't run ReadDIB, 
as it will interrupt image processing
+const auto nOldPos(mpInputStream->Tell());
+sal_uInt32  nHeaderSize;
+sal_uInt16  nBitCount;
+mpInputStream->ReadUInt32( nHeaderSize );
+if ( nHeaderSize == 0xC ) // BitmapCoreHeader
+mpInputStream->SeekRel( 6 ); // skip Width 
(16), Height (16), Planes (16)
+else
+mpInputStream->SeekRel( 10 ); // skip Width 
(32), Height (32), Planes (16)
+mpInputStream->ReadUInt16( nBitCount );
+if ( nBitCount == 0 ) // TODO Undefined BitCount 
(JPEG/PNG), which are not supported
+break;
+mpInputStream->Seek(nOldPos);
+
+if ( !ReadDIB( aBmp, *mpInputStream, false ) )
+SAL_WARN( "emfio", "\tTODO Read DIB failed. 
Interrupting processing whole image. Please report bug report." );
+}
 // test if it is sensible to crop
 if ( nSrcHeight && nSrcWidth &&
  ( nXSrc + nSrcWidth <= 
aBmp.GetSizePixel().Width() ) &&
@@ -932,6 +949,7 @@ namespace emfio
 tools::Rectangle aCropRect( Point( nXSrc, nYSrc ), 
Size( nSrcWidth, nSrcHeight ) );
 aBmp.Crop( aCropRect );
 }
+
 maBmpSaveList.emplace_back(new BSaveStruct(aBmp, 
aDestRect, nRasterOperation));
 }
 }
@@ -942,11 +960,18 @@ namespace emfio
 {
 Bitmap  aBmp;
 sal_uInt32  nRed = 0, nGreen = 0, nBlue = 0, nCount = 1;
-sal_uInt16  nFunction = 0;
+sal_uInt16  nStyle, nColorUsage;
 
-mpInputStream->ReadUInt16( nFunction ).ReadUInt16( nFunct

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - include/svx oox/source sd/qa svx/source

2021-06-07 Thread Mike Kaganski (via logerrit)
 include/svx/svdotext.hxx   |2 -
 oox/source/export/drawingml.cxx|5 --
 sd/qa/unit/export-tests-ooxml2.cxx |5 +-
 svx/source/svdraw/svdotext.cxx |   65 +++--
 svx/source/unodraw/unoshape.cxx|9 -
 5 files changed, 12 insertions(+), 74 deletions(-)

New commits:
commit 4e42d99169a1e609b73d102b2947fd09d8e6ea13
Author: Mike Kaganski 
AuthorDate: Sun Jun 6 21:50:53 2021 +0300
Commit: Mike Kaganski 
CommitDate: Mon Jun 7 13:31:38 2021 +0200

Fix and unify the two methods that get scaled text size

GetTextFitToSizeScale and SdrTextObj::GetFontScaleY both didn't
initialize outliners properly, and thus returned wrong results.

Change-Id: I6fe63c51ed838a0d0fafdfa03597cac97ce29831
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116765
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit a1ae30166e92a0a40dff06740f0bb8e9ee63f70a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116704
Tested-by: Jenkins CollaboraOffice 

diff --git a/include/svx/svdotext.hxx b/include/svx/svdotext.hxx
index 9d74bffec93e..3911759b82fe 100644
--- a/include/svx/svdotext.hxx
+++ b/include/svx/svdotext.hxx
@@ -389,7 +389,7 @@ public:
 // FitToSize and Fontwork are not taken into account in GetTextSize()!
 virtual const Size& GetTextSize() const;
 void FitFrameToTextSize();
-double GetFontScaleY() const;
+sal_uInt16 GetFontScaleY() const;
 
 // Simultaneously sets the text into the Outliner (possibly
 // the one of the EditOutliner) and sets the PaperSize.
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 8cfd4a6dabc5..fcd93e0b6df2 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -3229,10 +3229,7 @@ void DrawingML::WriteText(const Reference& 
rXIface, bool bBodyPr, bo
 {
 SdrTextObj* pTextObject = 
dynamic_cast(pTextShape->GetSdrObject());
 if (pTextObject)
-{
-double fScaleY = pTextObject->GetFontScaleY();
-nFontScale = static_cast(fScaleY * 100) * 
1000;
-}
+nFontScale = pTextObject->GetFontScaleY() * 1000;
 }
 
 mpFS->singleElementNS(XML_a, XML_normAutofit, XML_fontScale,
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx 
b/sd/qa/unit/export-tests-ooxml2.cxx
index ef74eb9a4850..c17820ea318b 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -1861,10 +1861,9 @@ void SdOOXMLExportTest2::testFontScale()
 xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
 xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, 
"ppt/slides/slide1.xml");
 
-// Rounding errors possible, approximate value
+// Rounding errors possible, approximate value (+/- 1%)
 OUString sScale = getXPath(pXmlDocContent, 
"/p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:bodyPr/a:normAutofit", "fontScale");
-if (sScale != "73000" && sScale != "72000" && sScale != "74000")
-CPPUNIT_ASSERT_EQUAL(OUString("73000"), sScale);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(76000), sScale.toInt32(), 1000);
 
 xDocShRef->DoClose();
 }
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 0daeb7cc9a5d..1894c9c94d78 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -51,6 +51,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace com::sun::star;
 
@@ -1188,67 +1189,15 @@ void SdrTextObj::ImpSetupDrawOutlinerForPaint( bool 
bContourFrame,
 }
 }
 
-double SdrTextObj::GetFontScaleY() const
+sal_uInt16 SdrTextObj::GetFontScaleY() const
 {
-SdrText* pText = getActiveText();
-if (pText == nullptr || !pText->GetOutlinerParaObject())
-return 1.0;
-
 SdrOutliner& rOutliner = ImpGetDrawOutliner();
-const Size aShapeSize = GetSnapRect().GetSize();
-const Size aSize(aShapeSize.Width() - GetTextLeftDistance() - 
GetTextRightDistance(),
-aShapeSize.Height() - GetTextUpperDistance() - GetTextLowerDistance());
-
-rOutliner.SetPaperSize(aSize);
-rOutliner.SetUpdateMode(true);
-rOutliner.SetText(*pText->GetOutlinerParaObject());
-bool bIsVerticalWriting = IsVerticalWriting();
-
-// Algorithm from SdrTextObj::ImpAutoFitText
-
-sal_uInt16 nMinStretchX = 0, nMinStretchY = 0;
-sal_uInt16 nCurrStretchX = 100, nCurrStretchY = 100;
-sal_uInt16 aOldStretchXVals[] = { 0,0,0 };
-const size_t aStretchArySize = SAL_N_ELEMENTS(aOldStretchXVals);
-for (unsigned int i = 0; i= 1.0)
-{
-nMinStretchX = std::max(nMinStretchX, nCurrStretchX);
-nMinStretchY = std::max(nMinStretchY, nCurrStretchY);
-}
-
-aOldStretchXVals[i] = nCurrStretchX;
-if (std::find(aOldStretchXVals, aOldStretchXVals

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

2021-06-07 Thread Vasily Melenchuk (via logerrit)
 sw/source/filter/ww8/wrtw8num.cxx |   32 +---
 1 file changed, 17 insertions(+), 15 deletions(-)

New commits:
commit 3ffc5df4e17068319bd6ed0c854d92a702ef326a
Author: Vasily Melenchuk 
AuthorDate: Mon Jun 7 10:59:15 2021 +0200
Commit: Thorsten Behrens 
CommitDate: Mon Jun 7 13:19:16 2021 +0200

sw: WriteLong/Short -> SvStream::Write[U]Int[16|32]

Change-Id: I1c09a3bbf301166ccab16ecf0b57f22a335e0791
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116778
Reviewed-by: Vasily Melenchuk 
Reviewed-by: Thorsten Behrens 
Tested-by: Jenkins

diff --git a/sw/source/filter/ww8/wrtw8num.cxx 
b/sw/source/filter/ww8/wrtw8num.cxx
index ae39db153a1d..6cb95976c655 100644
--- a/sw/source/filter/ww8/wrtw8num.cxx
+++ b/sw/source/filter/ww8/wrtw8num.cxx
@@ -178,7 +178,7 @@ void WW8Export::WriteNumbering()
 
 // list formats - LSTF
 pFib->m_fcPlcfLst = pTableStrm->Tell();
-SwWW8Writer::WriteShort( *pTableStrm, m_pUsedNumTable->size() );
+pTableStrm->WriteUInt16( m_pUsedNumTable->size() );
 NumberingDefinitions();
 // set len to FIB
 pFib->m_lcbPlcfLst = pTableStrm->Tell() - pFib->m_fcPlcfLst;
@@ -195,12 +195,12 @@ void WW8Export::WriteNumbering()
 
 void WW8AttributeOutput::NumberingDefinition( sal_uInt16 nId, const SwNumRule 
&rRule )
 {
-SwWW8Writer::WriteLong( *m_rWW8Export.pTableStrm, nId );
-SwWW8Writer::WriteLong( *m_rWW8Export.pTableStrm, nId );
+m_rWW8Export.pTableStrm->WriteUInt32( nId );
+m_rWW8Export.pTableStrm->WriteUInt32( nId );
 
 // not associated with a Style
 for ( int i = 0; i < WW8ListManager::nMaxLevel; ++i )
-SwWW8Writer::WriteShort( *m_rWW8Export.pTableStrm, 0xFFF );
+m_rWW8Export.pTableStrm->WriteUInt16( 0xFFF );
 
 sal_uInt8 nFlags = 0;
 if ( rRule.IsContinusNum() )
@@ -308,7 +308,7 @@ void WW8AttributeOutput::NumberingLevel( sal_uInt8 
/*nLevel*/,
 )
 {
 // Start value
-SwWW8Writer::WriteLong( *m_rWW8Export.pTableStrm, nStart );
+m_rWW8Export.pTableStrm->WriteUInt32( nStart );
 
 // Type
 m_rWW8Export.pTableStrm->WriteUChar( GetLevelNFC( nNumberingType ,pOutSet) 
);
@@ -337,8 +337,8 @@ void WW8AttributeOutput::NumberingLevel( sal_uInt8 
/*nLevel*/,
 m_rWW8Export.pTableStrm->WriteUChar( nFollow );
 
 // dxaSoace/dxaIndent (Word 6 compatibility)
-SwWW8Writer::WriteLong( *m_rWW8Export.pTableStrm, 0 );
-SwWW8Writer::WriteLong( *m_rWW8Export.pTableStrm, 0 );
+m_rWW8Export.pTableStrm->WriteUInt32( 0 );
+m_rWW8Export.pTableStrm->WriteUInt32( 0 );
 
 // cbGrpprlChpx
 std::unique_ptr pCharAtrs;
@@ -384,7 +384,7 @@ void WW8AttributeOutput::NumberingLevel( sal_uInt8 
/*nLevel*/,
 m_rWW8Export.pTableStrm->WriteUChar( sal_uInt8( sizeof( aPapSprms ) ) );
 
 // reserved
-SwWW8Writer::WriteShort( *m_rWW8Export.pTableStrm, 0 );
+m_rWW8Export.pTableStrm->WriteUInt16( 0 );
 
 // pap sprms
 sal_uInt8* pData = aPapSprms + 2;
@@ -401,7 +401,7 @@ void WW8AttributeOutput::NumberingLevel( sal_uInt8 
/*nLevel*/,
 m_rWW8Export.pTableStrm->WriteBytes(pCharAtrs->data(), 
pCharAtrs->size());
 
 // write the num string
-SwWW8Writer::WriteShort( *m_rWW8Export.pTableStrm, 
rNumberingString.getLength() );
+m_rWW8Export.pTableStrm->WriteUInt16( rNumberingString.getLength() );
 SwWW8Writer::WriteString16( *m_rWW8Export.pTableStrm, rNumberingString, 
false );
 }
 
@@ -621,15 +621,17 @@ void WW8Export::OutOverrideListTab()
 sal_uInt16 n;
 
 pFib->m_fcPlfLfo = pTableStrm->Tell();
-SwWW8Writer::WriteLong( *pTableStrm, nCount );
+pTableStrm->WriteUInt32( nCount );
 
+// LFO ([MS-DOC] 2.9.131)
 for( n = 0; n < nCount; ++n )
 {
-SwWW8Writer::WriteLong( *pTableStrm, n + 1 );
+pTableStrm->WriteUInt32( n + 1 );
 SwWW8Writer::FillCount( *pTableStrm, 12 );
 }
+// LFOData ([MS-DOC] 2.9.132)
 for( n = 0; n < nCount; ++n )
-SwWW8Writer::WriteLong( *pTableStrm, -1 );  // no overwrite
+pTableStrm->WriteInt32( -1 );  // no overwrite
 
 // set len to FIB
 pFib->m_lcbPlfLfo = pTableStrm->Tell() - pFib->m_fcPlfLfo;
@@ -644,8 +646,8 @@ void WW8Export::OutListNamesTab()
 sal_uInt16 nNms = 0, nCount = m_pUsedNumTable->size();
 
 pFib->m_fcSttbListNames = pTableStrm->Tell();
-SwWW8Writer::WriteShort( *pTableStrm, -1 );
-SwWW8Writer::WriteLong( *pTableStrm, nCount );
+pTableStrm->WriteInt16( -1 );
+pTableStrm->WriteUInt32( nCount );
 
 for( ; nNms < nCount; ++nNms )
 {
@@ -654,7 +656,7 @@ void WW8Export::OutListNamesTab()
 if( !rRule.IsAutoRule() )
 sNm = rRule.GetName();
 
-SwWW8Writer::WriteShort( *pTableStrm, sNm.getLength() );
+pTableStrm->WriteUInt16( sNm.getLength() );
 if (!sNm.isEmpty())
 SwWW8Writer::WriteString16(*pTableStrm, sNm, false);
 }
___
Libreoffice-commits mailing list
libreoffic

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

2021-06-07 Thread Tomaž Vajngerl (via logerrit)
 sd/source/ui/view/Outliner.cxx |   12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)

New commits:
commit db6efbaf5f9d6ae818afccec6a9fab219268b621
Author: Tomaž Vajngerl 
AuthorDate: Sun Jun 6 20:55:28 2021 +0900
Commit: Michael Stahl 
CommitDate: Mon Jun 7 13:03:47 2021 +0200

tdf#142478 fix crash when searching and a viewshell change occurs

When searching a impress document for a word, and the word is in
notes as welll as in the document, a crash happens (only when
searching with "find all"). The regressing commit changed that the
search is now bound to a view (and to a viewshell). When searching
for words in notes and document, at the transition from "standard"
to "notes" page kind mode, the view and viewshells are destroyed
and the new one created again. The problem lies here as when we
destroy the viewshell, we also destroy the search context and
FuSearch objects, but we are still executing the search -> crash.

The solution for this is that when we change the page kind,
we take the FuSearch object from the old viewshell and put it
into the newly created viewshell, so that we keep the FuSearch
object alive and don't throw away the search context too.

Change-Id: I50931cca2a20c5704f7450e3cc8b3466af4c5a3e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116758
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit 3b75f9add7ed80e803b0771d86892d6ca0f47e71)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116703
Reviewed-by: Michael Stahl 

diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index 59e740b4bda1..70df0bd17bfe 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -61,6 +61,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -1550,6 +1551,11 @@ void SdOutliner::SetViewMode (PageKind ePageKind)
 bool bMatchMayExist = mbMatchMayExist;
 
 sd::ViewShellBase& rBase = pViewShell->GetViewShellBase();
+
+rtl::Reference xFuSearch;
+if (pViewShell->GetView())
+xFuSearch = 
pViewShell->GetView()->getSearchContext().getFunctionSearch();
+
 SetViewShell(std::shared_ptr());
 sd::framework::FrameworkHelper::Instance(rBase)->RequestView(
 sViewURL,
@@ -1560,7 +1566,11 @@ void SdOutliner::SetViewMode (PageKind ePageKind)
 // instead.  But that would involve major restructuring of the
 // Outliner code.
 
sd::framework::FrameworkHelper::Instance(rBase)->RequestSynchronousUpdate();
-SetViewShell(rBase.GetMainViewShell());
+
+auto pNewViewShell = rBase.GetMainViewShell();
+SetViewShell(pNewViewShell);
+if (xFuSearch.is() && pNewViewShell->GetView())
+
pNewViewShell->GetView()->getSearchContext().setSearchFunction(xFuSearch);
 
 // Switching to another view shell has intermediatly called
 // EndSpelling().  A PrepareSpelling() is pending, so call that now.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-06-07 Thread Julien Nabet (via logerrit)
 canvas/qa/cppunit/canvastest.cxx   |7 +-
 canvas/source/cairo/cairo_canvashelper.cxx |   26 +---
 canvas/source/directx/dx_impltools.cxx |   15 ++
 canvas/workben/canvasdemo.cxx  |   31 +
 4 files changed, 37 insertions(+), 42 deletions(-)

New commits:
commit 87e8d5ec6bb2fa332d2c374040d39ca18462cb6f
Author: Julien Nabet 
AuthorDate: Fri Jun 4 22:19:30 2021 +0200
Commit: Julien Nabet 
CommitDate: Mon Jun 7 12:58:48 2021 +0200

Simplify Sequences initializations (canvas)

Change-Id: I651858d71e378341205d6a785bd97f294664a439
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116737
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/canvas/qa/cppunit/canvastest.cxx b/canvas/qa/cppunit/canvastest.cxx
index 993983377d08..5414a757d3c3 100644
--- a/canvas/qa/cppunit/canvastest.cxx
+++ b/canvas/qa/cppunit/canvastest.cxx
@@ -114,11 +114,8 @@ public:
 mRenderState.AffineTransform = geometry::AffineMatrix2D(2, 0, 0, 0, 2, 
0);
 mViewState.AffineTransform = geometry::AffineMatrix2D(5, 0, 0, 0, 5, 
0);
 
-uno::Sequence points(2);
-points[0] = geometry::RealPoint2D(10, 5);
-points[1] = geometry::RealPoint2D(88, 5);
-uno::Sequence> polygonPoints(1);
-polygonPoints[0] = points;
+uno::Sequence> polygonPoints{ { { 
10, 5 },
+ { 
88, 5 } } };
 uno::Reference polygon
 = mDevice->createCompatibleLinePolyPolygon(polygonPoints);
 polygon->setClosed(0, false);
diff --git a/canvas/source/cairo/cairo_canvashelper.cxx 
b/canvas/source/cairo/cairo_canvashelper.cxx
index 2711634e9948..f9e197d3447a 100644
--- a/canvas/source/cairo/cairo_canvashelper.cxx
+++ b/canvas/source/cairo/cairo_canvashelper.cxx
@@ -404,23 +404,25 @@ namespace cairocanvas
 {
 if( rLeft.getLength() == 3 )
 {
-uno::Sequence aRes(3);
-aRes[0] = basegfx::utils::lerp(rLeft[0],rRight[0],fAlpha);
-aRes[1] = basegfx::utils::lerp(rLeft[1],rRight[1],fAlpha);
-aRes[2] = basegfx::utils::lerp(rLeft[2],rRight[2],fAlpha);
-return aRes;
+return
+{
+basegfx::utils::lerp(rLeft[0],rRight[0],fAlpha),
+basegfx::utils::lerp(rLeft[1],rRight[1],fAlpha),
+basegfx::utils::lerp(rLeft[2],rRight[2],fAlpha)
+};
 }
 else if( rLeft.getLength() == 4 )
 {
-uno::Sequence aRes(4);
-aRes[0] = basegfx::utils::lerp(rLeft[0],rRight[0],fAlpha);
-aRes[1] = basegfx::utils::lerp(rLeft[1],rRight[1],fAlpha);
-aRes[2] = basegfx::utils::lerp(rLeft[2],rRight[2],fAlpha);
-aRes[3] = basegfx::utils::lerp(rLeft[3],rRight[3],fAlpha);
-return aRes;
+return
+{
+basegfx::utils::lerp(rLeft[0],rRight[0],fAlpha),
+basegfx::utils::lerp(rLeft[1],rRight[1],fAlpha),
+basegfx::utils::lerp(rLeft[2],rRight[2],fAlpha),
+basegfx::utils::lerp(rLeft[3],rRight[3],fAlpha)
+};
 }
 
-return uno::Sequence();
+return {};
 }
 
 static cairo_pattern_t* patternFromParametricPolyPolygon( 
::canvas::ParametricPolyPolygon const & rPolygon )
diff --git a/canvas/source/directx/dx_impltools.cxx 
b/canvas/source/directx/dx_impltools.cxx
index 27b98364bad1..7f464a8515b9 100644
--- a/canvas/source/directx/dx_impltools.cxx
+++ b/canvas/source/directx/dx_impltools.cxx
@@ -349,14 +349,13 @@ namespace dxcanvas::tools
 uno::Sequence< sal_Int8 > argbToIntSequence( Gdiplus::ARGB rColor )
 {
 // TODO(F1): handle color space conversions, when defined on 
canvas/graphicDevice
-uno::Sequence< sal_Int8 > aRet(4);
-
-aRet[0] = static_cast((rColor >> 16) & 0xFF); // red
-aRet[1] = static_cast((rColor >> 8) & 0xFF);  // green
-aRet[2] = static_cast(rColor & 0xFF); // blue
-aRet[3] = static_cast((rColor >> 24) & 0xFF); // alpha
-
-return aRet;
+return
+{
+static_cast((rColor >> 16) & 0xFF), // red
+static_cast((rColor >> 8) & 0xFF),  // green
+static_cast(rColor & 0xFF), // blue
+static_cast((rColor >> 24) & 0xFF)  // alpha
+};
 }
 
 Gdiplus::ARGB sequenceToArgb( const uno::Sequence< sal_Int8 >& rColor )
diff --git a/canvas/workben/canvasdemo.cxx b/canvas/workben/canvasdemo.cxx
index 9d48b84132d6..85791072d860 100644
--- a/canvas/workben/canvasdemo.cxx
+++ b/canvas/workben/canvasdemo.cxx
@@ -38,6 +38,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -155,17 +156,16 @@ class DemoRenderer
 
 void drawRect( tools::Re

[Libreoffice-commits] core.git: Branch 'distro/vector/vector-7.0' - 8 commits - drawinglayer/source include/svx include/vcl svx/source sw/inc sw/qa sw/source vcl/source

2021-06-07 Thread Miklos Vajna (via logerrit)
 drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx |   25 
 include/svx/svdxcgv.hxx  |2 
 include/vcl/vectorgraphicdata.hxx|5 
 svx/source/svdraw/svdxcgv.cxx|   14 
 sw/inc/frmfmt.hxx|6 
 sw/qa/extras/htmlexport/htmlexport.cxx   |  363 ++-
 sw/source/core/layout/paintfrm.cxx   |8 
 sw/source/filter/html/README |   42 +
 sw/source/filter/html/htmlflywriter.cxx  |  237 +--
 sw/source/filter/html/htmlplug.cxx   |5 
 sw/source/filter/html/wrthtml.cxx|   18 
 sw/source/filter/html/wrthtml.hxx|9 
 vcl/source/gdi/vectorgraphicdata.cxx |   14 
 13 files changed, 634 insertions(+), 114 deletions(-)

New commits:
commit 506054ed260e27717783b33bafd8289ba5e0d573
Author: Miklos Vajna 
AuthorDate: Fri Jun 4 15:58:01 2021 +0200
Commit: Miklos Vajna 
CommitDate: Mon Jun 7 10:50:22 2021 +0200

sw HTML export: allow custom DPI for the bitmaps of shapes

But leave the CSS pixel size of them unchanged in the HTML markup.

Also add some documentation on the various options, so one doesn't have
to dig them out from testcases.

(cherry picked from commit 04716690f6c5193f15868bc71e7d17c53e085a54)

Conflicts:
include/vcl/vectorgraphicdata.hxx
sw/qa/extras/htmlexport/htmlexport.cxx
sw/source/core/layout/paintfrm.cxx
vcl/source/gdi/vectorgraphicdata.cxx

Change-Id: I6c6ee4e9c98d674f44e7c5835f2e6a6737e13f34

diff --git a/include/svx/svdxcgv.hxx b/include/svx/svdxcgv.hxx
index ea96eefe180d..0afaa7c6ad6f 100644
--- a/include/svx/svdxcgv.hxx
+++ b/include/svx/svdxcgv.hxx
@@ -58,7 +58,7 @@ public:
 
 // Draw all marked objects onto a bitmap, with the display's color depth
 // and resolution
-BitmapEx GetMarkedObjBitmapEx(bool bNoVDevIfOneBmpMarked = false) const;
+BitmapEx GetMarkedObjBitmapEx(bool bNoVDevIfOneBmpMarked = false, const 
std::optional& rTargetDPI = std::nullopt) const;
 
 // Copy all marked objects to a new model, consisting of exactly one page,
 // with the flag PageNotValid set. This means, that only the page's objects
diff --git a/include/vcl/vectorgraphicdata.hxx 
b/include/vcl/vectorgraphicdata.hxx
index 6eefa0e9804e..18c4b36615e7 100644
--- a/include/vcl/vectorgraphicdata.hxx
+++ b/include/vcl/vectorgraphicdata.hxx
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 
 namespace com::sun::star::graphic { class XPrimitive2D; }
 struct WmfExternal;
@@ -41,7 +42,8 @@ BitmapEx VCL_DLLPUBLIC convertPrimitive2DSequenceToBitmapEx(
 const std::deque< css::uno::Reference< css::graphic::XPrimitive2D > >& 
rSequence,
 const basegfx::B2DRange& rTargetRange,
 const sal_uInt32 nMaximumQuadraticPixels = 50,
-const MapUnit eTargetUnit = MapUnit::Map100thMM);
+const MapUnit eTargetUnit = MapUnit::Map100thMM,
+const std::optional& rTargetDPI = std::nullopt);
 
 
 enum class VectorGraphicDataType
diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx
index f1852e712ec4..a576b8ee4ab0 100644
--- a/svx/source/svdraw/svdxcgv.cxx
+++ b/svx/source/svdraw/svdxcgv.cxx
@@ -425,7 +425,7 @@ void SdrExchangeView::ImpPasteObject(SdrObject* pObj, 
SdrObjList& rLst, const Po
 }
 }
 
-BitmapEx SdrExchangeView::GetMarkedObjBitmapEx(bool bNoVDevIfOneBmpMarked) 
const
+BitmapEx SdrExchangeView::GetMarkedObjBitmapEx(bool bNoVDevIfOneBmpMarked, 
const std::optional& rTargetDPI) const
 {
 BitmapEx aBmp;
 
@@ -503,7 +503,8 @@ BitmapEx SdrExchangeView::GetMarkedObjBitmapEx(bool 
bNoVDevIfOneBmpMarked) const
 xPrimitives,
 aRange,
 /*nMaximumQuadraticPixels=*/ 50,
-eRangeUnit);
+eRangeUnit,
+rTargetDPI);
 }
 }
 }
diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx
index d739925f81f4..e2cb600f2673 100644
--- a/sw/inc/frmfmt.hxx
+++ b/sw/inc/frmfmt.hxx
@@ -115,7 +115,7 @@ public:
 /// Creates the views.
 virtual void MakeFrames();
 
-virtual Graphic MakeGraphic( ImageMap* pMap = nullptr );
+virtual Graphic MakeGraphic( ImageMap* pMap = nullptr, const 
std::optional& rTargetDPI = std::nullopt );
 
 /**  @return the IMapObject defined at format (Fly)
 in the ImageMap at position Point.
@@ -210,7 +210,7 @@ public:
 
 SwAnchoredObject* GetAnchoredObj() const;
 
-virtual Graphic MakeGraphic( ImageMap* pMap = nullptr ) override;
+virtual Graphic MakeGraphic( ImageMap* pMap = nullptr, const 
std::optional& rTargetDPI = std::nullopt ) override;
 
 virtual bool GetInfo( SfxPoolI

[Libreoffice-commits] core.git: extras/CustomTarget_tpldraw.mk extras/Package_tpldraw.mk

2021-06-07 Thread Tomaž Vajngerl (via logerrit)
 extras/CustomTarget_tpldraw.mk |   12 ++--
 extras/Package_tpldraw.mk  |2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit e9a824dd6c1c33777461874d9892343d193c867d
Author: Tomaž Vajngerl 
AuthorDate: Mon Jun 7 17:06:13 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Mon Jun 7 12:25:29 2021 +0200

tdf#127028 "bpmn" template should have ext. otg instead of ott

"bpmn" is an template for draw documents and not text documents
(writer) so it should have the extension otg and not ott. This is
also important for the template manager as it categorises the
templates based on the extension, so the bpmn was not categorised
correctly.

Change-Id: I503b972711830dc3c5ab98d9c24f974862ffc540
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116775
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/extras/CustomTarget_tpldraw.mk b/extras/CustomTarget_tpldraw.mk
index 69e1f63848b7..ec878697f55a 100644
--- a/extras/CustomTarget_tpldraw.mk
+++ b/extras/CustomTarget_tpldraw.mk
@@ -25,7 +25,7 @@ extras_DRAW_MIMETYPEFILES := $(foreach 
atexts,$(extras_TEMPLATES_DRAW),$(atexts)
 
 
 $(call gb_CustomTarget_get_target,extras/source/templates/draw) : \
-   $(foreach atexts,$(extras_TEMPLATES_DRAW),$(call 
gb_CustomTarget_get_workdir,extras/source/templates/draw)/$(atexts).ott)
+   $(foreach atexts,$(extras_TEMPLATES_DRAW),$(call 
gb_CustomTarget_get_workdir,extras/source/templates/draw)/$(atexts).otg)
 
 $(call gb_CustomTarget_get_workdir,extras/source/templates/draw)/%/mimetype : 
$(SRCDIR)/extras/source/templates/draw/%/mimetype
$(call gb_Output_announce,templates/draw/$*/mimetype,$(true),CPY,1)
@@ -70,15 +70,15 @@ $(call 
gb_CustomTarget_get_workdir,extras/source/templates/draw)/%.xml : $(SRCDI
$(call gb_ExternalExecutable_get_command,xsltproc) --nonet -o $@ 
$(SRCDIR)/extras/util/compact.xsl $<
$(call gb_Trace_EndRange,templates/draw/$*.xml,XSL)
 
-$(call gb_CustomTarget_get_workdir,extras/source/templates/draw)/%.ott :
-   $(call gb_Output_announce,templates/draw/$*.ott,$(true),ZIP,2)
-   $(call gb_Trace_StartRange,templates/draw/$*.ott,ZIP)
+$(call gb_CustomTarget_get_workdir,extras/source/templates/draw)/%.otg :
+   $(call gb_Output_announce,templates/draw/$*.otg,$(true),ZIP,2)
+   $(call gb_Trace_StartRange,templates/draw/$*.otg,ZIP)
$(call gb_Helper_abbreviate_dirs,\
cd $(EXTRAS_DRAW_DIR) && \
zip -q0X --filesync --must-match $@ 
$(EXTRAS_DRAW_MIMEFILES_FILTER) && \
zip -qrX --must-match $@ $(EXTRAS_DRAW_XMLFILES_FILTER) \
)
-   $(call gb_Trace_EndRange,templates/draw/$*.ott,ZIP)
+   $(call gb_Trace_EndRange,templates/draw/$*.otg,ZIP)
 
 define extras_Tpldraw_make_file_deps
 $(call gb_CustomTarget_get_workdir,$(1))/$(2) : $(SRCDIR)/$(1)/$(2) \
@@ -105,7 +105,7 @@ $(eval $(foreach file,$(extras_DRAW_MIMETYPEFILES) 
$(extras_DRAW_XMLFILES),\
 ))
 
 $(eval $(foreach atexts,$(extras_TEMPLATES_DRAW),\
-   $(call 
extras_Tpldraw_make_zip_deps,extras/source/templates/draw,$(atexts).ott,$(atexts))
 \
+   $(call 
extras_Tpldraw_make_zip_deps,extras/source/templates/draw,$(atexts).otg,$(atexts))
 \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/extras/Package_tpldraw.mk b/extras/Package_tpldraw.mk
index b6d72e3eb595..05f03deabc10 100644
--- a/extras/Package_tpldraw.mk
+++ b/extras/Package_tpldraw.mk
@@ -10,7 +10,7 @@
 $(eval $(call gb_Package_Package,extras_tpldraw,$(call 
gb_CustomTarget_get_workdir,extras/source/templates/draw)))
 
 $(eval $(call 
gb_Package_add_files,extras_tpldraw,$(LIBO_SHARE_FOLDER)/template/common/draw,\
-   bpmn.ott \
+bpmn.otg \
 ))
 
 # vim: set noet sw=4 ts=4:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-06-07 Thread Gabor Kelemen (via logerrit)
 bin/find-unneeded-includes |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 996694d78641df4b2adb5357e6e274a9f9e8ca46
Author: Gabor Kelemen 
AuthorDate: Sat Jun 5 16:07:53 2021 +0200
Commit: Miklos Vajna 
CommitDate: Mon Jun 7 12:06:03 2021 +0200

find-unneeded-includes: fix YAMLLoadWarning on newer systems

After upgrading to Ubuntu 20.04 I got this warning:
YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as 
the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full 
details.

Change f-u-i per instructions on website above to fix this warning.

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

diff --git a/bin/find-unneeded-includes b/bin/find-unneeded-includes
index 65f791101d90..4f90ab55e9f5 100755
--- a/bin/find-unneeded-includes
+++ b/bin/find-unneeded-includes
@@ -260,7 +260,7 @@ def tidy(compileCommands, paths):
 rulePath = os.path.join(moduleName, "IwyuFilter_" + moduleName + 
".yaml")
 moduleRules = {}
 if os.path.exists(rulePath):
-moduleRules = yaml.load(open(rulePath))
+moduleRules = yaml.full_load(open(rulePath))
 assume = None
 pathAbs = os.path.abspath(path)
 compileFile = pathAbs
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Calc's ENCODEURL, FILTERXML and WEBSERVICE functions

2021-06-07 Thread Steve Fanning

Hello All,

Please could somebody with technical knowledge of these three functions 
help me?


I have been upgrading their descriptions in the Calc Functions Wiki area 
(https://wiki.documentfoundation.org/Documentation/Calc_Functions/ENCODEURL, 
https://wiki.documentfoundation.org/Documentation/Calc_Functions/FILTERXML 
and 
https://wiki.documentfoundation.org/Documentation/Calc_Functions/WEBSERVICE).


I am not an expert on these functions but have extended the descriptions 
beyond the explanations given in the Help by a combination of code 
inspection and experimentation.


Would it be possible for somebody who has expertise in this area to 
review these three wiki pages from a technical perspective? Is what I 
have written technically correct? Have I missed anything that might be 
significant to a user who is looking for more background? (Please don't 
think I'm looking for somebody to find typos - there may be some, but we 
can resolve those without wasting any of a developer's valuable time!)


On a specific point, do we need to declare the versions of XML and XPath 
that are relevant for FILTERXML? If so, can somebody confirm what they are?


Thanks in advance.

Regards,

Steve Fanning (LibreOffice Documentation Team)


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


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

2021-06-07 Thread Miklos Vajna (via logerrit)
 sw/source/filter/html/htmlatr.cxx |   25 -
 sw/source/filter/html/htmlfly.cxx |   30 +++---
 sw/source/filter/html/htmlfly.hxx |   26 +-
 sw/source/filter/html/parcss1.cxx |2 +-
 sw/source/filter/html/parcss1.hxx |   16 
 sw/source/filter/html/svxcss1.cxx |4 ++--
 sw/source/filter/html/svxcss1.hxx |   12 ++--
 7 files changed, 57 insertions(+), 58 deletions(-)

New commits:
commit cc99d43295322a2d6b4abc9b9a8f2e03e3db89f2
Author: Miklos Vajna 
AuthorDate: Mon Jun 7 09:00:36 2021 +0200
Commit: Miklos Vajna 
CommitDate: Mon Jun 7 11:27:47 2021 +0200

sw: prefix members of CSS1Selector, HTMLStartEndPos, SvxCSS1MapEntry and ...

... SwHTMLPosFlyFrame

See tdf#94879 for motivation.

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

diff --git a/sw/source/filter/html/htmlatr.cxx 
b/sw/source/filter/html/htmlatr.cxx
index b3d56597ebf7..935c1db9e92e 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -1029,30 +1029,29 @@ namespace {
 
 class HTMLStartEndPos
 {
-sal_Int32 nStart;
-sal_Int32 nEnd;
-std::unique_ptr pItem;
+sal_Int32 m_nStart;
+sal_Int32 m_nEnd;
+std::unique_ptr m_pItem;
 
 public:
 
 HTMLStartEndPos( const SfxPoolItem& rItem, sal_Int32 nStt, sal_Int32 nE );
 
-const SfxPoolItem *GetItem() const { return pItem.get(); }
+const SfxPoolItem* GetItem() const { return m_pItem.get(); }
 
-void SetStart( sal_Int32 nStt ) { nStart = nStt; }
-sal_Int32 GetStart() const { return nStart; }
+void SetStart(sal_Int32 nStt) { m_nStart = nStt; }
+sal_Int32 GetStart() const { return m_nStart; }
 
-sal_Int32 GetEnd() const { return nEnd; }
-void SetEnd( sal_Int32 nE ) { nEnd = nE; }
+sal_Int32 GetEnd() const { return m_nEnd; }
+void SetEnd(sal_Int32 nE) { m_nEnd = nE; }
 };
 
 }
 
-HTMLStartEndPos::HTMLStartEndPos( const SfxPoolItem& rItem, sal_Int32 nStt,
-sal_Int32 nE ) :
-nStart( nStt ),
-nEnd( nE ),
-pItem( rItem.Clone() )
+HTMLStartEndPos::HTMLStartEndPos(const SfxPoolItem& rItem, sal_Int32 nStt, 
sal_Int32 nE)
+: m_nStart(nStt)
+, m_nEnd(nE)
+, m_pItem(rItem.Clone())
 {}
 
 typedef std::vector HTMLStartEndPositions;
diff --git a/sw/source/filter/html/htmlfly.cxx 
b/sw/source/filter/html/htmlfly.cxx
index 771a449ec90a..df8eb9116ccc 100644
--- a/sw/source/filter/html/htmlfly.cxx
+++ b/sw/source/filter/html/htmlfly.cxx
@@ -33,12 +33,12 @@ using namespace css;
 SwHTMLPosFlyFrame::SwHTMLPosFlyFrame( const SwPosFlyFrame& rPosFly,
   const SdrObject *pSdrObj,
   AllHtmlFlags nFlags ) :
-pFrameFormat( &rPosFly.GetFormat() ),
-pSdrObject( pSdrObj ),
-pNdIdx( new SwNodeIndex( rPosFly.GetNdIndex() ) ),
-nOrdNum( rPosFly.GetOrdNum() ),
-nContentIdx( 0 ),
-nAllFlags( nFlags )
+m_pFrameFormat( &rPosFly.GetFormat() ),
+m_pSdrObject( pSdrObj ),
+m_pNodeIdex( new SwNodeIndex( rPosFly.GetNdIndex() ) ),
+m_nOrdNum( rPosFly.GetOrdNum() ),
+m_nContentIndex( 0 ),
+m_nAllFlags( nFlags )
 {
 const SwFormatAnchor& rAnchor = rPosFly.GetFormat().GetAnchor();
 if ((RndStdIds::FLY_AT_CHAR != rAnchor.GetAnchorId()) ||
@@ -51,34 +51,34 @@ SwHTMLPosFlyFrame::SwHTMLPosFlyFrame( const SwPosFlyFrame& 
rPosFly,
 if( !rAnchor.GetContentAnchor() )
 return;
 
-nContentIdx = rAnchor.GetContentAnchor()->nContent.GetIndex();
+m_nContentIndex = rAnchor.GetContentAnchor()->nContent.GetIndex();
 sal_Int16 eHoriRel = rPosFly.GetFormat().GetHoriOrient().
 GetRelationOrient();
 if( text::RelOrientation::FRAME == eHoriRel || 
text::RelOrientation::PRINT_AREA == eHoriRel )
 {
-const SwContentNode *pCNd = pNdIdx->GetNode().GetContentNode();
+const SwContentNode *pCNd = m_pNodeIdex->GetNode().GetContentNode();
 OSL_ENSURE( pCNd, "No Content-Node at PaM position" );
-if( pCNd && nContentIdx < pCNd->Len() )
-nContentIdx++;
+if( pCNd && m_nContentIndex < pCNd->Len() )
+m_nContentIndex++;
 }
 }
 
 bool SwHTMLPosFlyFrame::operator<( const SwHTMLPosFlyFrame& rFrame ) const
 {
-if( pNdIdx->GetIndex() == rFrame.pNdIdx->GetIndex() )
+if( m_pNodeIdex->GetIndex() == rFrame.m_pNodeIdex->GetIndex() )
 {
-if( nContentIdx == rFrame.nContentIdx )
+if( m_nContentIndex == rFrame.m_nContentIndex )
 {
 if( GetOutPos() == rFrame.GetOutPos() )
-return nOrdNum < rFrame.nOrdNum;
+return m_nOrdNum < rFrame.m_nOrdNum;
 else
 return GetOutPos() < rFrame.GetOutPos();
 }
 else

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

2021-06-07 Thread scito (via logerrit)
 sc/qa/unit/ucalc.cxx   |  490 
 sc/qa/unit/ucalc_copypaste.cxx |  498 +
 2 files changed, 498 insertions(+), 490 deletions(-)

New commits:
commit eb5e2e70ab4eaab9fea555160e61b24bd9941a63
Author: scito 
AuthorDate: Sat Jun 5 11:42:19 2021 +0200
Commit: Xisco Fauli 
CommitDate: Mon Jun 7 09:59:58 2021 +0200

move remaining copy/paste tests from ucalc to ucalc_copypaste

MixData test cases test the special paste with operations such as ADD.

testCopyPasteMatrixFormula belongs also to the copy/paste tests

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

diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index d05656acca9e..9a7a3e34d623 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -178,10 +178,6 @@ public:
 void testFormulaPosition();
 void testFormulaWizardSubformula();
 
-void testMixData();
-void testMixDataAsLinkTdf116413();
-void testMixDataWithFormulaTdf116413();
-
 /**
  * Make sure the sheet streams are invalidated properly.
  */
@@ -241,8 +237,6 @@ public:
 void testColumnFindEditCells();
 void testSetStringAndNote();
 
-// tdf#80137
-void testCopyPasteMatrixFormula();
 void testUndoDataAnchor();
 void testSetFormula();
 void testMultipleDataCellsInRange();
@@ -305,9 +299,6 @@ public:
 CPPUNIT_TEST(testSearchCells);
 CPPUNIT_TEST(testFormulaPosition);
 CPPUNIT_TEST(testFormulaWizardSubformula);
-CPPUNIT_TEST(testMixData);
-CPPUNIT_TEST(testMixDataAsLinkTdf116413);
-CPPUNIT_TEST(testMixDataWithFormulaTdf116413);
 CPPUNIT_TEST(testJumpToPrecedentsDependents);
 CPPUNIT_TEST(testSetBackgroundColor);
 CPPUNIT_TEST(testRenameTable);
@@ -334,7 +325,6 @@ public:
 CPPUNIT_TEST(testFormulaToValue2);
 CPPUNIT_TEST(testColumnFindEditCells);
 CPPUNIT_TEST(testSetStringAndNote);
-CPPUNIT_TEST(testCopyPasteMatrixFormula);
 CPPUNIT_TEST(testUndoDataAnchor);
 CPPUNIT_TEST(testSetFormula);
 CPPUNIT_TEST(testMultipleDataCellsInRange);
@@ -5908,419 +5898,6 @@ void Test::testMultipleDataCellsInRange()
 m_pDoc->DeleteTab(0);
 }
 
-void Test::testMixData()
-{
-m_pDoc->InsertTab(0, "Test");
-
-m_pDoc->SetValue(ScAddress(1,0,0), 2.0); // B1
-m_pDoc->SetValue(ScAddress(0,1,0), 3.0); // A2
-
-// Copy A1:B1 to the clip document.
-ScDocument aClipDoc(SCDOCMODE_CLIP);
-copyToClip(m_pDoc, ScRange(0,0,0,1,0,0), &aClipDoc); // A1:B1
-
-// Copy A2:B2 to the mix document (for arithmetic paste).
-ScDocument aMixDoc(SCDOCMODE_CLIP);
-copyToClip(m_pDoc, ScRange(0,1,0,1,1,0), &aMixDoc); // A2:B2
-
-// Paste A1:B1 to A2:B2 and perform addition.
-pasteFromClip(m_pDoc, ScRange(0,1,0,1,1,0), &aClipDoc);
-m_pDoc->MixDocument(ScRange(0,1,0,1,1,0), ScPasteFunc::ADD, false, 
aMixDoc);
-
-CPPUNIT_ASSERT_EQUAL(3.0, m_pDoc->GetValue(0,1,0)); // A2
-CPPUNIT_ASSERT_EQUAL(2.0, m_pDoc->GetValue(1,1,0)); // B2
-
-// Clear everything and start over.
-clearSheet(m_pDoc, 0);
-clearSheet(&aClipDoc, 0);
-clearSheet(&aMixDoc, 0);
-
-// Set values to A1, A2, and B1.  B2 will remain empty.
-m_pDoc->SetValue(ScAddress(0,0,0), 15.0);
-m_pDoc->SetValue(ScAddress(0,1,0), 16.0);
-m_pDoc->SetValue(ScAddress(1,0,0), 12.0);
-CPPUNIT_ASSERT_EQUAL_MESSAGE("B2 should be empty.", CELLTYPE_NONE, 
m_pDoc->GetCellType(ScAddress(1,1,0)));
-
-// Copy A1:A2 and paste it onto B1:B2 with subtraction operation.
-copyToClip(m_pDoc, ScRange(0,0,0,0,1,0), &aClipDoc);
-CPPUNIT_ASSERT_EQUAL(m_pDoc->GetValue(ScAddress(0,0,0)), 
aClipDoc.GetValue(ScAddress(0,0,0)));
-CPPUNIT_ASSERT_EQUAL(m_pDoc->GetValue(ScAddress(0,1,0)), 
aClipDoc.GetValue(ScAddress(0,1,0)));
-
-copyToClip(m_pDoc, ScRange(1,0,0,1,1,0), &aMixDoc);
-CPPUNIT_ASSERT_EQUAL(m_pDoc->GetValue(ScAddress(1,0,0)), 
aMixDoc.GetValue(ScAddress(1,0,0)));
-CPPUNIT_ASSERT_EQUAL(m_pDoc->GetValue(ScAddress(1,1,0)), 
aMixDoc.GetValue(ScAddress(1,1,0)));
-
-pasteFromClip(m_pDoc, ScRange(1,0,0,1,1,0), &aClipDoc);
-m_pDoc->MixDocument(ScRange(1,0,0,1,1,0), ScPasteFunc::SUB, false, 
aMixDoc);
-
-CPPUNIT_ASSERT_EQUAL( -3.0, m_pDoc->GetValue(ScAddress(1,0,0))); // 12 - 15
-CPPUNIT_ASSERT_EQUAL(-16.0, m_pDoc->GetValue(ScAddress(1,1,0))); //  0 - 16
-
-m_pDoc->DeleteTab(0);
-}
-
-void Test::testMixDataAsLinkTdf116413()
-{
-sc::AutoCalcSwitch aACSwitch(*m_pDoc, true); // turn on auto calculation.
-
-const SCTAB nTab = 0;
-m_pDoc->InsertTab(nTab, "Test");
-
-// Scenario 1: Past "As Link" and "Add" operation (as described in 
tdf#116413)
-m_pDoc->SetValue(0, 0, nTab, 1.0); // A1
-m_pDoc->SetValue(0, 1, nTab, 1000.0); // A2
-
-// Copy A1 to the clip document.
-ScDocument aClipDoc(SCDOCMODE_

[Libreoffice-commits] core.git: Changes to 'refs/tags/mimo-7.0.7.0.M3'

2021-06-07 Thread Andras Timar (via logerrit)
Tag 'mimo-7.0.7.0.M3' created by Andras Timar  at 
2021-06-07 07:04 +

mimo-7.0.7.0.M3

Changes since mimo-7.0.7.0.M1-7:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/tags/mimo-7.0.7.0.M2'

2021-06-07 Thread Andras Timar (via logerrit)
Tag 'mimo-7.0.7.0.M2' created by Andras Timar  at 
2021-06-07 07:04 +

mimo-7.0.7.0.M2

Changes since mimo-7.0.7.0.M1-4:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/mimo/mimo-7-0' - 3 commits - configure.ac include/sfx2 officecfg/registry sfx2/source

2021-06-07 Thread Andras Timar (via logerrit)
 configure.ac   |2 +-
 include/sfx2/sidebar/SidebarController.hxx |1 +
 officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs |7 +++
 sfx2/source/sidebar/SidebarController.cxx  |5 +++--
 4 files changed, 12 insertions(+), 3 deletions(-)

New commits:
commit fa08dbe3d7e674dbce8eb3d0fa4152250b427d48
Author: Andras Timar 
AuthorDate: Mon Jun 7 09:01:21 2021 +0200
Commit: Andras Timar 
CommitDate: Mon Jun 7 09:01:21 2021 +0200

Bump version to 7.0.7.0.M3

Change-Id: I655362c64ce7e517ac22c268bdf9be71c76da061

diff --git a/configure.ac b/configure.ac
index 2548cd14336c..c0ea16dff0f3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for 
the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no 
idea.
 
-AC_INIT([LibreOffice],[7.0.7.0.M2],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[7.0.7.0.M3],[],[],[http://documentfoundation.org/])
 
 dnl libnumbertext needs autoconf 2.68, but that can pick up autoconf268 just 
fine if it is installed
 dnl whereas aclocal (as run by autogen.sh) insists on using autoconf and fails 
hard
commit 57fad2769469bbcf5e1399a52aa8e4be84ec95a5
Author: Andras Timar 
AuthorDate: Mon Jun 7 09:00:47 2021 +0200
Commit: Andras Timar 
CommitDate: Mon Jun 7 09:00:47 2021 +0200

no MinimumWidth of Sidebar for MIMO

Change-Id: I66fc17b1d791e06debe95248a8952986171a4596

diff --git a/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs 
b/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs
index c54c3d6076c0..0fba94791836 100644
--- a/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs
@@ -247,7 +247,7 @@
   Minimum width the sidebar can have. If true, the minumum width
   is calculated from the largest deck.
 
-true
+false
   
 
 
commit 707f69151fc6fc9fbd7d778a82554186904ff4b5
Author: Heiko Tietze 
AuthorDate: Fri Jun 4 14:42:58 2021 +0200
Commit: Andras Timar 
CommitDate: Mon Jun 7 08:59:40 2021 +0200

Resolves tdf#140360 - Provide option to turn off sidebar's minimum width

Boolean option Sidebar:General:MinimumWidth introduced defaulting
to true; if false the sidebar width is under full user control

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

diff --git a/include/sfx2/sidebar/SidebarController.hxx 
b/include/sfx2/sidebar/SidebarController.hxx
index d03576b3416d..a1b7b4e44b11 100644
--- a/include/sfx2/sidebar/SidebarController.hxx
+++ b/include/sfx2/sidebar/SidebarController.hxx
@@ -185,6 +185,7 @@ private:
 /// Use a combination of SwitchFlag_* as value.
 sal_Int32 mnRequestedForceFlags;
 sal_Int32 mnMaximumSidebarWidth;
+bool mbMinimumSidebarWidth;
 OUString msCurrentDeckId;
 AsynchronousCall maPropertyChangeForwarder;
 AsynchronousCall maContextChangeUpdate;
diff --git a/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs 
b/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs
index 6ed1d79d80cf..c54c3d6076c0 100644
--- a/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs
@@ -242,6 +242,13 @@
 
 500
   
+  
+
+  Minimum width the sidebar can have. If true, the minumum width
+  is calculated from the largest deck.
+
+true
+  
 
 
   
diff --git a/sfx2/source/sidebar/SidebarController.cxx 
b/sfx2/source/sidebar/SidebarController.cxx
index b890f9950f56..82aed33efcbf 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -135,6 +135,7 @@ SidebarController::SidebarController (
   maRequestedContext(),
   mnRequestedForceFlags(SwitchFlag_NoForce),
   
mnMaximumSidebarWidth(officecfg::Office::UI::Sidebar::General::MaximumWidth::get()),
+  
mbMinimumSidebarWidth(officecfg::Office::UI::Sidebar::General::MinimumWidth::get()),
   msCurrentDeckId(gsDefaultDeckId),
   maPropertyChangeForwarder([this](){ return 
this->BroadcastPropertyChange(); }),
   maContextChangeUpdate([this](){ return this->UpdateConfigurations(); }),
@@ -359,7 +360,7 @@ void SAL_CALL SidebarController::requestLayout()
 if (mpCurrentDeck && !mpCurrentDeck->isDisposed())
 {
 mpCurrentDeck->RequestLayout();
-nMinimalWidth = mpCurrentDeck->GetMinimalWidth();
+nMinimalWidth = mbMinimumSidebarWidth ? 
mpCurrentDeck->GetMinimalWidth() : 0;
 }
 RestrictWidth(nMinimalWidth);
 }
@@ -454,7 +45