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

2022-01-27 Thread Mike Kaganski (via logerrit)
 chart2/qa/extras/xshape/data/reference/tdf90839-1.xml |  116 -
 chart2/qa/extras/xshape/data/reference/tdf90839-2.xml |  120 +-
 chart2/qa/extras/xshape/data/reference/tdf90839-3.xml |  120 +-
 sc/qa/unit/subsequent_filters_test2.cxx   |   24 +--
 sc/qa/unit/uicalc/uicalc.cxx  |4 
 sc/source/filter/excel/xetable.cxx|2 
 sc/source/filter/inc/unitconverter.hxx|   13 -
 sc/source/filter/oox/drawingbase.cxx  |4 
 sc/source/filter/oox/drawingfragment.cxx  |2 
 sc/source/filter/oox/pagesettings.cxx |   13 -
 sc/source/filter/oox/unitconverter.cxx|   33 +---
 sc/source/filter/oox/worksheethelper.cxx  |   25 +--
 12 files changed, 228 insertions(+), 248 deletions(-)

New commits:
commit 75036ee916046b9d1bfd705b368ffe94cc7cfa79
Author: Mike Kaganski 
AuthorDate: Thu Jan 27 09:18:41 2022 +0300
Commit: Mike Kaganski 
CommitDate: Thu Jan 27 15:12:48 2022 +0100

Simplify oox::xls::UnitConverter and its uses

Use o3tl::convert where it was used to convert between two fixed units.
Simplify cases where several conversions were performed in a row.
Use EMUs as UnitConverter base unit, to have simplest quotients and
increase accuracy.

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

diff --git a/chart2/qa/extras/xshape/data/reference/tdf90839-1.xml 
b/chart2/qa/extras/xshape/data/reference/tdf90839-1.xml
index eb48c3f7293d..b2dc41548810 100644
--- a/chart2/qa/extras/xshape/data/reference/tdf90839-1.xml
+++ b/chart2/qa/extras/xshape/data/reference/tdf90839-1.xml
@@ -1,6 +1,6 @@
 
 
- 
+ 
   
   
   
@@ -9,14 +9,14 @@
   
   
   
-   
+   


   
  
- 
+ 
   
-   
+   
 
 
 
@@ -25,12 +25,12 @@
 
 
 
- 
+ 
  
  
 

-   
+   
 
 
 
@@ -39,18 +39,18 @@
 
 
 
- 
+ 
  
  
 

-   
+   
 
- 
+ 
   
-   
+   
 
- 
+ 
   
   
   
@@ -59,25 +59,25 @@
   
   
   
-   
+   


   
  
 
 
- 
+ 
  
  
 

-   
+   
 
- 
+ 
   
-   
+   
 
- 
+ 
   
   
   
@@ -86,12 +86,12 @@
   
   
   
-   
+   


   
  
- 
+ 
   
   
   
@@ -100,12 +100,12 @@
   
   
   
-   
+   


   
  
- 
+ 
   
   
   
@@ -114,12 +114,12 @@
   
   
   
-   
+   


   
  
- 
+ 
   
   
   
@@ -128,12 +128,12 @@
   
   
   
-   
+   


   
  
- 
+ 
   
   
   
@@ -142,48 +142,48 @@
   
   
   
-   
+   


   
  
 
 
- 
+ 
  
  
 

   
   
-   
+   


   
  
 
 
- 
+ 
  
  
 

   
   
-   
+   


   
  
- 
+ 
   
-   
+   
 
- 
+ 
   
-   
+   
 
- 
+ 
   
   
   
@@ -192,21 +192,21 @@
   
   
   
-   
+   


   
  
 
 
- 
+ 
  
  
 

-   
+   
 
- 
+ 
   
   
   
@@ -215,21 +215,21 @@
   
   
   
-   
+   


   
  
 
 
-

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

2020-12-30 Thread Stephan Bergmann (via logerrit)
 chart2/qa/extras/chart2import.cxx |2 +-
 sc/qa/unit/scshapetest.cxx|6 +++---
 sc/qa/unit/subsequent_export-test.cxx |2 +-
 sc/source/filter/excel/xeextlst.cxx   |   10 +++---
 4 files changed, 12 insertions(+), 8 deletions(-)

New commits:
commit 84b08eaeb7b2e8a61ee0dab79cabae07e2209c3f
Author: Stephan Bergmann 
AuthorDate: Tue Dec 29 12:19:45 2020 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Dec 30 11:06:20 2020 +0100

loplugin:stringviewparam: operator +, redux

Change-Id: I0790e09f24512d7b205681127eb95ad7dc15a15f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108473
Reviewed-by: Mike Kaganski 
Tested-by: Stephan Bergmann 

diff --git a/chart2/qa/extras/chart2import.cxx 
b/chart2/qa/extras/chart2import.cxx
index 272639ad069c..57c7227b49c1 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -2806,7 +2806,7 @@ void Chart2ImportTest::testTdfCustomShapePos()
 
 void Chart2ImportTest::testTdf121281()
 {
-load("/chart2/qa/extras/data/xlsx/", "incorrect_label_position.xlsx");
+load(u"/chart2/qa/extras/data/xlsx/", "incorrect_label_position.xlsx");
 Reference xChartDoc(getChartDocFromSheet(0, 
mxComponent),
UNO_QUERY_THROW);
 Reference xDrawPageSupplier(xChartDoc, 
UNO_QUERY_THROW);
diff --git a/sc/qa/unit/scshapetest.cxx b/sc/qa/unit/scshapetest.cxx
index d9fa04683ea6..727997a8c8c0 100644
--- a/sc/qa/unit/scshapetest.cxx
+++ b/sc/qa/unit/scshapetest.cxx
@@ -144,7 +144,7 @@ void ScShapeTest::testTdf137033_FlipHori_Resize()
 // Load a document, which has a rotated custom shape, which is horizontal 
flipped. Error was, that
 // if such shape was anchored "resize with cell", then after save and 
reload it was destorted.
 OUString aFileURL;
-createFileURL("tdf137033_FlipHoriRotCustomShape.ods", aFileURL);
+createFileURL(u"tdf137033_FlipHoriRotCustomShape.ods", aFileURL);
 uno::Reference xComponent = 
loadFromDesktop(aFileURL);
 CPPUNIT_ASSERT(xComponent.is());
 
@@ -203,7 +203,7 @@ void ScShapeTest::testTdf137033_RotShear_ResizeHide()
 
 // Load a document, which has a rotated and sheared shape, anchored to 
cell with resize.
 OUString aFileURL;
-createFileURL("tdf137033_RotShearResizeAnchor.ods", aFileURL);
+createFileURL(u"tdf137033_RotShearResizeAnchor.ods", aFileURL);
 uno::Reference xComponent = 
loadFromDesktop(aFileURL);
 CPPUNIT_ASSERT(xComponent.is());
 
@@ -278,7 +278,7 @@ void ScShapeTest::testTdf137033_RotShear_Hide()
 
 // Load a document, which has a rotated and sheared shape, anchored to 
cell, without resize.
 OUString aFileURL;
-createFileURL("tdf137033_RotShearCellAnchor.ods", aFileURL);
+createFileURL(u"tdf137033_RotShearCellAnchor.ods", aFileURL);
 uno::Reference xComponent = 
loadFromDesktop(aFileURL);
 CPPUNIT_ASSERT(xComponent.is());
 
diff --git a/sc/qa/unit/subsequent_export-test.cxx 
b/sc/qa/unit/subsequent_export-test.cxx
index f93f24b2688a..0261ea9f2dca 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -521,7 +521,7 @@ void ScExportTest::test()
 
 void ScExportTest::testExtCondFormatXLSX()
 {
-ScDocShellRef xShell = loadDoc("tdf139021.", FORMAT_XLSX);
+ScDocShellRef xShell = loadDoc(u"tdf139021.", FORMAT_XLSX);
 CPPUNIT_ASSERT(xShell.is());
 
 ScDocShellRef xDocSh = saveAndReload(&(*xShell), FORMAT_XLSX);
diff --git a/sc/source/filter/excel/xeextlst.cxx 
b/sc/source/filter/excel/xeextlst.cxx
index 1f4055aff5ea..972a9010b342 100644
--- a/sc/source/filter/excel/xeextlst.cxx
+++ b/sc/source/filter/excel/xeextlst.cxx
@@ -7,6 +7,10 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include 
+
+#include 
+
 #include 
 #include 
 #include 
@@ -164,7 +168,7 @@ bool RequiresFixedFormula(ScConditionMode eMode)
 return false;
 }
 
-OString GetFixedFormula(ScConditionMode eMode, const ScAddress& rAddress, 
const OString& rText)
+OString GetFixedFormula(ScConditionMode eMode, const ScAddress& rAddress, 
std::string_view rText)
 {
 OStringBuffer aBuffer;
 XclXmlUtils::ToOString(aBuffer, rAddress);
@@ -176,9 +180,9 @@ OString GetFixedFormula(ScConditionMode eMode, const 
ScAddress& rAddress, const
 case ScConditionMode::EndsWith:
 return OString("RIGHT(" + aPos + ",LEN(" + rText + "))=\"" + rText + 
"\"");
 case ScConditionMode::ContainsText:
-return OString("NOT(ISERROR(SEARCH(" + rText + "," + aPos + ")))");
+return OString(OString::Concat("NOT(ISERROR(SEARCH(") + rText + "," + 
aPos + ")))");
 case ScConditionMode::NotContainsText:
-return OString("ISERROR(SEARCH(" + rText + "," + aPos + "))");
+return OString(OString::Concat("ISERROR(SEARCH(") + rText + "," + aPos 
+ "))");
 default:
 break;
 }
___
Libreoffice-commits mailing list
libreoffice-com