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

2023-10-29 Thread Paris Oplopoios (via logerrit)
 sc/qa/unit/subsequent_export_test.cxx |   31 +++
 sc/source/filter/excel/xecontent.cxx  |   17 -
 2 files changed, 47 insertions(+), 1 deletion(-)

New commits:
commit e123c772db8a12a37dfa14370b9db7c220f33ef1
Author: Paris Oplopoios 
AuthorDate: Thu Oct 26 14:28:06 2023 +0300
Commit: Paris Oplopoios 
CommitDate: Sun Oct 29 22:18:41 2023 +0100

sc: Test numeric conditional format text rule exports correctly

Change-Id: Ib57ea44912b4cb0be7cbdb127dd7ea6f08ec8392
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158498
Tested-by: Jenkins
Reviewed-by: Paris Oplopoios 

diff --git a/sc/qa/unit/subsequent_export_test.cxx 
b/sc/qa/unit/subsequent_export_test.cxx
index 5f5132c299c2..035709a036ac 100644
--- a/sc/qa/unit/subsequent_export_test.cxx
+++ b/sc/qa/unit/subsequent_export_test.cxx
@@ -2153,6 +2153,37 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, 
testSheetProtectionXLSB)
 
CPPUNIT_ASSERT(!pTabProtect->isOptionEnabled(ScTableProtection::SELECT_LOCKED_CELLS));
 }
 
+CPPUNIT_TEST_FIXTURE(ScExportTest, testConditionalFormatNumberInTextRule)
+{
+createScDoc();
+
+ScDocument* pDocument = getScDoc();
+ScAddress aAddress(0, 0, 0);
+
+auto pFormat = std::make_unique(0, pDocument);
+ScRange aCondFormatRange(aAddress);
+ScRangeList aRangeList(aCondFormatRange);
+pFormat->SetRange(aRangeList);
+ScCondFormatEntry* pEntry
+= new ScCondFormatEntry(ScConditionMode::BeginsWith, "15", "", 
*pDocument, aAddress, "");
+pFormat->AddEntry(pEntry);
+pDocument->AddCondFormat(std::move(pFormat), 0);
+
+saveAndReload("Calc Office Open XML");
+pDocument = getScDoc();
+
+ScConditionalFormat* pCondFormat = pDocument->GetCondFormat(0, 0, 0);
+CPPUNIT_ASSERT(pCondFormat);
+CPPUNIT_ASSERT_EQUAL(size_t(1), pCondFormat->size());
+const ScFormatEntry* pCondFormatEntry = pCondFormat->GetEntry(0);
+CPPUNIT_ASSERT(pCondFormatEntry);
+CPPUNIT_ASSERT_EQUAL(ScFormatEntry::Type::Condition, 
pCondFormatEntry->GetType());
+const ScConditionEntry* pConditionEntry
+= static_cast(pCondFormatEntry);
+CPPUNIT_ASSERT_EQUAL(ScConditionMode::BeginsWith, 
pConditionEntry->GetOperation());
+CPPUNIT_ASSERT_EQUAL(OUString("\"15\""), 
pConditionEntry->GetExpression(aAddress, 0));
+}
+
 namespace
 {
 const char* toBorderName(SvxBorderLineStyle eStyle)
commit ac0a4b7c22b65325b3502cde3e05e106136c4f5b
Author: Paris Oplopoios 
AuthorDate: Thu Oct 26 12:35:23 2023 +0300
Commit: Paris Oplopoios 
CommitDate: Sun Oct 29 22:18:33 2023 +0100

sc: Export conditional formatting expression correctly for text rules

Text rules like BeginsWith would discard the expression if it was a
number when exporting, which is not what is supposed to happen - as
something like a conditional formatting rule BeginsWith "1" should be
valid.

Change-Id: I2d53754c462403f20b1991fa201184fcab3616a8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158494
Tested-by: Jenkins
Reviewed-by: Paris Oplopoios 

diff --git a/sc/source/filter/excel/xecontent.cxx 
b/sc/source/filter/excel/xecontent.cxx
index 037e99c408a0..d8d21e360cd6 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -1058,7 +1058,22 @@ void XclExpCFImpl::SaveXml( XclExpXmlStream& rStrm )
 // the token array for that
 std::unique_ptr 
pTokenArray(mrFormatEntry.CreateFlatCopiedTokenArray(0));
 if(pTokenArray->GetLen())
-aText = 
pTokenArray->FirstToken()->GetString().getString().toUtf8();
+{
+formula::StackVar eType = pTokenArray->FirstToken()->GetType();
+switch (eType)
+{
+case formula::svDouble:
+{
+aText = 
OString::number(pTokenArray->FirstToken()->GetDouble());
+break;
+}
+default:
+{
+aText = 
pTokenArray->FirstToken()->GetString().getString().toUtf8();
+break;
+}
+}
+}
 }
 
 sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();


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

2023-08-08 Thread Henry Castro (via logerrit)
 sc/qa/unit/uicalc/uicalc.cxx   |   39 +++
 sc/source/ui/inc/tabvwsh.hxx   |1 +
 sc/source/ui/view/tabvwsha.cxx |8 
 3 files changed, 48 insertions(+)

New commits:
commit cdca06306e0d4ae2d9874bc7bbd0290d100d54cc
Author: Henry Castro 
AuthorDate: Tue Jul 18 15:21:02 2023 -0400
Commit: Tomaž Vajngerl 
CommitDate: Tue Aug 8 16:44:39 2023 +0200

tdf#155799: sc: qa: add unit test "testKeyboardMergeRef"

Signed-off-by: Henry Castro 
Change-Id: I4d80ad5d9e5fe2c131f9397ec59c6c16ef92c094
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154601
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx
index 9a795f4a5bde..2d1378c92c30 100644
--- a/sc/qa/unit/uicalc/uicalc.cxx
+++ b/sc/qa/unit/uicalc/uicalc.cxx
@@ -2060,6 +2060,45 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf141440)
 CPPUNIT_ASSERT_EQUAL(OUString("Note in A1"), pDoc->GetNote(ScAddress(0, 0, 
0))->GetText());
 }
 
+CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testKeyboardMergeRef)
+{
+createScDoc();
+ScDocShell* pDocSh = getScDocShell();
+ScModelObj* pModelObj = 
comphelper::getFromUnoTunnel(mxComponent);
+ScTabViewShell* pViewShell = pDocSh->GetBestViewShell(false);
+CPPUNIT_ASSERT(pViewShell);
+
+goToCell("A1:A5");
+dispatchCommand(mxComponent, ".uno:ToggleMergeCells", {});
+goToCell("A6:A10");
+dispatchCommand(mxComponent, ".uno:ToggleMergeCells", {});
+
+goToCell("B1");
+typeString(u"=");
+
+goToCell("A1");
+
+pModelObj->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_DOWN | KEY_SHIFT);
+pModelObj->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_DOWN | KEY_SHIFT);
+Scheduler::ProcessEventsToIdle();
+CPPUNIT_ASSERT(pViewShell->IsRefInputMode());
+{
+const OUString* pInput = pViewShell->GetEditString();
+CPPUNIT_ASSERT(pInput);
+CPPUNIT_ASSERT_EQUAL(OUString("=A1:A10"), *pInput);
+}
+
+pModelObj->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_UP | KEY_SHIFT);
+pModelObj->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_UP | KEY_SHIFT);
+Scheduler::ProcessEventsToIdle();
+CPPUNIT_ASSERT(pViewShell->IsRefInputMode());
+{
+const OUString* pInput = pViewShell->GetEditString();
+CPPUNIT_ASSERT(pInput);
+CPPUNIT_ASSERT_EQUAL(OUString("=A1:A5"), *pInput);
+}
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 3273d44baaf0679a19527e953809b9d61d8e2201
Author: Henry Castro 
AuthorDate: Tue Jul 18 15:18:41 2023 -0400
Commit: Tomaž Vajngerl 
CommitDate: Tue Aug 8 16:44:31 2023 +0200

tdf#155799: sc: add getter function "GetEditString"

Useful for QA test queries.
..

Signed-off-by: Henry Castro 
Change-Id: Ibd3c902405f478032447b10286a788cd0769c855
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154600
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index 06e9f31e19cb..3c80dbc1995d 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -236,6 +236,7 @@ public:
 
 const ScInputHandler* GetInputHandler() const { return 
mpInputHandler.get(); }
 ScInputHandler* GetInputHandler() { return mpInputHandler.get(); }
+const OUString* GetEditString() const;
 voidUpdateInputHandler( bool bForce = false, bool bStopEditing 
= true );
 voidUpdateInputHandlerCellAdjust( SvxCellHorJustify eJust );
 boolTabKeyInput(const KeyEvent& rKEvt);
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index c07a070e08ef..dd73c21a5076 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -631,6 +631,14 @@ void ScTabViewShell::ExecuteCellFormatDlg(SfxRequest& 
rReq, const OUString 
 });
 }
 
+const OUString* ScTabViewShell::GetEditString() const
+{
+if (mpInputHandler)
+return >GetEditString();
+
+return nullptr;
+}
+
 bool ScTabViewShell::IsRefInputMode() const
 {
 ScModule* pScMod = SC_MOD();


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

2023-05-18 Thread Andrea Gelmini (via logerrit)
 sc/qa/unit/uicalc/uicalc.cxx  |2 +-
 wizards/source/sfdialogs/SF_DialogControl.xba |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit d00415949cceba2f712da8d311cf4f07b183c5cd
Author: Andrea Gelmini 
AuthorDate: Thu May 18 12:19:10 2023 +0200
Commit: Julien Nabet 
CommitDate: Thu May 18 12:38:58 2023 +0200

Fix typo

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

diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx
index bfba6bd235e1..fae0b389584e 100644
--- a/sc/qa/unit/uicalc/uicalc.cxx
+++ b/sc/qa/unit/uicalc/uicalc.cxx
@@ -1914,7 +1914,7 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf153790)
 goToCell("A3");
 dispatchCommand(mxComponent, ".uno:Paste", {});
 
-// Without the fix in place, this test would have failed wiht
+// Without the fix in place, this test would have failed with
 // - Expected: =SUM($Sheet1.B1:C1)
 // - Actual  : =SUM($Sheet1.B1:$Sheet1.C1)
 CPPUNIT_ASSERT_EQUAL(OUString("=SUM($Sheet1.B1:C1)"), pDoc->GetFormula(0, 
2, 0));
commit 9231531b3ed8554db89af7837b6e4860e4e5a332
Author: Andrea Gelmini 
AuthorDate: Thu May 18 12:18:52 2023 +0200
Commit: Julien Nabet 
CommitDate: Thu May 18 12:38:43 2023 +0200

Fix typo

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

diff --git a/wizards/source/sfdialogs/SF_DialogControl.xba 
b/wizards/source/sfdialogs/SF_DialogControl.xba
index e4e8fe929309..133d942a8c32 100644
--- a/wizards/source/sfdialogs/SF_DialogControl.xba
+++ b/wizards/source/sfdialogs/SF_DialogControl.xba
@@ -2117,7 +2117,7 @@ Private Function _PropertySet(Optional ByVal psProperty 
As String _
 Dim bSet As Boolean  
Return value
 Static oSession As ObjectAlias 
of SF_Session
 Dim vSet As Variant  
Value to set in UNO model or view property
-Dim vBorders As Variant  
Array of allowed Border vaues
+Dim vBorders As Variant  
Array of allowed Border values
 Dim vFormats As Variant  
Format property: output of _FormatsList()
 Dim iFormat As Integer   Format 
property: index in vFormats
 Dim oNumberFormats As Object 
com.sun.star.util.XNumberFormats


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

2023-05-09 Thread Andrea Gelmini (via logerrit)
 sc/qa/uitest/function_wizard/tdf104487.py |2 +-
 svx/qa/unit/gallery/test_gallery.cxx  |1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

New commits:
commit c84b37c0bbab3b386b22b87be52f965839b44a49
Author: Andrea Gelmini 
AuthorDate: Tue May 9 16:23:06 2023 +0200
Commit: Julien Nabet 
CommitDate: Wed May 10 06:49:14 2023 +0200

Remove duplicated include

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

diff --git a/svx/qa/unit/gallery/test_gallery.cxx 
b/svx/qa/unit/gallery/test_gallery.cxx
index ac6a1b6ee875..47b73c87fbd2 100644
--- a/svx/qa/unit/gallery/test_gallery.cxx
+++ b/svx/qa/unit/gallery/test_gallery.cxx
@@ -17,7 +17,6 @@
 #include 
 #include 
 #include 
-#include 
 
 #include 
 #include 
commit 6e7aaa954082acd432e8e02aee03e2c7d497c34b
Author: Andrea Gelmini 
AuthorDate: Tue May 9 22:16:14 2023 +0200
Commit: Julien Nabet 
CommitDate: Wed May 10 06:49:01 2023 +0200

Fix double word

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

diff --git a/sc/qa/uitest/function_wizard/tdf104487.py 
b/sc/qa/uitest/function_wizard/tdf104487.py
index 8b563bc5b372..13a219ea442f 100755
--- a/sc/qa/uitest/function_wizard/tdf104487.py
+++ b/sc/qa/uitest/function_wizard/tdf104487.py
@@ -12,7 +12,7 @@ from uitest.uihelper.common import get_state_as_dict, 
select_pos
 class tdf104487(UITestCase):
 def test_tdf104487_remember_function_category(self):
 with self.ui_test.create_doc_in_start_center("calc"):
-# Open function dialog and select select a function category
+# Open function dialog and select a function category
 with 
self.ui_test.execute_modeless_dialog_through_command(".uno:FunctionDialog") as 
xDialog:
 xCategory = xDialog.getChild("category")
 select_pos(xCategory, "3")


[Libreoffice-commits] core.git: 2 commits - sc/qa sc/source svx/inc svx/source

2023-04-18 Thread Maxim Monastirsky (via logerrit)
 sc/qa/unit/subsequent_export_test4.cxx|5 ++
 sc/source/core/data/drwlayer.cxx  |4 -
 sc/source/core/data/postit.cxx|   39 --
 svx/inc/sdr/primitive2d/sdrattributecreator.hxx   |3 -
 svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx |6 +-
 svx/source/sdr/primitive2d/sdrattributecreator.cxx|6 +-
 6 files changed, 34 insertions(+), 29 deletions(-)

New commits:
commit a9a2ace53625a8fb3feb1c050648a875a98cb7a8
Author: Maxim Monastirsky 
AuthorDate: Fri Apr 14 14:58:09 2023 +0300
Commit: Maxim Monastirsky 
CommitDate: Tue Apr 18 09:33:28 2023 +0200

sc drawstyles: Comment shadow should depends on shadow attribute

The shadow of comments differs from the shadow of normal callout
shapes, as it shows only for the text rectangle. However the way
it's implemented is weird: The shadow attribute is set to false,
which turns off the "normal" shadow, and then the special shadow
is drawn unconditionally. There is also a code that forces the
shadow attribute to false on import, to handle some old files
that used to have the shadow on.

The confusion begins when one shows the comment, and looks at
right click > Area... > Shadow, which (rightfully) shows the
shadow as off, but doesn't align with what is visible on the
document canvas. Moreover, the other shadow settings on this page
do affect the comment shadow, but in order to change them it is
needed to check the "Use shadow" checkbox first. But leaving that
checkbox as checked will result with a double shadow being drawn
for the text rectangle, and an unnecessary shadow drawn for the
arrow part. The problem becomes now more visible, as there is
a Note style listed in the sidebar.

One possible approach could be to draw the special shadow only
when the shadow attribute is on, and patch existing files on
import to "shadow on" instead of "shadow off". But this will
cause the "double shadow" problem when opened in older versions
(unless the comment is hidden, in which case we used to override
the shadow attribute).

But now there's an opportunity for a better solution: As we
assign the default comment style to imported comments, we can
just clear the shadow attribute DF, instead of forcing it to
some value. As a result, the "shadow on" attribute of the style
will be in effect in newer versions, while in older versions it
will fallback to the "shadow off" pool default.

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

diff --git a/sc/qa/unit/subsequent_export_test4.cxx 
b/sc/qa/unit/subsequent_export_test4.cxx
index 663767c7374f..eb3af3a2b2bf 100644
--- a/sc/qa/unit/subsequent_export_test4.cxx
+++ b/sc/qa/unit/subsequent_export_test4.cxx
@@ -1557,6 +1557,11 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testCommentStyles)
 auto pCaption = pNote->GetCaption();
 CPPUNIT_ASSERT(pCaption);
 
+// Check that we don't keep the shadow attribute as DF
+// (see ScNoteUtil::CreateNoteFromCaption)
+CPPUNIT_ASSERT_LESSEQUAL(SfxItemState::DEFAULT,
+ 
pCaption->GetMergedItemSet().GetItemState(SDRATTR_SHADOW, false));
+
 auto pStyleSheet = >GetStyleSheetPool()->Make("MyStyle1", 
SfxStyleFamily::Frame);
 auto& rSet = pStyleSheet->GetItemSet();
 rSet.Put(SvxFontHeightItem(1129, 100, EE_CHAR_FONTHEIGHT));
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index 3940d09906ee..8191dfcede66 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -382,9 +382,7 @@ void ScDrawLayer::CreateDefaultStyles()
 pSet->Put(SdrCaptionEscDirItem(SdrCaptionEscDir::BestFit));
 
 // shadow
-/* SdrShadowItem has false, instead the shadow is set for the rectangle
-   only with SetSpecialTextBoxShadow() when the object is created. */
-pSet->Put(makeSdrShadowItem(false));
+pSet->Put(makeSdrShadowItem(true));
 pSet->Put(makeSdrShadowXDistItem(100));
 pSet->Put(makeSdrShadowYDistItem(100));
 
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index b4acfb35f205..66f034087678 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -112,8 +112,10 @@ void ScCaptionUtil::SetExtraItems( SdrCaptionObj& 
rCaption, const SfxItemSet& rE
 SfxItemSet aItemSet = rCaption.GetMergedItemSet();
 
 aItemSet.Put(rExtraItemSet);
-// reset shadow items
-aItemSet.Put( makeSdrShadowItem( false ) );
+// reset shadow visibility (see also ScNoteUtil::CreateNoteFromCaption)
+aItemSet.ClearItem(SDRATTR_SHADOW);
+// ... but not distance, as that will fallback to wrong values
+// if the comment is shown 

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

2023-04-15 Thread Eike Rathke (via logerrit)
 sc/qa/unit/data/functions/mathematical/fods/rounddown.fods |   77 ++---
 sc/qa/unit/data/functions/mathematical/fods/roundsig.fods  |   50 ++--
 sc/qa/unit/data/functions/mathematical/fods/roundup.fods   |   77 ++---
 3 files changed, 162 insertions(+), 42 deletions(-)

New commits:
commit a062bceb2509d227cec86845af680a4b69d42df3
Author: Eike Rathke 
AuthorDate: Sat Apr 15 18:53:20 2023 +0200
Commit: Eike Rathke 
CommitDate: Sat Apr 15 21:14:35 2023 +0200

Add ROUNDSIG samples to unit test, tdf#138220 tdf#105931

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

diff --git a/sc/qa/unit/data/functions/mathematical/fods/roundsig.fods 
b/sc/qa/unit/data/functions/mathematical/fods/roundsig.fods
index 865662523ff7..148cd2cb648f 100644
--- a/sc/qa/unit/data/functions/mathematical/fods/roundsig.fods
+++ b/sc/qa/unit/data/functions/mathematical/fods/roundsig.fods
@@ -4605,12 +4605,27 @@
  
  
 
-
- 
+
+ 
+  -999.13
+ 
+ 
+  -999.13
+ 
+ 
+  TRUE
+ 
+ 
+  =ROUNDSIG(F27;G27)
+ 
  
- 
- 
- 
+ 
+  -999.13
+ 
+ 
+  12
+ 
+ 
  
  
  
@@ -4623,12 +4638,27 @@
  
  
 
-
- 
+
+ 
+  0
+ 
+ 
+  0
+ 
+ 
+  TRUE
+ 
+ 
+  =RAWSUBTRACT(ROUNDSIG(F28;G28);F28)
+ 
  
- 
- 
- 
+ 
+  -999.13
+ 
+ 
+  12
+ 
+ 
  
  
  
commit e68cd91651c53c5c228d84582b1062d8fb9a7077
Author: Eike Rathke 
AuthorDate: Sat Apr 15 18:34:55 2023 +0200
Commit: Eike Rathke 
CommitDate: Sat Apr 15 21:14:25 2023 +0200

Add ROUND(DOWN|UP) samples to unit test, tdf#154792 tdf#124286 tdf#138220

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

diff --git a/sc/qa/unit/data/functions/mathematical/fods/rounddown.fods 
b/sc/qa/unit/data/functions/mathematical/fods/rounddown.fods
index 8d4292810304..6022ba17c5be 100644
--- a/sc/qa/unit/data/functions/mathematical/fods/rounddown.fods
+++ b/sc/qa/unit/data/functions/mathematical/fods/rounddown.fods
@@ -2006,41 +2006,86 @@
  
 
 
- 
- 
- 
+ 
+  726498.78
+ 
+ 
+  726498.78
+ 
+ 
+  TRUE
+ 
+ 
+  =ROUNDDOWN(726498.78828;2)
+ 
  
  
  
  
 
 
- 
- 
- 
+ 
+  1.99
+ 
+ 
+  1.99
+ 
+ 
+  TRUE
+ 
+ 
+  =ROUNDDOWN(2-5E-015;14)
+ 
  
  
 
 
- 
- 
- 
+ 
+  1.9
+ 
+ 
+  1.9
+ 
+ 
+  TRUE
+ 
+ 
+  =ROUNDDOWN(2-5E-015;13)
+ 
  
 
 
- 
- 
- 
+ 
+  8.23456789012
+ 
+ 
+  8.23456789012
+ 
+ 
+  TRUE
+ 
+ 
+  =ROUNDDOWN(8.234567890125;11)
+ 
  
  
  
  
  
 
-
- 
- 
- 
+
+ 
+  -999.13
+ 
+ 
+  -999.13
+ 
+ 
+  TRUE
+ 
+ 
+  =ROUNDDOWN(-999.13;11)
+ 
  
  
  
diff --git a/sc/qa/unit/data/functions/mathematical/fods/roundup.fods 
b/sc/qa/unit/data/functions/mathematical/fods/roundup.fods
index 2bfba0d91fa3..f549a1444c4d 100644
--- a/sc/qa/unit/data/functions/mathematical/fods/roundup.fods
+++ b/sc/qa/unit/data/functions/mathematical/fods/roundup.fods
@@ -1958,41 +1958,86 @@
  
 
 
- 
- 
- 
+ 
+  2.01
+ 
+ 
+  2.01
+ 
+ 
+  TRUE
+ 
+ 
+  =ROUNDUP(2+1E-015;14)
+ 
  
  
  
  
 
 
- 
- 
- 
+ 
+  2.1
+ 
+ 
+  2.1
+ 
+ 
+  TRUE
+ 
+ 
+  =ROUNDUP(2+1E-015;13)
+ 
  
  
 
 
- 
- 
- 
+ 
+  8.23456789013
+ 
+ 
+  8.23456789013
+ 
+ 
+  TRUE
+ 
+ 
+  =ROUNDUP(8.234567890134;11)
+ 
  
 
 
- 
- 
- 
+ 
+  -999.13
+ 
+ 
+  -999.13
+ 
+ 
+  TRUE
+ 
+ 
+  =ROUNDUP(-999.13;11)
+ 
  
  
  
  
  
 
-
- 
- 
- 
+
+ 
+  8000
+ 
+ 
+  8000
+ 
+ 
+  TRUE
+ 
+ 
+  =ROUNDUP(8000;-15)
+ 
  
  
  


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

2023-03-16 Thread Paris Oplopoios (via logerrit)
 sc/qa/unit/uicalc/data/simpleTable.xlsx |binary
 sc/qa/unit/uicalc/uicalc.cxx|   15 +++
 sc/source/core/tool/dbdata.cxx  |7 ++-
 sw/source/core/docnode/ndtbl.cxx|1 +
 4 files changed, 22 insertions(+), 1 deletion(-)

New commits:
commit 2135706397d36aa7ea24650b65859be0b6860a65
Author: Paris Oplopoios 
AuthorDate: Wed Mar 8 23:04:49 2023 +0200
Commit: Tomaž Vajngerl 
CommitDate: Thu Mar 16 13:08:25 2023 +

tdf#154061 Make sure table column attributes size is correct

Resize maTableColumnAttributes to match the amount of columns, fixes
crash upon undoing a column insertion on a table

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

diff --git a/sc/qa/unit/uicalc/data/simpleTable.xlsx 
b/sc/qa/unit/uicalc/data/simpleTable.xlsx
new file mode 100644
index ..fd4e394732ba
Binary files /dev/null and b/sc/qa/unit/uicalc/data/simpleTable.xlsx differ
diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx
index 421f96410e6f..4fb9416badd8 100644
--- a/sc/qa/unit/uicalc/uicalc.cxx
+++ b/sc/qa/unit/uicalc/uicalc.cxx
@@ -2221,6 +2221,21 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf142010)
 CPPUNIT_ASSERT_EQUAL(5.0, pDoc->GetValue(ScAddress(5, 71, 0)));
 }
 
+CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf154061)
+{
+createScDoc("simpleTable.xlsx");
+ScDocument* pDoc = getScDoc();
+CPPUNIT_ASSERT_EQUAL(OUString("Column2"), pDoc->GetString(ScAddress(1, 0, 
0)));
+
+goToCell("B1");
+
+// Without the fix in place, it would crash here due to an out of bounds 
array access
+dispatchCommand(mxComponent, ".uno:InsertColumnsBefore", {});
+CPPUNIT_ASSERT_EQUAL(OUString("Column2"), pDoc->GetString(ScAddress(2, 0, 
0)));
+dispatchCommand(mxComponent, ".uno:Undo", {});
+CPPUNIT_ASSERT_EQUAL(OUString("Column2"), pDoc->GetString(ScAddress(1, 0, 
0)));
+}
+
 CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf132431)
 {
 createScDoc("tdf132431.ods");
diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx
index dc10d6a0503e..293bb20a4976 100644
--- a/sc/source/core/tool/dbdata.cxx
+++ b/sc/source/core/tool/dbdata.cxx
@@ -116,6 +116,7 @@ ScDBData::ScDBData( const ScDBData& rData ) :
 bAutoFilter (rData.bAutoFilter),
 bModified   (rData.bModified),
 maTableColumnNames  (rData.maTableColumnNames),
+maTableColumnAttributes(rData.maTableColumnAttributes),
 mbTableColumnNamesDirty(rData.mbTableColumnNamesDirty),
 nFilteredRowCount   (rData.nFilteredRowCount)
 {
@@ -150,6 +151,7 @@ ScDBData::ScDBData( const OUString& rName, const ScDBData& 
rData ) :
 bAutoFilter (rData.bAutoFilter),
 bModified   (rData.bModified),
 maTableColumnNames  (rData.maTableColumnNames),
+maTableColumnAttributes(rData.maTableColumnAttributes),
 mbTableColumnNamesDirty (rData.mbTableColumnNamesDirty),
 nFilteredRowCount   (rData.nFilteredRowCount)
 {
@@ -199,6 +201,7 @@ ScDBData& ScDBData::operator= (const ScDBData& rData)
 else
 {
 maTableColumnNames  = rData.maTableColumnNames;
+maTableColumnAttributes = rData.maTableColumnAttributes;
 mbTableColumnNamesDirty = rData.mbTableColumnNamesDirty;
 }
 
@@ -577,6 +580,7 @@ void ScDBData::UpdateMoveTab(SCTAB nOldPos, SCTAB nNewPos)
 aRange.aEnd.Row());
 // Do not use SetTableColumnNames() because that resets 
mbTableColumnNamesDirty.
 maTableColumnNames = aNames;
+maTableColumnAttributes.resize(aNames.size());
 mbTableColumnNamesDirty = bTableColumnNamesDirty;
 }
 
@@ -620,6 +624,7 @@ bool ScDBData::UpdateReference(const ScDocument* pDoc, 
UpdateRefMode eUpdateRefM
 MoveTo( theTab1, theCol1, theRow1, theCol2, theRow2 );
 // Do not use SetTableColumnNames() because that resets 
mbTableColumnNamesDirty.
 maTableColumnNames = aNames;
+maTableColumnAttributes.resize(aNames.size());
 mbTableColumnNamesDirty = bTableColumnNamesDirty;
 }
 
@@ -721,7 +726,6 @@ void ScDBData::AdjustTableColumnAttributes( UpdateRefMode 
eUpdateRefMode, SCCOL
 n += nDx;
 aNewNames.resize(n);
 aNewAttributes.resize(n);
-maTableColumnAttributes.resize(n);
 // Copy head.
 for (size_t i = 0; i < nHead; ++i)
 {
@@ -876,6 +880,7 @@ void ScDBData::RefreshTableColumnNames( ScDocument* pDoc )
 }
 
 aNewNames.swap( maTableColumnNames);
+maTableColumnAttributes.resize(maTableColumnNames.size());
 mbTableColumnNamesDirty = false;
 }
 
commit 67d353ff50712a036d04b1c0ffab68f2a21b5008
Author: Caolán McNamara 
AuthorDate: Wed Mar 15 20:05:33 2023 +
Commit: Caolán McNamara 
CommitDate: Thu Mar 16 13:08:20 2023 +

Related: 

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

2023-03-14 Thread Xisco Fauli (via logerrit)
 sc/qa/unit/scshapetest.cxx |  176 ++---
 1 file changed, 56 insertions(+), 120 deletions(-)

New commits:
commit 189bd2fee8d5cf0ae7189b3f1fb64471a42831d2
Author: Xisco Fauli 
AuthorDate: Tue Mar 14 12:43:34 2023 +0100
Commit: Xisco Fauli 
CommitDate: Tue Mar 14 19:51:29 2023 +

CppunitTest_sc_shapetest: pass parent path to ScModelTestBase

So it can use other file formats

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

diff --git a/sc/qa/unit/scshapetest.cxx b/sc/qa/unit/scshapetest.cxx
index 41c5db0a965a..465e69693b3e 100644
--- a/sc/qa/unit/scshapetest.cxx
+++ b/sc/qa/unit/scshapetest.cxx
@@ -40,7 +40,7 @@ class ScShapeTest : public ScModelTestBase
 {
 public:
 ScShapeTest()
-: ScModelTestBase("sc/qa/unit/data/ods")
+: ScModelTestBase("sc/qa/unit/data")
 {
 }
 };
@@ -135,7 +135,7 @@ CPPUNIT_TEST_FIXTURE(ScShapeTest, 
testTdf144242_Line_noSwapWH)
 CPPUNIT_TEST_FIXTURE(ScShapeTest, testTdf143619_validation_circle_pos)
 {
 // Load a document, which has validation circle around cell E6.
-createScDoc("tdf143619_validationCirclePos.ods");
+createScDoc("ods/tdf143619_validationCirclePos.ods");
 
 // Get document
 ScDocument* pDoc = getScDoc();
@@ -163,7 +163,7 @@ CPPUNIT_TEST_FIXTURE(ScShapeTest, 
testTdf140252_DragCreateFormControl)
 // Error was, that drag-created form controls were initially not on layer 
'controls' and thus
 // other shapes could be placed in front of form controls.
 // Load an empty document.
-createScDoc("ManualColWidthRowHeight.ods");
+createScDoc("ods/ManualColWidthRowHeight.ods");
 
 // Get ScTabViewShell
 ScTabViewShell* pTabViewShell = getViewShell();
@@ -209,7 +209,7 @@ CPPUNIT_TEST_FIXTURE(ScShapeTest, 
testTdf134355_DragCreateCustomShape)
 // layer is exclusively for form controls. Effect was, that other shapes 
could not be brought in
 // front of custom shapes.
 // Load an empty document.
-createScDoc("ManualColWidthRowHeight.ods");
+createScDoc("ods/ManualColWidthRowHeight.ods");
 
 // Get ScTabView
 ScTabViewShell* pTabViewShell = getViewShell();
@@ -248,7 +248,7 @@ CPPUNIT_TEST_FIXTURE(ScShapeTest, 
testTdf140252_LayerOfControl)
 // Error was, that a newly inserted control shape was put on layer
 // "vorne" instead of layer "control".
 // Load an empty document.
-createScDoc("ManualColWidthRowHeight.ods");
+createScDoc("ods/ManualColWidthRowHeight.ods");
 
 // Create default push button
 SfxUInt16Item aIdentifierItem(SID_FM_CONTROL_IDENTIFIER,
@@ -277,7 +277,7 @@ CPPUNIT_TEST_FIXTURE(ScShapeTest, testTdf137082_LTR_to_RTL)
 // mirrored. Graphics are still not mirrored but shifted. This test makes 
sure a shape is mirrored
 // and an image is not mirrored.
 
-createScDoc("tdf137082_LTR_arrow_image.ods");
+createScDoc("ods/tdf137082_LTR_arrow_image.ods");
 
 // Get document
 ScDocument* pDoc = getScDoc();
@@ -306,7 +306,7 @@ CPPUNIT_TEST_FIXTURE(ScShapeTest, 
testTdf137082_RTL_cell_anchored)
 {
 // Error was, that cell anchored custom shapes wrote wrong offsets to file 
and thus were wrong on
 // reloading. The file contains one custom shape with "resize" and another 
one without.
-createScDoc("tdf137082_RTL_cell_anchored.ods");
+createScDoc("ods/tdf137082_RTL_cell_anchored.ods");
 
 // Get document
 ScDocument* pDoc = getScDoc();
@@ -341,7 +341,7 @@ CPPUNIT_TEST_FIXTURE(ScShapeTest, 
testTdf137081_RTL_page_anchored)
 {
 // Error was, that page anchored lines and custom shapes were mirrored on 
opening. The document
 // contains measure line, polyline and transformed custom shape.
-createScDoc("tdf137081_RTL_page_anchored.ods");
+createScDoc("ods/tdf137081_RTL_page_anchored.ods");
 
 // Get document
 ScDocument* pDoc = getScDoc();
@@ -398,7 +398,7 @@ CPPUNIT_TEST_FIXTURE(ScShapeTest, 
testTdf137081_RTL_page_anchored)
 CPPUNIT_TEST_FIXTURE(ScShapeTest, testTdf139583_Rotate180deg)
 {
 // Load an empty document.
-createScDoc("ManualColWidthRowHeight.ods");
+createScDoc("ods/ManualColWidthRowHeight.ods");
 
 // Get document and draw page
 ScDocument* pDoc = getScDoc();
@@ -433,7 +433,7 @@ CPPUNIT_TEST_FIXTURE(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 distorted.
-createScDoc("tdf137033_FlipHoriRotCustomShape.ods");
+createScDoc("ods/tdf137033_FlipHoriRotCustomShape.ods");
 
 // Get document and shape
 ScDocument* pDoc = getScDoc();
@@ -464,7 +464,7 @@ CPPUNIT_TEST_FIXTURE(ScShapeTest, 
testTdf137033_RotShear_ResizeHide)
 // of the full sized shape were 

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

2023-02-28 Thread Xisco Fauli (via logerrit)
 sc/qa/unit/bugfix-test.cxx |  114 -
 1 file changed, 22 insertions(+), 92 deletions(-)

New commits:
commit e930c607cb9d0ba73912896d375f795df6c8c196
Author: Xisco Fauli 
AuthorDate: Tue Feb 28 14:05:49 2023 +0100
Commit: Xisco Fauli 
CommitDate: Tue Feb 28 20:35:49 2023 +

CppunitTest_sc_bugfix_test: use CPPUNIT_TEST_FIXTURE()

This suite is large enough so that avoiding the
declaration/registration/definition of each test manually saves a lot of
space.

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

diff --git a/sc/qa/unit/bugfix-test.cxx b/sc/qa/unit/bugfix-test.cxx
index ef8ac15be1a0..ae59efad0782 100644
--- a/sc/qa/unit/bugfix-test.cxx
+++ b/sc/qa/unit/bugfix-test.cxx
@@ -35,57 +35,9 @@ class ScFiltersTest : public ScModelTestBase
 {
 public:
 ScFiltersTest();
-
-void testTdf137576_Measureline();
-void testTdf137216_HideCol();
-void testTdf137044_CoverHiddenRows();
-void testTdf137020_FlipVertical();
-void testTdf64229();
-void testTdf36933();
-void testTdf43700();
-void testTdf43534();
-void testTdf91979();
-void testTdf98657();
-void testTdf88821();
-void testTdf88821_2();
-void testTdf103960();
-void testRhbz1390776();
-void testTdf104310();
-void testTdf31231();
-void testTdf141914();
-void testTdf128951();
-void testTdf129789();
-void testTdf130725();
-void testTdf104502_hiddenColsCountedInPageCount();
-void testTdf108188_pagestyle();
-
-CPPUNIT_TEST_SUITE(ScFiltersTest);
-CPPUNIT_TEST(testTdf137576_Measureline);
-CPPUNIT_TEST(testTdf137216_HideCol);
-CPPUNIT_TEST(testTdf137044_CoverHiddenRows);
-CPPUNIT_TEST(testTdf137020_FlipVertical);
-CPPUNIT_TEST(testTdf64229);
-CPPUNIT_TEST(testTdf36933);
-CPPUNIT_TEST(testTdf43700);
-CPPUNIT_TEST(testTdf43534);
-CPPUNIT_TEST(testTdf91979);
-CPPUNIT_TEST(testTdf98657);
-CPPUNIT_TEST(testTdf88821);
-CPPUNIT_TEST(testTdf88821_2);
-CPPUNIT_TEST(testTdf103960);
-CPPUNIT_TEST(testRhbz1390776);
-CPPUNIT_TEST(testTdf104310);
-CPPUNIT_TEST(testTdf31231);
-CPPUNIT_TEST(testTdf141914);
-CPPUNIT_TEST(testTdf128951);
-CPPUNIT_TEST(testTdf129789);
-CPPUNIT_TEST(testTdf130725);
-CPPUNIT_TEST(testTdf104502_hiddenColsCountedInPageCount);
-CPPUNIT_TEST(testTdf108188_pagestyle);
-CPPUNIT_TEST_SUITE_END();
 };
 
-void ScFiltersTest::testTdf137576_Measureline()
+CPPUNIT_TEST_FIXTURE(ScFiltersTest, testTdf137576_Measureline)
 {
 // The document contains a vertical measure line, anchored "To Cell 
(resize with cell)" with
 // length 37mm. Save and reload had resulted in a line of 0mm length.
@@ -127,7 +79,7 @@ void ScFiltersTest::testTdf137576_Measureline()
 CPPUNIT_ASSERT_POINT_EQUAL_WITH_TOLERANCE(Point(4800, 5200), aEnd2, 1);
 }
 
-void ScFiltersTest::testTdf137216_HideCol()
+CPPUNIT_TEST_FIXTURE(ScFiltersTest, testTdf137216_HideCol)
 {
 // The document contains a shape anchored "To Cell (resize with cell)" 
with start in C3.
 // Error was, that hiding column C did not make the shape invisible.
@@ -150,7 +102,7 @@ void ScFiltersTest::testTdf137216_HideCol()
 CPPUNIT_ASSERT_MESSAGE("after column hide: Object should be invisible", 
!pObj->IsVisible());
 }
 
-void ScFiltersTest::testTdf137044_CoverHiddenRows()
+CPPUNIT_TEST_FIXTURE(ScFiltersTest, testTdf137044_CoverHiddenRows)
 {
 // The document contains a shape anchored "To Cell (resize with cell)" 
with start in cell A4 and
 // end in cell A7. Row height is 30mm. Hiding rows 5 and 6, then saving 
and reload had resulted
@@ -198,7 +150,7 @@ void ScFiltersTest::testTdf137044_CoverHiddenRows()
 CPPUNIT_ASSERT_POINT_EQUAL_WITH_TOLERANCE(Point(2000, 2499), 
aReloadEndOffset, 1);
 }
 
-void ScFiltersTest::testTdf137020_FlipVertical()
+CPPUNIT_TEST_FIXTURE(ScFiltersTest, testTdf137020_FlipVertical)
 {
 // Get document
 createScDoc("ods/tdf137020_FlipVertical.ods");
@@ -236,7 +188,7 @@ void ScFiltersTest::testTdf137020_FlipVertical()
 CPPUNIT_ASSERT_RECTANGLE_EQUAL_WITH_TOLERANCE(aSnapRectOrig, 
aSnapRectReload, 1);
 }
 
-void ScFiltersTest::testTdf64229()
+CPPUNIT_TEST_FIXTURE(ScFiltersTest, testTdf64229)
 {
 createScDoc("ods/fdo64229b.ods");
 
@@ -251,7 +203,7 @@ void ScFiltersTest::testTdf64229()
 testFile(aCSVFileName, *pDoc, 0);
 }
 
-void ScFiltersTest::testTdf36933()
+CPPUNIT_TEST_FIXTURE(ScFiltersTest, testTdf36933)
 {
 createScDoc("ods/fdo36933test.ods");
 
@@ -266,7 +218,7 @@ void ScFiltersTest::testTdf36933()
 testFile(aCSVFileName, *pDoc, 0);
 }
 
-void ScFiltersTest::testTdf43700()
+CPPUNIT_TEST_FIXTURE(ScFiltersTest, testTdf43700)
 {
 createScDoc("ods/fdo43700test.ods");
 
@@ -281,7 +233,7 @@ void ScFiltersTest::testTdf43700()
 testFile(aCSVFileName, *pDoc, 

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

2022-12-01 Thread Xisco Fauli (via logerrit)
 sc/qa/unit/helper/qahelper.cxx  |5 -
 sc/qa/unit/helper/qahelper.hxx  |2 +-
 sc/qa/unit/subsequent_filters_test2.cxx |5 +++--
 sw/qa/inc/swmodeltestbase.hxx   |5 +
 sw/qa/unit/swmodeltestbase.cxx  |9 +++--
 5 files changed, 20 insertions(+), 6 deletions(-)

New commits:
commit 85fc28d328d7e53e6f263ac6d4ccbbf19d4db3c0
Author: Xisco Fauli 
AuthorDate: Thu Dec 1 11:30:45 2022 +0100
Commit: Xisco Fauli 
CommitDate: Thu Dec 1 13:03:02 2022 +0100

sw: check files are loaded without any warning error

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

diff --git a/sw/qa/inc/swmodeltestbase.hxx b/sw/qa/inc/swmodeltestbase.hxx
index 8b7775f1ae23..dda083f76539 100644
--- a/sw/qa/inc/swmodeltestbase.hxx
+++ b/sw/qa/inc/swmodeltestbase.hxx
@@ -330,6 +330,11 @@ protected:
  */
 SwDoc* getSwDoc();
 
+/**
+ * Gets SwDocShell from loaded component
+ */
+SwDocShell* getSwDocShell();
+
 /**
  * Wraps a reqif-xhtml fragment into an XHTML file, so an XML parser can
  * parse it.
diff --git a/sw/qa/unit/swmodeltestbase.cxx b/sw/qa/unit/swmodeltestbase.cxx
index a8dfc83493f9..05918c52397a 100644
--- a/sw/qa/unit/swmodeltestbase.cxx
+++ b/sw/qa/unit/swmodeltestbase.cxx
@@ -17,6 +17,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -447,6 +448,8 @@ void SwModelTestBase::loadURL(OUString const& rURL, const 
char* pName, const cha
 
 UnoApiXmlTest::load(rURL, pPassword);
 
+CPPUNIT_ASSERT(!getSwDocShell()->GetMedium()->GetWarningError());
+
 discardDumpedLayout();
 if (pName && mustCalcLayoutOf(pName))
 calcLayout();
@@ -581,12 +584,14 @@ void SwModelTestBase::createSwGlobalDoc(const char* pName)
 
CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.text.GlobalDocument"));
 }
 
-SwDoc* SwModelTestBase::getSwDoc()
+SwDoc* SwModelTestBase::getSwDoc() { return getSwDocShell()->GetDoc(); }
+
+SwDocShell* SwModelTestBase::getSwDocShell()
 {
 SwXTextDocument* pTextDoc = 
dynamic_cast(mxComponent.get());
 CPPUNIT_ASSERT(pTextDoc);
 
-return pTextDoc->GetDocShell()->GetDoc();
+return pTextDoc->GetDocShell();
 }
 
 void SwModelTestBase::WrapReqifFromTempFile(SvMemoryStream& rStream)
commit 145dc0c5a00f7ee81cc839c2b506ecbe0f634ea7
Author: Xisco Fauli 
AuthorDate: Thu Dec 1 10:41:29 2022 +0100
Commit: Xisco Fauli 
CommitDate: Thu Dec 1 13:02:47 2022 +0100

sc: check files are loaded without any warning error

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

diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx
index 336fd5754a29..dd1c6e09708c 100644
--- a/sc/qa/unit/helper/qahelper.cxx
+++ b/sc/qa/unit/helper/qahelper.cxx
@@ -469,7 +469,7 @@ void ScUcalcTestBase::tearDown()
 test::BootstrapFixture::tearDown();
 }
 
-void ScModelTestBase::createScDoc(const char* pName, const char* pPassword)
+void ScModelTestBase::createScDoc(const char* pName, const char* pPassword, 
bool bCheckWarningError)
 {
 if (!pName)
 load("private:factory/scalc");
@@ -478,6 +478,9 @@ void ScModelTestBase::createScDoc(const char* pName, const 
char* pPassword)
 
 uno::Reference xServiceInfo(mxComponent, 
uno::UNO_QUERY_THROW);
 
CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.sheet.SpreadsheetDocument"));
+
+if (bCheckWarningError)
+CPPUNIT_ASSERT(!getScDocShell()->GetMedium()->GetWarningError());
 }
 
 ScDocument* ScModelTestBase::getScDoc()
diff --git a/sc/qa/unit/helper/qahelper.hxx b/sc/qa/unit/helper/qahelper.hxx
index a8b48f938e01..80e7d53fae1f 100644
--- a/sc/qa/unit/helper/qahelper.hxx
+++ b/sc/qa/unit/helper/qahelper.hxx
@@ -154,7 +154,7 @@ public:
 {
 }
 
-void createScDoc(const char* pName = nullptr, const char* pPassword = 
nullptr);
+void createScDoc(const char* pName = nullptr, const char* pPassword = 
nullptr, bool bCheckErrorCode = true);
 ScDocument* getScDoc();
 ScDocShell* getScDocShell();
 ScTabViewShell* getViewShell();
diff --git a/sc/qa/unit/subsequent_filters_test2.cxx 
b/sc/qa/unit/subsequent_filters_test2.cxx
index e917d56ba836..d3744d33c86c 100644
--- a/sc/qa/unit/subsequent_filters_test2.cxx
+++ b/sc/qa/unit/subsequent_filters_test2.cxx
@@ -2880,7 +2880,7 @@ void ScFiltersTest2::testTooManyColsRows()
 {
 // The intentionally doc has cells beyond our MAXROW/MAXCOL, so there
 // should be a warning on load.
-createScDoc("ods/too-many-cols-rows.ods");
+createScDoc("ods/too-many-cols-rows.ods", /*pPassword*/ nullptr, 
/*bCheckWarningError*/ false);
 
 ScDocShell* pDocSh = getScDocShell();
 SfxMedium* pMedium = pDocSh->GetMedium();
@@ -2888,7 +2888,8 @@ void 

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

2022-09-20 Thread Luboš Luňák (via logerrit)
 sc/qa/unit/data/functions/fods/Functions_Excel_2016.fods |2 -
 sc/source/core/opencl/op_logical.hxx |3 +
 sc/source/core/opencl/op_statistical.cxx |   24 ++-
 sc/source/core/opencl/opbase.cxx |4 +-
 sc/source/core/opencl/opbase.hxx |   12 ---
 5 files changed, 29 insertions(+), 16 deletions(-)

New commits:
commit 7dc92d60166a99e0539ce83ecf45bb40fd30d784
Author: Luboš Luňák 
AuthorDate: Tue Sep 20 09:57:38 2022 +0200
Commit: Luboš Luňák 
CommitDate: Tue Sep 20 17:53:32 2022 +0200

fix opencl AND() to treat empty cell in svSingleVectorRef as core does

Functions_Excel_2016.fods incorrectly used "=AND(Sheet2.C22;C33)"
instead of the correct "=AND(Sheet2.C22:C33)" (colon vs semicolon),
and C33 is an empty cell. The return however was true because empty
cells get special treatment because of Excel compatibility.

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

diff --git a/sc/qa/unit/data/functions/fods/Functions_Excel_2016.fods 
b/sc/qa/unit/data/functions/fods/Functions_Excel_2016.fods
index f5c2aedd3abe..b4a6ea11500d 100644
--- a/sc/qa/unit/data/functions/fods/Functions_Excel_2016.fods
+++ b/sc/qa/unit/data/functions/fods/Functions_Excel_2016.fods
@@ -856,7 +856,7 @@
  
   1
  
- 
+ 
   WAAR
  
  
diff --git a/sc/source/core/opencl/op_logical.hxx 
b/sc/source/core/opencl/op_logical.hxx
index f4c6b7a952ef..a52d1db0cf86 100644
--- a/sc/source/core/opencl/op_logical.hxx
+++ b/sc/source/core/opencl/op_logical.hxx
@@ -32,6 +32,9 @@ public:
 virtual std::string BinFuncName() const override { return "And"; }
 virtual const char* openclOperator() const override { return "&&"; };
 virtual const char* defaultOpenclValue() const override { return "true"; }
+// AND() with a svSingleVectorRef pointing to an empty cell skips that 
cell.
+// See ScInterpreter::ScAnd().
+virtual const char* rangeEmptyCellValue() const override { return "1.0"; };
 };
 
 class OpOr: public OpLogicalBinaryOperator
diff --git a/sc/source/core/opencl/opbase.cxx b/sc/source/core/opencl/opbase.cxx
index 2cb51e47d080..fe98b4c09dd3 100644
--- a/sc/source/core/opencl/opbase.cxx
+++ b/sc/source/core/opencl/opbase.cxx
@@ -189,7 +189,7 @@ void SlidingFunctionBase::GenerateArg( const char* name, 
int arg, SubArguments&
 static_cast(token);
 ss << "if (gid0 >= " << svr->GetArrayLength() << " || isnan(";
 ss << vSubArguments[arg]->GenSlidingWindowDeclRef() << "))\n";
-ss << "" << name << " = 0.0;\n";
+ss << "" << name << " = " << rangeEmptyCellValue() << 
";\n";
 ss << "else\n";
 ss << "" << name << " = ";
 ss << vSubArguments[arg]->GenSlidingWindowDeclRef() << ";\n";
@@ -345,7 +345,7 @@ void SlidingFunctionBase::GenerateRangeArgElement( const 
char* name, int arg, co
 throw Unhandled( __FILE__, __LINE__ );
 const formula::DoubleVectorRefToken* pDVR =
 static_cast(token);
-ss << "double " << name << " = NAN;\n";
+ss << "double " << name << " = " << rangeEmptyCellValue() << ";\n";
 ss << "{\n";
 // GenSlidingWindowDeclRef() may refer to 'i' variable.
 ss << "int i = 0;\n";
diff --git a/sc/source/core/opencl/opbase.hxx b/sc/source/core/opencl/opbase.hxx
index ee55d72c45b6..aa2770cd20aa 100644
--- a/sc/source/core/opencl/opbase.hxx
+++ b/sc/source/core/opencl/opbase.hxx
@@ -261,12 +261,12 @@ public:
 const std::string&, SubArguments& ) = 0;
 protected:
 // generate code for "double  = ;" from vSubArguments, 
svDoubleVectorRef is not supported
-static void GenerateArg( const char* name, int arg, SubArguments& 
vSubArguments, outputstream& ss );
+void GenerateArg( const char* name, int arg, SubArguments& vSubArguments, 
outputstream& ss );
 // overload, variable will be named "arg"
-static void GenerateArg( int arg, SubArguments& vSubArguments, 
outputstream& ss );
+void GenerateArg( int arg, SubArguments& vSubArguments, outputstream& ss );
 // generate code for "double  = ;" from vSubArguments, if it 
exists,
 // otherwise set to 
-static void GenerateArgWithDefault( const char* name, int arg, double def, 
SubArguments& vSubArguments,
+void GenerateArgWithDefault( const char* name, int arg, double def, 
SubArguments& vSubArguments,
 outputstream& ss );
 void GenerateFunctionDeclaration( const std::string& sSymName,
 SubArguments& vSubArguments, outputstream& ss );
@@ -282,7 +282,7 @@ protected:
 // Overload.
 // Both arguments must be svDoubleRef of the same size.
 // If 'firstElementDiff' is set, the loop start will be offset by '+ 
firstElementDiff'.
-static 

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

2022-08-11 Thread Noel Grandin (via logerrit)
 sc/qa/unit/tiledrendering/tiledrendering.cxx |   26 ---
 sc/source/ui/view/tabvwshb.cxx   |   44 ++-
 sw/source/filter/ww8/ww8par.cxx  |2 -
 sw/source/filter/ww8/ww8par.hxx  |2 -
 sw/source/filter/ww8/ww8par5.cxx |   10 +++---
 5 files changed, 71 insertions(+), 13 deletions(-)

New commits:
commit c8ef47651a32c9cd00183d51fb31912990b89793
Author: Noel Grandin 
AuthorDate: Mon Aug 8 19:02:07 2022 +0200
Commit: Noel Grandin 
CommitDate: Thu Aug 11 10:32:36 2022 +0200

unique_ptr->optional in SwWW8ImplReader

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

diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index a22469ba2994..548726482993 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -5478,7 +5478,7 @@ ErrCode SwWW8ImplReader::CoreLoad(WW8Glossary const 
*pGloss)
 m_xLstManager.reset();
 }
 
-m_pPosAfterTOC.reset();
+m_oPosAfterTOC.reset();
 m_xRedlineStack.reset();
 mpCursor.reset();
 m_pPaM = nullptr;
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index fcd46da1cde4..f6c6e2fd9548 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -1399,7 +1399,7 @@ private:
 // Indicate that current on loading a hyperlink, which is inside a TOC; 
Managed by Read_F_Hyperlink() and End_Field()
 bool m_bLoadingTOXHyperlink;
 // a document position recorded the after-position of TOC section, managed 
by Read_F_TOX() and End_Field()
-std::unique_ptr m_pPosAfterTOC;
+std::optional m_oPosAfterTOC;
 // used for some dropcap tweaking
 std::unique_ptr m_xPreviousNode;
 
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index d59f41d68174..508cae886c1f 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -569,10 +569,10 @@ sal_uInt16 SwWW8ImplReader::End_Field()
 m_bCareLastParaEndInToc = true;
 }
 
-if (m_pPosAfterTOC)
+if (m_oPosAfterTOC)
 {
-*m_pPaM = *m_pPosAfterTOC;
-m_pPosAfterTOC.reset();
+*m_pPaM = *m_oPosAfterTOC;
+m_oPosAfterTOC.reset();
 }
 }
 }
@@ -3479,7 +3479,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, 
OUString& rStr )
 
 //The TOC field representation contents should be inserted into TOC 
section, but not after TOC section.
 //So we need update the document position when loading TOC representation 
and after loading TOC;
-m_pPosAfterTOC.reset(new SwPaM(*m_pPaM, m_pPaM));
+m_oPosAfterTOC.emplace(*m_pPaM, m_pPaM);
 (*m_pPaM).Move(fnMoveBackward);
 SwPaM aRegion(*m_pPaM, m_pPaM);
 
@@ -3500,7 +3500,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, 
OUString& rStr )
 
 // inserting a toc inserts a section before this point, so adjust pos
 // for future page/section segment insertion
-m_aSectionManager.PrependedInlineNode( *m_pPosAfterTOC->GetPoint(), 
aRegion.GetNode() );
+m_aSectionManager.PrependedInlineNode( *m_oPosAfterTOC->GetPoint(), 
aRegion.GetNode() );
 }
 
 // Set end in stack
commit 30efbe72f6b3a025ef12695b23821a77e1b1a887
Author: Noel Grandin 
AuthorDate: Wed Aug 10 10:04:09 2022 +0200
Commit: Noel Grandin 
CommitDate: Thu Aug 11 10:32:22 2022 +0200

calc: fix undo action disabled in different views

when actions are independant.

Update existing unit test to test this too.

Change-Id: I0af804321c371e72fb1ce096ec4ec3566a3fcffc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138079
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Noel Grandin 
(cherry picked from commit db23578b694228c983b615c9be6aed8a6a2af84b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138029
Tested-by: Jenkins

diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index 559769c0c251..cfd80d53fa89 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -1544,6 +1544,8 @@ void ScTiledRenderingTest::testDisableUndoRepair()
 int nView2 = SfxLokHelper::getView();
 SfxViewShell* pView2 = SfxViewShell::Current();
 CPPUNIT_ASSERT(pView1 != pView2);
+
+// both views have UNDO disabled
 {
 SfxItemSet aSet1(pView1->GetPool(), svl::Items);
 SfxItemSet aSet2(pView2->GetPool(), svl::Items);
@@ -1560,6 +1562,7 @@ void ScTiledRenderingTest::testDisableUndoRepair()
 

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

2022-05-27 Thread Luboš Luňák (via logerrit)
 sc/qa/unit/ucalc_formula.cxx   |   92 ++
 sc/source/core/tool/interpr1.cxx   |  130 ++---
 sc/source/core/tool/rangecache.cxx |5 -
 3 files changed, 175 insertions(+), 52 deletions(-)

New commits:
commit 7674399aac661eb503d7badc53b9a4d68bd9839d
Author: Luboš Luňák 
AuthorDate: Fri May 27 19:51:40 2022 +0200
Commit: Luboš Luňák 
CommitDate: Sat May 28 05:44:27 2022 +0200

try to range-reduce even COUNTIFS if not matching empty cells

It's possible to do reduce range of COUNTIFS to non-empty data too,
since empty cells cannot contribute to the result, as long as
the criteria do not require matching empty cells. Without this
queries like =COUNTIFS($A:$A,...) can spend most of their time
clearing and searching the vConditions vector that's big and
not useful for the trailing empty cells in that column.

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

diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index 14d779d2e4f3..6bad4a40127c 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -308,6 +308,7 @@ public:
 void testFuncRowsHidden();
 void testFuncSUMIFS();
 void testFuncCOUNTIFEmpty();
+void testFuncCOUNTIFSRangeReduce();
 void testFuncRefListArraySUBTOTAL();
 void testFuncJumpMatrixArrayIF();
 void testFuncJumpMatrixArrayOFFSET();
@@ -427,6 +428,7 @@ public:
 CPPUNIT_TEST(testFuncRowsHidden);
 CPPUNIT_TEST(testFuncSUMIFS);
 CPPUNIT_TEST(testFuncCOUNTIFEmpty);
+CPPUNIT_TEST(testFuncCOUNTIFSRangeReduce);
 CPPUNIT_TEST(testFuncRefListArraySUBTOTAL);
 CPPUNIT_TEST(testFuncJumpMatrixArrayIF);
 CPPUNIT_TEST(testFuncJumpMatrixArrayOFFSET);
@@ -9356,6 +9358,56 @@ void TestFormula::testFuncCOUNTIFEmpty()
 m_pDoc->DeleteTab(0);
 }
 
+// Test that COUNTIFS counts properly empty cells if asked to.
+void TestFormula::testFuncCOUNTIFSRangeReduce()
+{
+sc::AutoCalcSwitch aACSwitch(*m_pDoc, true); // turn auto calc on.
+m_pDoc->InsertTab(0, "Test");
+
+// Data in A1:C9.
+std::vector> aData = {
+{ "" },
+{ "a",  "1", "1" },
+{ "b",  "2", "2" },
+{ "c",  "4", "3" },
+{ "d",  "8", "4" },
+{ "a", "16", "5" },
+{ "" },
+{ "b", "", "6" },
+{ "c", "64", "7" }
+};
+
+insertRangeData(m_pDoc, ScAddress(0,0,0), aData);
+
+constexpr SCROW maxRow = 20; // so that the unittest is not slow in 
dbgutil builds
+ScRange aSubRange( ScAddress( 0, 0, 0 ), ScAddress( 2, maxRow, 0 ));
+m_pDoc->GetDataAreaSubrange(aSubRange);
+// This is the range the data should be reduced to in 
ScInterpreter::IterateParametersIfs().
+CPPUNIT_ASSERT_EQUAL( SCROW(1), aSubRange.aStart.Row());
+CPPUNIT_ASSERT_EQUAL( SCROW(8), aSubRange.aEnd.Row());
+
+m_pDoc->SetFormula( ScAddress(10, 0, 0), "=COUNTIFS($A1:$A" + 
OUString::number(maxRow+1)
++ "; \"\"; $B1:$B" + OUString::number(maxRow+1)
++ "; \"\"; $C1:$C" + OUString::number(maxRow+1) +"; \"\")",
+formula::FormulaGrammar::GRAM_NATIVE_UI);
+// But it should find out that it can't range reduce and must count all 
the empty rows.
+CPPUNIT_ASSERT_EQUAL( double(maxRow + 1 - 7), 
m_pDoc->GetValue(ScAddress(10, 0, 0)));
+
+// Check also with criteria set as cell references, the middle one 
resulting in matching
+// empty cells (which should cause ScInterpreter::IterateParametersIfs() 
to undo
+// the range reduction). This should only match the A8-C8 row, but it also 
shouldn't crash.
+// Matching empty cells using a cell reference needs a formula to set the 
cell to
+// an empty string, plain empty cell wouldn't do, so use K2 for that.
+m_pDoc->SetFormula( ScAddress(10, 1, 0), "=\"\"", 
formula::FormulaGrammar::GRAM_NATIVE_UI );
+m_pDoc->SetFormula( ScAddress(10, 0, 0), "=COUNTIFS($A1:$A" + 
OUString::number(maxRow+1)
++ "; A8; $B1:$B" + OUString::number(maxRow+1)
++ "; K2; $C1:$C" + OUString::number(maxRow+1) + "; C8)",
+formula::FormulaGrammar::GRAM_NATIVE_UI);
+CPPUNIT_ASSERT_EQUAL( double(1), m_pDoc->GetValue(ScAddress(10, 0, 0)));
+
+m_pDoc->DeleteTab(0);
+}
+
 // Test SUBTOTAL with reference lists in array context.
 void TestFormula::testFuncRefListArraySUBTOTAL()
 {
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index c6bcb29b28bb..0b3592976a71 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -5844,6 +5844,7 @@ void ScInterpreter::IterateParametersIfs( 
double(*ResultFunc)( const sc::ParamIf
 // matrix formula.
 vConditions.clear();
 
+// Range-reduce optimization
 SCCOL nStartColDiff = 0;
 SCCOL nEndColDiff = 0;
 SCROW nStartRowDiff = 0;
@@ -5851,43 +5852,39 @@ 

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

2022-05-16 Thread Mike Kaganski (via logerrit)
 sc/qa/uitest/chart/copyPaste.py  |3 
 sc/source/core/data/documen3.cxx |3 
 sc/source/core/data/documen5.cxx |3 
 sc/source/core/data/document.cxx |4 
 sc/source/ui/app/transobj.cxx|8 
 sc/source/ui/docshell/docsh.cxx  |  364 +++
 sc/source/ui/docshell/docsh2.cxx |   57 +++---
 sc/source/ui/docshell/docsh3.cxx |  114 ++--
 sc/source/ui/docshell/docsh4.cxx |  252 +--
 sc/source/ui/docshell/docsh5.cxx |  224 
 sc/source/ui/docshell/docsh6.cxx |   80 
 sc/source/ui/docshell/docsh8.cxx |   46 ++--
 sc/source/ui/inc/docsh.hxx   |8 
 sc/source/ui/inc/transobj.hxx|6 
 sc/source/ui/view/viewfun3.cxx   |8 
 15 files changed, 593 insertions(+), 587 deletions(-)

New commits:
commit 964e2eaae9d32df201574e6f083acc630fed2f1d
Author: Mike Kaganski 
AuthorDate: Mon May 16 09:03:03 2022 +0300
Commit: Mike Kaganski 
CommitDate: Tue May 17 06:15:48 2022 +0200

tdf#142635: use the same ScDocument for clipboard and GlobalDrawPersist

This way, the document used for chart copy has the proper sheets, and
the data ranges are created correctly.

This reverts commit 8d98dd8b3896c14af057e90e3a327172a9262e03
  Author Mike Kaganski 
  Date   Thu Jun 03 13:15:11 2021 +0200
tdf#142635: skip UITest for now

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

diff --git a/sc/qa/uitest/chart/copyPaste.py b/sc/qa/uitest/chart/copyPaste.py
index dfd38cbcc775..2df579db0bb5 100644
--- a/sc/qa/uitest/chart/copyPaste.py
+++ b/sc/qa/uitest/chart/copyPaste.py
@@ -7,8 +7,6 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 #
 
-import unittest
-import platform
 from uitest.framework import UITestCase
 from libreoffice.calc.document import get_cell_by_position
 from libreoffice.uno.propertyvalue import mkPropertyValues
@@ -16,7 +14,6 @@ from uitest.uihelper.common import get_url_for_data_file
 
 class CopyPaste(UITestCase):
 
-  @unittest.skipIf(platform.system() == "Windows", "Fails on Windows: 
tdf#142635")
   def test_copy_paste_chart_with_dot_in_sheet_name(self):
 with 
self.ui_test.load_file(get_url_for_data_file("chartWithDotInSheetName.ods")) as 
calc_doc:
 
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index 37c0839fcf26..77afc2ff7d94 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -1954,7 +1954,8 @@ void ScDocument::SetDocOptions( const ScDocOptions& rOpt )
 assert(pDocOptions && "No DocOptions! :-(");
 
 *pDocOptions = rOpt;
-mxPoolHelper->SetFormTableOpt(rOpt);
+if (mxPoolHelper)
+mxPoolHelper->SetFormTableOpt(rOpt);
 }
 
 const ScViewOptions& ScDocument::GetViewOptions() const
diff --git a/sc/source/core/data/documen5.cxx b/sc/source/core/data/documen5.cxx
index 1c695244bda4..c4f76433b41d 100644
--- a/sc/source/core/data/documen5.cxx
+++ b/sc/source/core/data/documen5.cxx
@@ -362,6 +362,9 @@ void ScDocument::UpdateChart( const OUString& rChartName )
 
 void ScDocument::RestoreChartListener( const OUString& rName )
 {
+if (!pChartListenerCollection)
+return;
+
 // Read the data ranges from the chart object, and start listening to 
those ranges again
 // (called when a chart is saved, because then it might be swapped out and 
stop listening itself).
 
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 8791c3afe1bd..8cf93a6abe5c 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -6155,12 +6155,12 @@ ScPatternAttr* ScDocument::GetDefPattern() const
 
 ScDocumentPool* ScDocument::GetPool()
 {
-return mxPoolHelper->GetDocPool();
+return mxPoolHelper ? mxPoolHelper->GetDocPool() : nullptr;
 }
 
 ScStyleSheetPool* ScDocument::GetStyleSheetPool() const
 {
-return mxPoolHelper->GetStylePool();
+return mxPoolHelper ? mxPoolHelper->GetStylePool() : nullptr;
 }
 
 bool ScDocument::IsEmptyData(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, 
SCROW nEndRow, SCTAB nTab) const
diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx
index fcc5158e0001..d0be7e0aecc2 100644
--- a/sc/source/ui/app/transobj.cxx
+++ b/sc/source/ui/app/transobj.cxx
@@ -109,8 +109,8 @@ void ScTransferObj::PaintToDev( OutputDevice* pDev, 
ScDocument& rDoc, double nPr
 ScPrintFunc::DrawToDev( rDoc, pDev, nPrintFactor, aBound, , 
false/*bMetaFile*/ );
 }
 
-ScTransferObj::ScTransferObj( ScDocumentUniquePtr pClipDoc, const 
TransferableObjectDescriptor& rDesc ) :
-m_pDoc( std::move(pClipDoc ) ),
+ScTransferObj::ScTransferObj( const std::shared_ptr& pClipDoc, 
const TransferableObjectDescriptor& rDesc ) :
+m_pDoc( pClipDoc ),
 m_nNonFiltered(0),
 m_aObjDesc( rDesc ),
 m_nDragHandleX( 0 ),
@@ -813,14 

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

2022-05-16 Thread Mike Kaganski (via logerrit)
 sc/qa/uitest/calc_tests9/tdf95554.py  |   10 --
 sw/qa/uitest/writer_tests4/spellDialog.py |2 +-
 2 files changed, 9 insertions(+), 3 deletions(-)

New commits:
commit 10bc799f9da2a4fdf2adf820d53175e4789fa6fe
Author: Mike Kaganski 
AuthorDate: Mon May 16 15:00:20 2022 +0200
Commit: Mike Kaganski 
CommitDate: Mon May 16 20:22:43 2022 +0200

Fix a UITest on Windows

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

diff --git a/sw/qa/uitest/writer_tests4/spellDialog.py 
b/sw/qa/uitest/writer_tests4/spellDialog.py
index 4a319790d0b0..4d2b4b6222ee 100644
--- a/sw/qa/uitest/writer_tests4/spellDialog.py
+++ b/sw/qa/uitest/writer_tests4/spellDialog.py
@@ -110,7 +110,7 @@ frog, dogg, catt"""
 # Without the fix in place, this test would have crashed 
here
 xChangeBtn.executeAction("CLICK", ())
 
-output_text = writer_doc.Text.getString().replace('\n', '')
+output_text = writer_doc.Text.getString().replace('\n', 
'').replace('\r', '')
 self.assertTrue(output_text.startswith("xx xx xx xxix 
xxviii"))
 
 def test_tdf66043(self):
commit 212eeff28317543d66acec2be551d7da9ff2a87d
Author: Mike Kaganski 
AuthorDate: Mon May 16 14:06:12 2022 +0200
Commit: Mike Kaganski 
CommitDate: Mon May 16 20:22:33 2022 +0200

Fix a UITest on Windows

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

diff --git a/sc/qa/uitest/calc_tests9/tdf95554.py 
b/sc/qa/uitest/calc_tests9/tdf95554.py
index 3a8d92ce2c22..734711e415e7 100644
--- a/sc/qa/uitest/calc_tests9/tdf95554.py
+++ b/sc/qa/uitest/calc_tests9/tdf95554.py
@@ -11,6 +11,8 @@ from uitest.framework import UITestCase
 from libreoffice.uno.propertyvalue import mkPropertyValues
 from uitest.uihelper.calc import enter_text_to_cell
 
+import platform
+
 class Tdf95554(UITestCase):
 
def test_tdf95554(self):
@@ -39,7 +41,11 @@ class Tdf95554(UITestCase):
 # Without the fix, the test breaks here with:
 #AssertionError: 'A\n\nC\n\nE\nF' != 'A'
 
-self.assertEqual('A\n\nC\n\nE\nF',
-writer_document.Text.String)
+if platform.system() == "Windows":
+self.assertEqual('A\r\n\r\nC\r\n\r\nE\r\nF',
+writer_document.Text.String)
+else:
+self.assertEqual('A\n\nC\n\nE\nF',
+writer_document.Text.String)
 
 # vim: set shiftwidth=4 softtabstop=4 expandtab:
\ No newline at end of file


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

2022-05-16 Thread Luboš Luňák (via logerrit)
 sc/qa/unit/data/functions/spreadsheet/fods/getpivotdata.fods |   14 ---
 sc/source/core/data/dpobject.cxx |6 +++-
 sc/source/core/data/dpsave.cxx   |3 +-
 svl/source/items/stylepool.cxx   |2 -
 sw/source/filter/ww8/writerhelper.cxx|2 -
 sw/source/filter/ww8/wrtw8nds.cxx|2 -
 6 files changed, 20 insertions(+), 9 deletions(-)

New commits:
commit 86039563de87149a01ffb980b5ec99074b98fd5e
Author: Luboš Luňák 
AuthorDate: Sat May 14 16:52:09 2022 +0200
Commit: Luboš Luňák 
CommitDate: Mon May 16 09:05:00 2022 +0200

std::stable_sort() where libc++ debug mode breaks a unittest

Libc++ debug has a feature that randomizes equal elements during
sort, which normally wouldn't make a difference, but some tests
rely on specific order of tested data. The ones failing without
this include:
CppunitTest_sw_ooxmlexport testMsoPosition
CppunitTest_sw_xhtmlexport testTdf66305
CppunitTest_sw_ww8export testCommentExport

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

diff --git a/svl/source/items/stylepool.cxx b/svl/source/items/stylepool.cxx
index b74d0cb94729..dc992a6ede72 100644
--- a/svl/source/items/stylepool.cxx
+++ b/svl/source/items/stylepool.cxx
@@ -261,7 +261,7 @@ namespace {
 // Sort the parents using their name, if they have one.
 if (!rParentNames.empty())
 {
-std::sort(maParents.begin(), maParents.end(),
+std::stable_sort(maParents.begin(), maParents.end(),
   [](const SfxItemSet* pA, const 
SfxItemSet* pB) {
   OUString aA;
   OUString aB;
diff --git a/sw/source/filter/ww8/writerhelper.cxx 
b/sw/source/filter/ww8/writerhelper.cxx
index 6c62af767ab0..9c3bae38f14d 100644
--- a/sw/source/filter/ww8/writerhelper.cxx
+++ b/sw/source/filter/ww8/writerhelper.cxx
@@ -838,7 +838,7 @@ namespace sw
 
 RedlineStack::~RedlineStack()
 {
-std::sort(maStack.begin(), maStack.end(), CompareRedlines());
+std::stable_sort(maStack.begin(), maStack.end(), 
CompareRedlines());
 std::for_each(maStack.begin(), maStack.end(), 
SetInDocAndDelete(mrDoc));
 }
 
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx 
b/sw/source/filter/ww8/wrtw8nds.cxx
index 3ff1326c24a7..da9c73099dae 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -220,7 +220,7 @@ SwWW8AttrIter::SwWW8AttrIter(MSWordExportBase& rWr, const 
SwTextNode& rTextNd) :
  Get list of any graphics which may be anchored from this paragraph.
 */
 maFlyFrames = GetFramesInNode(rWr.m_aFrames, m_rNode);
-std::sort(maFlyFrames.begin(), maFlyFrames.end(), sortswflys());
+std::stable_sort(maFlyFrames.begin(), maFlyFrames.end(), sortswflys());
 
 /*
  #i18480#
commit ca8614fc44e66308b846d01b8c0ab6a63cc93eb9
Author: Luboš Luňák 
AuthorDate: Sun May 15 06:36:44 2022 +0200
Commit: Luboš Luňák 
CommitDate: Mon May 16 09:04:46 2022 +0200

fix GETPIVOTDATA() field name lookup

Field names are case-insensitive, so the lookup was failing if
the name wasn't typed in a way that matched exactly as
case-sensitive. The A29 field in getpivotdata.fods test was passing
only because the fields were typed in the same order as present
in the pivot table, and std::sort() was accidentally stable. But
reordering the fields in the formula makes it fail, and so does
using libc++ with debug mode (which randomizes equal fields
in std::sort()).

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

diff --git a/sc/qa/unit/data/functions/spreadsheet/fods/getpivotdata.fods 
b/sc/qa/unit/data/functions/spreadsheet/fods/getpivotdata.fods
index 7ea70d7b3acf..b392f066bc2b 100644
--- a/sc/qa/unit/data/functions/spreadsheet/fods/getpivotdata.fods
+++ b/sc/qa/unit/data/functions/spreadsheet/fods/getpivotdata.fods
@@ -7906,9 +7906,17 @@
  
 
 
- 
- 
- 
+ 
+  34
+ 
+ 
+  34
+ 
+ 
+  TRUE
+ 
+ 
  
  
 
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index efa77beb3377..b74fc5d7dfe5 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -1341,11 +1341,13 @@ public:
 {
 size_t nRank1 = mrDimOrder.size();
 size_t nRank2 = mrDimOrder.size();
-ScDPSaveData::DimOrderType::const_iterator it1 = 
mrDimOrder.find(r1.FieldName);
+ScDPSaveData::DimOrderType::const_iterator it1 = mrDimOrder.find(
+   

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

2022-05-15 Thread Luboš Luňák (via logerrit)
 sc/qa/unit/data/functions/statistical/fods/countif.fods  |   54 +++--
 sc/qa/unit/data/functions/statistical/fods/countifs.fods |   58 +--
 sc/source/core/data/queryiter.cxx|9 ++
 3 files changed, 106 insertions(+), 15 deletions(-)

New commits:
commit 8f61250bf9804ed54e7d960f1446a40b29d1a122
Author: Luboš Luňák 
AuthorDate: Fri May 13 17:01:32 2022 +0200
Commit: Luboš Luňák 
CommitDate: Sun May 15 10:50:15 2022 +0200

no ScSortedRangeCache-based query for number-as-string (tdf#149071)

The comparison depends on the cell encountered, which makes it hard
to prepare the sorted data.

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

diff --git a/sc/qa/unit/data/functions/statistical/fods/countif.fods 
b/sc/qa/unit/data/functions/statistical/fods/countif.fods
index 3e77a2ed49c8..41ee8f439791 100644
--- a/sc/qa/unit/data/functions/statistical/fods/countif.fods
+++ b/sc/qa/unit/data/functions/statistical/fods/countif.fods
@@ -4048,16 +4048,54 @@
  
 
 
+ 
+  1
+ 
+ 
+  1
+ 
+ 
+  TRUE
+ 
+ 
+  =COUNTIF(I46:L46;)
+ 
+ 
+  numbers entered as string
+ 
+ 
+  3
+ 
  
- 
- 
- 
- 
- 
- 
- 
+ 
+  3
+ 
 
-
+
+ 
+  0
+ 
+ 
+  0
+ 
+ 
+  TRUE
+ 
+ 
+  =COUNTIF(I47:L47;)
+ 
+ 
+  numbers entered as string
+ 
+ 
+  2
+ 
+ 
+ 
+  1
+ 
+
+
  
  
  
diff --git a/sc/qa/unit/data/functions/statistical/fods/countifs.fods 
b/sc/qa/unit/data/functions/statistical/fods/countifs.fods
index 21f247f7139f..b236a8bebb83 100644
--- a/sc/qa/unit/data/functions/statistical/fods/countifs.fods
+++ b/sc/qa/unit/data/functions/statistical/fods/countifs.fods
@@ -3898,10 +3898,54 @@
  
   =COUNTIFS(AF2:AF7,   
AF6,AG2:AG7,  AG4)
  
- 
- 
- 
- 
+
+
+ 
+  1
+ 
+ 
+  1
+ 
+ 
+  TRUE
+ 
+ 
+  =COUNTIFS(I38:I39;F38)
+ 
+ 
+  numbers entered as string
+ 
+ 
+  3
+ 
+ 
+ 
+  3
+ 
+
+
+ 
+  0
+ 
+ 
+  0
+ 
+ 
+  TRUE
+ 
+ 
+  =COUNTIFS(I38:I39;F39)
+ 
+ 
+  numbers entered as string
+ 
+ 
+  2
+ 
+ 
+ 
+  1
+ 
 
 
  
@@ -4335,17 +4379,17 @@
   
   
  
- 
+ 
   
   
   
  
- 
+ 
   
   
   
  
- 
+ 
   
   
   
diff --git a/sc/source/core/data/queryiter.cxx 
b/sc/source/core/data/queryiter.cxx
index f492d917b1eb..aeb310c706b5 100644
--- a/sc/source/core/data/queryiter.cxx
+++ b/sc/source/core/data/queryiter.cxx
@@ -1238,6 +1238,13 @@ static bool CanBeUsedForSorterCache(const ScDocument& 
rDoc, const ScQueryParam&
 && rParam.GetEntry(0).eOp != SC_GREATER && rParam.GetEntry(0).eOp != 
SC_GREATER_EQUAL
 && rParam.GetEntry(0).eOp != SC_EQUAL)
 return false;
+// tdf#149071 - numbers entered as string can be compared both as numbers
+// and as strings, depending on the cell content, and that makes it hard 
to pre-sort
+// the data; such queries are ScQueryEntry::ByValue but have maString set 
too
+// (see ScQueryParamBase::FillInExcelSyntax())
+if(rParam.GetEntry(0).GetQueryItem().meType == ScQueryEntry::ByValue
+&& rParam.GetEntry(0).GetQueryItem().maString.isValid())
+return false;
 // For unittests allow inefficient caching, in order for the code to be 
checked.
 static bool inUnitTest = getenv("LO_TESTNAME") != nullptr;
 if(refData == nullptr || refData->Ref1.IsRowRel() || 
refData->Ref2.IsRowRel())
commit 3165328258c2d7031801d6074611f82b59bec8b5
Author: Luboš Luňák 
AuthorDate: Fri May 13 15:31:28 2022 +0200
Commit: Luboš Luňák 
CommitDate: Sun May 15 10:50:00 2022 +0200

ScSortedRangeCache-based query doesn't work with mbRangeLookup

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

diff --git a/sc/source/core/data/queryiter.cxx 
b/sc/source/core/data/queryiter.cxx
index ac8c791710e2..f492d917b1eb 100644
--- a/sc/source/core/data/queryiter.cxx
+++ b/sc/source/core/data/queryiter.cxx
@@ -1229,6 +1229,8 @@ static bool CanBeUsedForSorterCache(const ScDocument& 
rDoc, const ScQueryParam&
 return false;
 if(rParam.bHasHeader)
 return false;
+if(rParam.mbRangeLookup)
+return false;
 if(rParam.GetEntry(0).GetQueryItem().meType == ScQueryEntry::ByString
 && !ScQueryEvaluator::isMatchWholeCell(rDoc, rParam.GetEntry(0)))
 return false; // substring 

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

2022-02-14 Thread Luboš Luňák (via logerrit)
 sc/qa/unit/data/ods/ranges-column-2000.ods |binary
 sc/qa/unit/helper/qahelper.cxx |   32 +++--
 sc/qa/unit/helper/qahelper.hxx |   10 ++--
 sc/qa/unit/jumbosheets-test.cxx|   69 ++---
 4 files changed, 85 insertions(+), 26 deletions(-)

New commits:
commit 92d08206b48f8ac426dce9bdfda599cb997e1f41
Author: Luboš Luňák 
AuthorDate: Mon Feb 14 18:52:50 2022 +0100
Commit: Luboš Luňák 
CommitDate: Tue Feb 15 08:18:54 2022 +0100

test for jumbosheet named ranges export/import

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

diff --git a/sc/qa/unit/data/ods/ranges-column-2000.ods 
b/sc/qa/unit/data/ods/ranges-column-2000.ods
new file mode 100644
index ..0d2a408ce767
Binary files /dev/null and b/sc/qa/unit/data/ods/ranges-column-2000.ods differ
diff --git a/sc/qa/unit/jumbosheets-test.cxx b/sc/qa/unit/jumbosheets-test.cxx
index 091fc2438c19..4ca4eeaf1ed6 100644
--- a/sc/qa/unit/jumbosheets-test.cxx
+++ b/sc/qa/unit/jumbosheets-test.cxx
@@ -46,6 +46,7 @@ public:
 void testRoundtripColumn2000Ods();
 void testRoundtripColumn2000Xlsx();
 void testRoundtripColumnRange();
+void testRoundtripNamedRanges();
 void testTdf134392();
 void testTdf133033();
 void testTdf109061();
@@ -55,6 +56,7 @@ public:
 CPPUNIT_TEST(testRoundtripColumn2000Ods);
 CPPUNIT_TEST(testRoundtripColumn2000Xlsx);
 CPPUNIT_TEST(testRoundtripColumnRange);
+CPPUNIT_TEST(testRoundtripNamedRanges);
 CPPUNIT_TEST(testTdf134392);
 CPPUNIT_TEST(testTdf133033);
 CPPUNIT_TEST(testTdf109061);
@@ -176,6 +178,61 @@ void ScJumboSheetsTest::testRoundtripColumnRange()
 xDocSh3->DoClose();
 }
 
+void ScJumboSheetsTest::testRoundtripNamedRanges()
+{
+ScDocShellRef xDocSh1 = loadDoc(u"ranges-column-2000.", FORMAT_ODS);
+CPPUNIT_ASSERT(xDocSh1.is());
+
+std::pair ranges[] = { { "CELLBXX1", "$Sheet1.$BXX$1" 
},
+   { "CELLSA4_AMJ4", 
"$Sheet1.$A$4:$AMJ$4" },
+   { "CELLSBXX1_BXX10", 
"$Sheet1.$BXX$1:$BXX$10" },
+   { "CELLSBXX1_BXX10_RELATIVE", 
"$Sheet1.BXX1:BXX10" },
+   { "CELLSE1_E1024", 
"$Sheet1.$E$1:$E$1024" },
+   { "CELLSE1_E200", 
"$Sheet1.$E$1:$E$200" },
+   { "COLUMN_E", "$Sheet1.$E:$E" },
+   { "ROW_4", "$Sheet1.$4:$4" } };
+{
+ScDocument& rDoc = xDocSh1->GetDocument();
+for (const auto& range : ranges)
+{
+ScRangeData* rangeData = 
rDoc.GetRangeName()->findByUpperName(range.first);
+CPPUNIT_ASSERT(rangeData);
+CPPUNIT_ASSERT_EQUAL(range.second, rangeData->GetSymbol());
+}
+}
+
+std::shared_ptr exportedFile;
+ScDocShellRef xDocSh2 = saveAndReloadNoClose(*xDocSh1, FORMAT_ODS, 
);
+CPPUNIT_ASSERT(xDocSh2.is());
+
+{
+ScDocument& rDoc = xDocSh2->GetDocument();
+for (const auto& range : ranges)
+{
+ScRangeData* rangeData = 
rDoc.GetRangeName()->findByUpperName(range.first);
+CPPUNIT_ASSERT(rangeData);
+CPPUNIT_ASSERT_EQUAL(range.second, rangeData->GetSymbol());
+}
+}
+
+ScDocShellRef xDocSh3 = saveAndReloadNoClose(*xDocSh1, FORMAT_XLSX, 
);
+CPPUNIT_ASSERT(xDocSh3.is());
+
+{
+ScDocument& rDoc = xDocSh3->GetDocument();
+for (const auto& range : ranges)
+{
+ScRangeData* rangeData = 
rDoc.GetRangeName()->findByUpperName(range.first);
+CPPUNIT_ASSERT(rangeData);
+CPPUNIT_ASSERT_EQUAL(range.second, rangeData->GetSymbol());
+}
+}
+
+xDocSh1->DoClose();
+xDocSh2->DoClose();
+xDocSh3->DoClose();
+}
+
 void ScJumboSheetsTest::testTdf134392()
 {
 // Without the fix in place, the file would have crashed
commit 3c24fe20ec6cb450abc4a822d323874ebbaecb10
Author: Luboš Luňák 
AuthorDate: Fri Feb 11 23:14:18 2022 +0100
Commit: Luboš Luňák 
CommitDate: Tue Feb 15 08:18:39 2022 +0100

don't export a document twice in a test when not needed

XPathHelper::parseExport2() exports the document, which duplicates
what saveAndReload() does, it's enough to use the first export.

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

diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx
index 6bef6d0823f4..5f0ae6389df9 100644
--- a/sc/qa/unit/helper/qahelper.cxx
+++ b/sc/qa/unit/helper/qahelper.cxx
@@ -700,11 +700,11 @@ void 

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

2022-01-20 Thread Rafael Lima (via logerrit)
 sc/qa/uitest/inputLine/tdf67346.py   |   21 -
 sw/uiconfig/swriter/ui/indexentry.ui |8 ++--
 2 files changed, 18 insertions(+), 11 deletions(-)

New commits:
commit 9fbda3ca63c940dac566076eeeb54a7b33f3da3c
Author: Rafael Lima 
AuthorDate: Tue Jan 4 15:46:14 2022 +0100
Commit: Olivier Hallot 
CommitDate: Thu Jan 20 13:38:29 2022 +0100

tdf#146294 Fix extended tooltips for Next/Previous buttons

This patch also adds normal tooltips for the four navigation buttons.

The corresponding help page will be updated in a subsequent patch.

Change-Id: Ib7d77a643847e417cd66cf872739e39187555df1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127950
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 
Reviewed-by: Olivier Hallot 

diff --git a/sw/uiconfig/swriter/ui/indexentry.ui 
b/sw/uiconfig/swriter/ui/indexentry.ui
index 6d4db8eb252b..cadb430f1754 100644
--- a/sw/uiconfig/swriter/ui/indexentry.ui
+++ b/sw/uiconfig/swriter/ui/indexentry.ui
@@ -536,6 +536,7 @@
 center
 image2
 True
+Previous entry
 
   
 Jumps to the previous index entry of 
the same type in the document.
@@ -556,6 +557,7 @@
 center
 image3
 True
+Next entry
 
   
 Jumps to the next index entry of the 
same type in the document.
@@ -576,9 +578,10 @@
 center
 image4
 True
+Previous entry (same name)
 
   
-Jumps to the first index entry of the 
same type in the document.
+Jumps to the previous index entry of 
the same type and with the same name in the document.
   
 
   
@@ -596,9 +599,10 @@
 center
 image5
 True
+Next entry (same name)
 
   
-Jumps to the last index entry of the 
same type in the document.
+Jumps to the next index entry of the 
same type and with the same name in the document.
   
 
   
commit 5c3ae3024891341c8bcf77ad6b22c2a8c74585c5
Author: Xisco Fauli 
AuthorDate: Thu Jan 20 11:54:16 2022 +0100
Commit: Xisco Fauli 
CommitDate: Thu Jan 20 13:38:18 2022 +0100

uitest: sc: make sure text is copied from the input window

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

diff --git a/sc/qa/uitest/inputLine/tdf67346.py 
b/sc/qa/uitest/inputLine/tdf67346.py
index 3870a3093d39..5d5ff32cefb5 100644
--- a/sc/qa/uitest/inputLine/tdf67346.py
+++ b/sc/qa/uitest/inputLine/tdf67346.py
@@ -8,13 +8,10 @@
 #
 from uitest.framework import UITestCase
 from uitest.uihelper.common import get_state_as_dict
-from uitest.uihelper.common import select_pos
 from uitest.uihelper.calc import enter_text_to_cell
-from libreoffice.calc.document import get_sheet_from_doc
-from libreoffice.calc.conditional_format import 
get_conditional_format_from_sheet
-from uitest.debug import sleep
 from libreoffice.calc.document import get_cell_by_position
 from libreoffice.uno.propertyvalue import mkPropertyValues
+
 #Bug 67346 - EDITING: Undo broken when pasting text that has been copied from 
the input line
 
 class tdf67346(UITestCase):
@@ -23,19 +20,25 @@ class tdf67346(UITestCase):
 with self.ui_test.create_doc_in_start_center("calc") as document:
 xCalcDoc = self.xUITest.getTopFocusWindow()
 gridwin = xCalcDoc.getChild("grid_window")
-# type 'Apple' in A1
+
 enter_text_to_cell(gridwin, "A1", "Apple")
-# input line: copy the text from there
+
+# Move focus to input window and copy the text from there
+gridwin.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"CTRL+SHIFT+F2"}))
+
 xInputWin = xCalcDoc.getChild("sc_input_window")
-xInputWin.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"CTRL+A"}))
+self.assertEqual('true', get_state_as_dict(xInputWin)["HasFocus"])
+
+self.xUITest.executeCommand(".uno:SelectAll")
 self.xUITest.executeCommand(".uno:Copy")
+
 

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

2021-05-24 Thread Luboš Luňák (via logerrit)
 sc/qa/unit/uicalc/uicalc.cxx |   30 ++
 vcl/skia/x11/textrender.cxx  |3 +--
 2 files changed, 31 insertions(+), 2 deletions(-)

New commits:
commit 2dc3097702c3b0b9225b5abadc94b90d63e628e7
Author: Luboš Luňák 
AuthorDate: Wed May 5 19:51:35 2021 +0200
Commit: Luboš Luňák 
CommitDate: Mon May 24 10:57:53 2021 +0200

fix skia/x11 text artifical italic

This is supposed to be floating-point division. Also, the 0x6000
value comes from cairo text rendering, but it seems to be too much,
0x4000 visually seems to give a better result (and also avoid
clipping in some cases).

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

diff --git a/vcl/skia/x11/textrender.cxx b/vcl/skia/x11/textrender.cxx
index e8596641c052..7021d9794f5e 100644
--- a/vcl/skia/x11/textrender.cxx
+++ b/vcl/skia/x11/textrender.cxx
@@ -50,9 +50,8 @@ void SkiaTextRender::DrawTextLayout(const GenericSalLayout& 
rLayout, const SalGr
 = SkFontMgr_createTypefaceFromFcPattern(fontManager, 
rFont.GetFontOptions()->GetPattern());
 SkFont font(typeface, nHeight);
 font.setScaleX(1.0 * nWidth / nHeight);
-// TODO are these correct?
 if (rFont.NeedsArtificialItalic())
-font.setSkewX(-0x6000L / 0x1L);
+font.setSkewX(1.0 * -0x4000L / 0x1L);
 if (rFont.NeedsArtificialBold())
 font.setEmbolden(true);
 font.setEdging(rFont.GetAntialiasAdvice() ? SkFont::Edging::kAntiAlias
commit 27192c82ab143287327367d6165737086613021f
Author: Xisco Fauli 
AuthorDate: Mon May 24 09:30:01 2021 +0200
Commit: Xisco Fauli 
CommitDate: Mon May 24 10:57:41 2021 +0200

tdf#134675: sc_uicalc: Add unittest

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

diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx
index e86bfbfa62a7..aa5d8b5fcd02 100644
--- a/sc/qa/unit/uicalc/uicalc.cxx
+++ b/sc/qa/unit/uicalc/uicalc.cxx
@@ -1566,6 +1566,36 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf123202)
 CPPUNIT_ASSERT(pDoc->RowHidden(2, 0));
 }
 
+CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf134675)
+{
+mxComponent = loadFromDesktop("private:factory/scalc");
+ScModelObj* pModelObj = dynamic_cast(mxComponent.get());
+CPPUNIT_ASSERT(pModelObj);
+ScDocument* pDoc = pModelObj->GetDocument();
+CPPUNIT_ASSERT(pDoc);
+insertStringToCell(*pModelObj, "A1", "A");
+
+// Select column A
+goToCell("A:A");
+
+dispatchCommand(mxComponent, ".uno:Copy", {});
+Scheduler::ProcessEventsToIdle();
+
+// Select column B to Z
+goToCell("B:Z");
+
+dispatchCommand(mxComponent, ".uno:Paste", {});
+Scheduler::ProcessEventsToIdle();
+
+for (size_t i = 1; i < 24; ++i)
+{
+// Without the fix in place, this test would have failed here with
+// - Expected: A
+// - Actual  :
+CPPUNIT_ASSERT_EQUAL(OUString("A"), pDoc->GetString(ScAddress(i, 0, 
0)));
+}
+}
+
 CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf116215)
 {
 mxComponent = loadFromDesktop("private:factory/scalc");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-08 Thread Szymon Kłos (via logerrit)
 sc/qa/uitest/calc_tests9/pivotTable.py |6 ++--
 sc/source/ui/attrdlg/scdlgfact.cxx |   14 --
 sc/source/ui/attrdlg/scdlgfact.hxx |   10 ---
 sc/source/ui/dbgui/PivotLayoutTreeList.cxx |   26 +++
 sc/source/ui/dbgui/PivotLayoutTreeListData.cxx |   34 ++---
 sc/source/ui/dbgui/pvfundlg.cxx|9 --
 sc/source/ui/inc/PivotLayoutTreeList.hxx   |1 
 sc/source/ui/inc/pvfundlg.hxx  |4 ++
 sfx2/source/appl/sfxhelp.cxx   |7 +
 9 files changed, 74 insertions(+), 37 deletions(-)

New commits:
commit 6b51f618e3ddfc7350a25a1f2bde689fed735f36
Author: Szymon Kłos 
AuthorDate: Mon Feb 8 19:01:00 2021 +0100
Commit: Szymon Kłos 
CommitDate: Mon Mar 8 11:51:02 2021 +0100

lok: send help even when document not ready

Change-Id: I44855ef00a6c54a774965b3c951a4476ed5c8b01
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110593
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Henry Castro 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112159
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 

diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 03afafcd4fa4..2e3e80680feb 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -719,6 +719,13 @@ static bool impl_showOnlineHelp( const OUString& rURL )

aHelpLink.toUtf8().getStr());
 return true;
 }
+else if (GetpApp())
+{
+
GetpApp()->libreOfficeKitViewCallback(LOK_CALLBACK_HYPERLINK_CLICKED,
+   
aHelpLink.toUtf8().getStr());
+return true;
+}
+
 return false;
 }
 
commit c883303400158573cfd3dc2bc0ad59fa8f64ce48
Author: Szymon Kłos 
AuthorDate: Tue Dec 15 15:31:49 2020 +0100
Commit: Szymon Kłos 
CommitDate: Mon Mar 8 11:50:51 2021 +0100

pivot table: make subdialogs of pivot table dialog async

Change-Id: I2c1b26ebe661a2f66bc7bf94e4f3ede2fc5e18b9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107775
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112095
Tested-by: Jenkins

diff --git a/sc/qa/uitest/calc_tests9/pivotTable.py 
b/sc/qa/uitest/calc_tests9/pivotTable.py
index d85894bf9af6..2da282bb19d3 100644
--- a/sc/qa/uitest/calc_tests9/pivotTable.py
+++ b/sc/qa/uitest/calc_tests9/pivotTable.py
@@ -53,7 +53,7 @@ class pivotTable(UITestCase):
 self.assertEqual('true', 
get_state_as_dict(xEmptyLine)['Selected'])
 
 xOKBtn = dialog2.getChild("ok")
-self.ui_test.close_dialog_through_button(xOKBtn)
+xOKBtn.executeAction("CLICK", tuple())
 
 def handle_options_dialog_second_time(dialog2):
 xEmptyLine = dialog2.getChild("emptyline")
@@ -62,7 +62,7 @@ class pivotTable(UITestCase):
 self.assertEqual('false', 
get_state_as_dict(xEmptyLine)['Selected'])
 
 xCancelBtn = dialog2.getChild("cancel")
-self.ui_test.close_dialog_through_button(xCancelBtn)
+xCancelBtn.executeAction("CLICK", tuple())
 
 def handle_options_dialog_third_time(dialog2):
 xEmptyLine = dialog2.getChild("emptyline")
@@ -70,7 +70,7 @@ class pivotTable(UITestCase):
 self.assertEqual('true', 
get_state_as_dict(xEmptyLine)['Selected'])
 
 xOKBtn = dialog2.getChild("ok")
-self.ui_test.close_dialog_through_button(xOKBtn)
+xOKBtn.executeAction("CLICK", tuple())
 
 self.ui_test.execute_blocking_action(optionBtn.executeAction, 
args=('CLICK', ()),
 dialog_handler=handle_options_dialog_first_time)
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx 
b/sc/source/ui/attrdlg/scdlgfact.cxx
index b77f603540de..bc22a3fb443a 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -230,11 +230,21 @@ short AbstractScDPFunctionDlg_Impl::Execute()
 return m_xDlg->run();
 }
 
+bool 
AbstractScDPFunctionDlg_Impl::StartExecuteAsync(VclAbstractDialog::AsyncContext 
)
+{
+return weld::DialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
+}
+
 short AbstractScDPSubtotalDlg_Impl::Execute()
 {
 return m_xDlg->run();
 }
 
+bool 
AbstractScDPSubtotalDlg_Impl::StartExecuteAsync(VclAbstractDialog::AsyncContext 
)
+{
+return weld::DialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
+}
+
 short AbstractScDPNumGroupDlg_Impl::Execute()
 {
 return m_xDlg->run();
@@ -1123,7 +1133,7 @@ VclPtr 
ScAbstractDialogFactory_Impl::CreateScDPFunction

 const ScDPLabelData& rLabelData,
  

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

2020-11-23 Thread Xisco Fauli (via logerrit)
 sc/qa/unit/uicalc/data/tdf131455.ods |binary
 sc/qa/unit/uicalc/uicalc.cxx |   61 +++
 sw/source/uibase/uno/SwXDocumentSettings.hxx |4 -
 3 files changed, 62 insertions(+), 3 deletions(-)

New commits:
commit b2bfe6c18aeb2530a8d1e1c4336707b1fcd5715a
Author: Xisco Fauli 
AuthorDate: Mon Nov 23 11:57:31 2020 +0100
Commit: Xisco Fauli 
CommitDate: Mon Nov 23 15:11:45 2020 +0100

tdf#131455: sc_uicalc: Add unittest

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

diff --git a/sc/qa/unit/uicalc/data/tdf131455.ods 
b/sc/qa/unit/uicalc/data/tdf131455.ods
new file mode 100644
index ..f4d8bca66375
Binary files /dev/null and b/sc/qa/unit/uicalc/data/tdf131455.ods differ
diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx
index b7581fdb0c37..725e1c7c48dc 100644
--- a/sc/qa/unit/uicalc/uicalc.cxx
+++ b/sc/qa/unit/uicalc/uicalc.cxx
@@ -151,6 +151,67 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf133326)
 CPPUNIT_ASSERT_EQUAL(static_cast(2), pDoc->GetTableCount());
 }
 
+CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf131455)
+{
+ScModelObj* pModelObj = createDoc("tdf131455.ods");
+ScDocument* pDoc = pModelObj->GetDocument();
+CPPUNIT_ASSERT(pDoc);
+
+checkCurrentCell(0, 4);
+dispatchCommand(mxComponent, ".uno:GoRight", {});
+checkCurrentCell(1, 4);
+dispatchCommand(mxComponent, ".uno:GoRight", {});
+checkCurrentCell(4, 4);
+dispatchCommand(mxComponent, ".uno:GoRight", {});
+checkCurrentCell(5, 4);
+dispatchCommand(mxComponent, ".uno:GoRight", {});
+checkCurrentCell(8, 4);
+dispatchCommand(mxComponent, ".uno:GoRight", {});
+checkCurrentCell(9, 4);
+dispatchCommand(mxComponent, ".uno:GoRight", {});
+checkCurrentCell(12, 4);
+
+//Cursor can't move forward to the right
+for (size_t i = 0; i < 5; ++i)
+{
+dispatchCommand(mxComponent, ".uno:GoRight", {});
+checkCurrentCell(13, 4);
+}
+
+CPPUNIT_ASSERT_EQUAL(sal_Int16(0), ScDocShell::GetViewData()->GetTabNo());
+
+dispatchCommand(mxComponent, ".uno:JumpToNextTable", {});
+
+CPPUNIT_ASSERT_EQUAL(sal_Int16(1), ScDocShell::GetViewData()->GetTabNo());
+checkCurrentCell(0, 3);
+
+// Go to row 9
+for (size_t i = 0; i < 6; ++i)
+{
+dispatchCommand(mxComponent, ".uno:GoDown", {});
+}
+
+checkCurrentCell(0, 9);
+
+dispatchCommand(mxComponent, ".uno:SelectRow", {});
+dispatchCommand(mxComponent, ".uno:DeleteRows", {});
+
+dispatchCommand(mxComponent, ".uno:JumpToPrevTable", {});
+
+CPPUNIT_ASSERT_EQUAL(sal_Int16(0), ScDocShell::GetViewData()->GetTabNo());
+checkCurrentCell(13, 4);
+
+// Cursor can't move forward to the right
+// Without the fix in place, this test would have failed with
+// - Expected: 13
+// - Actual  : 64
+for (size_t i = 0; i < 5; ++i)
+{
+dispatchCommand(mxComponent, ".uno:GoRight", {});
+checkCurrentCell(13, 4);
+}
+}
+
 CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf126904)
 {
 ScModelObj* pModelObj = createDoc("tdf126904.ods");
commit e81845679ea6b30d651f76cc8bddc052a52bd227
Author: Muhammet Kara 
AuthorDate: Sat Nov 21 12:21:36 2020 +
Commit: Muhammet Kara 
CommitDate: Mon Nov 23 15:11:28 2020 +0100

tdf#124176: Use pragma once instead of include guards

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

diff --git a/sw/source/uibase/uno/SwXDocumentSettings.hxx 
b/sw/source/uibase/uno/SwXDocumentSettings.hxx
index 10ef572cb272..26a123ba7fe8 100644
--- a/sw/source/uibase/uno/SwXDocumentSettings.hxx
+++ b/sw/source/uibase/uno/SwXDocumentSettings.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_SW_SOURCE_UIBASE_UNO_SWXDOCUMENTSETTINGS_HXX
-#define INCLUDED_SW_SOURCE_UIBASE_UNO_SWXDOCUMENTSETTINGS_HXX
+#pragma once
 
 #include 
 #include 
@@ -75,6 +74,5 @@ public:
 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes(  ) 
override;
 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(  ) 
override;
 };
-#endif
 
 /* 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: 2 commits - sc/qa sc/source uitest/uitest

2020-11-17 Thread Attila Szűcs (via logerrit)
 sc/qa/unit/copy_paste_test.cxx|   52 
 sc/qa/unit/data/ods/tdf137624_autofillMergedMixed.ods |binary
 sc/source/core/data/table4.cxx|   75 --
 uitest/uitest/uihelper/common.py  |5 +
 4 files changed, 110 insertions(+), 22 deletions(-)

New commits:
commit 09eccdc87db5258ea779e2bcc12437f802624ee5
Author: Attila Szűcs 
AuthorDate: Fri Nov 13 09:42:00 2020 +0100
Commit: László Németh 
CommitDate: Tue Nov 17 13:02:19 2020 +0100

tdf#137624 sc: autofill mixed sequences in merged cells

Improve FillAnalyse, FillSeries to continue linear sequences
of mixed values in merged cells (mixed values are string + number,
like 'a1','a2' or '1a').

It discovers the linear sequence only if the string parts are
identical. It recognizes user lists only if all elements are in
the same user list.

Co-authored-by: Tibor Nagy (NISZ)

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

diff --git a/sc/qa/unit/copy_paste_test.cxx b/sc/qa/unit/copy_paste_test.cxx
index 62ee0bcc53f0..87d8311bdc9b 100644
--- a/sc/qa/unit/copy_paste_test.cxx
+++ b/sc/qa/unit/copy_paste_test.cxx
@@ -51,6 +51,7 @@ public:
 void tdf137653_137654_autofillUserlist();
 void tdf113500_autofillMixed();
 void tdf137625_autofillMergedUserlist();
+void tdf137624_autofillMergedMixed();
 
 CPPUNIT_TEST_SUITE(ScCopyPasteTest);
 CPPUNIT_TEST(testCopyPasteXLS);
@@ -67,6 +68,7 @@ public:
 CPPUNIT_TEST(tdf137653_137654_autofillUserlist);
 CPPUNIT_TEST(tdf113500_autofillMixed);
 CPPUNIT_TEST(tdf137625_autofillMergedUserlist);
+CPPUNIT_TEST(tdf137624_autofillMergedMixed);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -930,7 +932,57 @@ void ScCopyPasteTest::tdf137625_autofillMergedUserlist()
 }
 }
 
+void ScCopyPasteTest::tdf137624_autofillMergedMixed()
+{
+ScDocShellRef xDocSh = 
loadDocAndSetupModelViewController("tdf137624_autofillMergedMixed.", 
FORMAT_ODS, true);
+ScDocument& rDoc = xDocSh->GetDocument();
+
+// Get the document controller
+ScTabViewShell* pView = xDocSh->GetBestViewShell(false);
+CPPUNIT_ASSERT(pView != nullptr);
 
+// add 1aa,2bb,3cc,4dd,5ee,6ff to userlist, to test that autofill won't 
confuse it with 1aa,3aa
+// delete every userlist to make sure there won't be any string that is in 
2 different userlist
+ScGlobal::GetUserList()->clear();
+addToUserList({ "1aa,2bb,3cc,4dd,5ee,6ff" });
+
+// fillauto mixed (string + number), these areas contain only merged cells
+pView->FillAuto(FILL_TO_RIGHT, 7, 5, 12, 7, 6);   //H6:M8
+pView->FillAuto(FILL_TO_LEFT, 7, 5, 12, 7, 6);//H6:M8
+pView->FillAuto(FILL_TO_BOTTOM, 1, 20, 3, 23, 4); //B21:D24
+pView->FillAuto(FILL_TO_TOP, 1, 20, 3, 23, 4);//B21:D24
+
+// compare the results of fill-right / -left with the reference stored in 
the test file
+// this compares the whole area blindly, for specific test cases, check 
the test file
+for (int nCol = 1; nCol <= 18; nCol++)
+{
+for (int nRow = 5; nRow <= 7; nRow++)
+{
+CellType nType1 = rDoc.GetCellType(ScAddress(nCol, nRow, 0));
+CellType nType2 = rDoc.GetCellType(ScAddress(nCol, nRow + 4, 0));
+OUString aStr1 = rDoc.GetString(nCol, nRow, 0);
+OUString aStr2 = rDoc.GetString(nCol, nRow + 4, 0);
+
+CPPUNIT_ASSERT_EQUAL(nType1, nType2);
+CPPUNIT_ASSERT_EQUAL(aStr1, aStr2);
+}
+}
+
+// compare the results of fill-up / -down
+for (int nCol = 1; nCol <= 3; nCol++)
+{
+for (int nRow = 16; nRow <= 27; nRow++)
+{
+CellType nType1 = rDoc.GetCellType(ScAddress(nCol, nRow, 0));
+CellType nType2 = rDoc.GetCellType(ScAddress(nCol + 4, nRow, 0));
+OUString aStr1 = rDoc.GetString(nCol, nRow, 0);
+OUString aStr2 = rDoc.GetString(nCol + 4, nRow, 0);
+
+CPPUNIT_ASSERT_EQUAL(nType1, nType2);
+CPPUNIT_ASSERT_EQUAL(aStr1, aStr2);
+}
+}
+}
 
 ScCopyPasteTest::ScCopyPasteTest()
   : ScBootstrapFixture( "sc/qa/unit/data" )
diff --git a/sc/qa/unit/data/ods/tdf137624_autofillMergedMixed.ods 
b/sc/qa/unit/data/ods/tdf137624_autofillMergedMixed.ods
new file mode 100644
index ..cc1b6a7c6ab8
Binary files /dev/null and 
b/sc/qa/unit/data/ods/tdf137624_autofillMergedMixed.ods differ
diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
index 2e29cecff86b..a777aca898ae 100644
--- a/sc/source/core/data/table4.cxx
+++ b/sc/source/core/data/table4.cxx
@@ -420,25 +420,9 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL 
nCol2, SCROW nRow2,
 }
 else if (eCellType == CELLTYPE_STRING || eCellType == 
CELLTYPE_EDIT)

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

2020-08-03 Thread Noel Grandin (via logerrit)
 sc/qa/unit/parallelism.cxx|   17 
 sc/qa/unit/range.cxx  |1 
 sc/qa/unit/rangelst_test.cxx  |1 
 toolkit/source/awt/vclxaccessiblecomponent.cxx|   38 
 toolkit/source/awt/vclxgraphics.cxx   |  108 -
 toolkit/source/awt/vclxmenu.cxx   |  126 -
 toolkit/source/awt/vclxspinbutton.cxx |   76 
 toolkit/source/awt/vclxtabpagecontainer.cxx   |   26 
 toolkit/source/awt/vclxtoolkit.cxx|  110 -
 toolkit/source/awt/vclxwindow.cxx |  241 +-
 toolkit/source/awt/vclxwindows.cxx| 1538 +-
 toolkit/source/controls/controlmodelcontainerbase.cxx |  120 -
 toolkit/source/controls/dialogcontrol.cxx |   97 -
 toolkit/source/controls/roadmapcontrol.cxx|   28 
 toolkit/source/controls/tree/treedatamodel.cxx|   60 
 toolkit/source/controls/unocontrol.cxx|   54 
 toolkit/source/controls/unocontrolbase.cxx|   56 
 toolkit/source/controls/unocontrolcontainer.cxx   |   80 
 toolkit/source/controls/unocontrolmodel.cxx   |  172 +-
 toolkit/source/controls/unocontrols.cxx   |  164 -
 toolkit/source/helper/unowrapper.cxx  |   22 
 21 files changed, 1565 insertions(+), 1570 deletions(-)

New commits:
commit 714d907d304fae5cc8613eced127060199639af6
Author: Noel Grandin 
AuthorDate: Mon Aug 3 23:36:47 2020 +0200
Commit: Noel Grandin 
CommitDate: Tue Aug 4 01:40:24 2020 +0200

loplugin:flatten in toolkit

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

diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx 
b/toolkit/source/awt/vclxaccessiblecomponent.cxx
index b046e9280768..b70a0dbb9bfc 100644
--- a/toolkit/source/awt/vclxaccessiblecomponent.cxx
+++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx
@@ -352,28 +352,28 @@ VclPtr VCLXAccessibleComponent::GetWindow() 
const
 void VCLXAccessibleComponent::FillAccessibleRelationSet( 
utl::AccessibleRelationSetHelper& rRelationSet )
 {
 VclPtr pWindow = GetWindow();
-if ( pWindow )
+if ( !pWindow )
+return;
+
+vcl::Window *pLabeledBy = pWindow->GetAccessibleRelationLabeledBy();
+if ( pLabeledBy && pLabeledBy != pWindow )
 {
-vcl::Window *pLabeledBy = pWindow->GetAccessibleRelationLabeledBy();
-if ( pLabeledBy && pLabeledBy != pWindow )
-{
-uno::Sequence< uno::Reference< uno::XInterface > > aSequence { 
pLabeledBy->GetAccessible() };
-rRelationSet.AddRelation( accessibility::AccessibleRelation( 
accessibility::AccessibleRelationType::LABELED_BY, aSequence ) );
-}
+uno::Sequence< uno::Reference< uno::XInterface > > aSequence { 
pLabeledBy->GetAccessible() };
+rRelationSet.AddRelation( accessibility::AccessibleRelation( 
accessibility::AccessibleRelationType::LABELED_BY, aSequence ) );
+}
 
-vcl::Window* pLabelFor = pWindow->GetAccessibleRelationLabelFor();
-if ( pLabelFor && pLabelFor != pWindow )
-{
-uno::Sequence< uno::Reference< uno::XInterface > > aSequence { 
pLabelFor->GetAccessible() };
-rRelationSet.AddRelation( accessibility::AccessibleRelation( 
accessibility::AccessibleRelationType::LABEL_FOR, aSequence ) );
-}
+vcl::Window* pLabelFor = pWindow->GetAccessibleRelationLabelFor();
+if ( pLabelFor && pLabelFor != pWindow )
+{
+uno::Sequence< uno::Reference< uno::XInterface > > aSequence { 
pLabelFor->GetAccessible() };
+rRelationSet.AddRelation( accessibility::AccessibleRelation( 
accessibility::AccessibleRelationType::LABEL_FOR, aSequence ) );
+}
 
-vcl::Window* pMemberOf = pWindow->GetAccessibleRelationMemberOf();
-if ( pMemberOf && pMemberOf != pWindow )
-{
-uno::Sequence< uno::Reference< uno::XInterface > > aSequence { 
pMemberOf->GetAccessible() };
-rRelationSet.AddRelation( accessibility::AccessibleRelation( 
accessibility::AccessibleRelationType::MEMBER_OF, aSequence ) );
-}
+vcl::Window* pMemberOf = pWindow->GetAccessibleRelationMemberOf();
+if ( pMemberOf && pMemberOf != pWindow )
+{
+uno::Sequence< uno::Reference< uno::XInterface > > aSequence { 
pMemberOf->GetAccessible() };
+rRelationSet.AddRelation( accessibility::AccessibleRelation( 
accessibility::AccessibleRelationType::MEMBER_OF, aSequence ) );
 }
 }
 
diff --git a/toolkit/source/awt/vclxgraphics.cxx 
b/toolkit/source/awt/vclxgraphics.cxx
index 9fcb527a0970..958817053663 100644
--- a/toolkit/source/awt/vclxgraphics.cxx
+++ b/toolkit/source/awt/vclxgraphics.cxx
@@ -98,30 +98,30 @@ void VCLXGraphics::initAttrs()
 
 void VCLXGraphics::InitOutputDevice( InitOutDevFlags 

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

2019-09-25 Thread Tamás Zolnai (via logerrit)
 sc/qa/unit/tiledrendering/tiledrendering.cxx |   40 ++-
 sc/source/ui/view/tabview.cxx|   38 -
 2 files changed, 52 insertions(+), 26 deletions(-)

New commits:
commit 72b3b651705b6f5a3d1f02572148c5697af9a8a9
Author: Tamás Zolnai 
AuthorDate: Sat Sep 21 16:13:14 2019 +0200
Commit: Tamás Zolnai 
CommitDate: Wed Sep 25 12:33:15 2019 +0200

sc lok: Test invalidation triggered by jumping horizontally on the sheet

Change-Id: Ia3d3b3f3020151939b8fb1cf48635303dc49892e
Reviewed-on: https://gerrit.libreoffice.org/79495
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai 

diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index 35e61c791db6..acd017773b54 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -103,6 +103,7 @@ public:
 void testSheetChangeInvalidation();
 void testInsertDeletePageInvalidation();
 void testGetRowColumnHeadersInvalidation();
+void testJumpHorizontallyInvalidation();
 
 CPPUNIT_TEST_SUITE(ScTiledRenderingTest);
 CPPUNIT_TEST(testRowColumnSelections);
@@ -141,6 +142,7 @@ public:
 CPPUNIT_TEST(testSheetChangeInvalidation);
 CPPUNIT_TEST(testInsertDeletePageInvalidation);
 CPPUNIT_TEST(testGetRowColumnHeadersInvalidation);
+CPPUNIT_TEST(testJumpHorizontallyInvalidation);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -1783,6 +1785,33 @@ void 
ScTiledRenderingTest::testGetRowColumnHeadersInvalidation()
 CPPUNIT_ASSERT_EQUAL(tools::Rectangle(49725, 0, 75225, 19380), 
aView1.m_aInvalidations[0]);
 }
 
+void ScTiledRenderingTest::testJumpHorizontallyInvalidation()
+{
+comphelper::LibreOfficeKit::setActive();
+
+ScModelObj* pModelObj = createDoc("empty.ods");
+ScViewData* pViewData = ScDocShell::GetViewData();
+CPPUNIT_ASSERT(pViewData);
+
+int nView1 = SfxLokHelper::getView();
+ViewCallback aView1;
+CPPUNIT_ASSERT(!lcl_hasEditView(*pViewData));
+
+SfxLokHelper::setView(nView1);
+aView1.m_bInvalidateTiles = false;
+aView1.m_aInvalidations.clear();
+pModelObj->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, awt::Key::PAGEDOWN | 
KEY_MOD2);
+pModelObj->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, awt::Key::PAGEDOWN | 
KEY_MOD2);
+Scheduler::ProcessEventsToIdle();
+pModelObj->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, awt::Key::PAGEDOWN | 
KEY_MOD2);
+pModelObj->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, awt::Key::PAGEDOWN | 
KEY_MOD2);
+Scheduler::ProcessEventsToIdle();
+CPPUNIT_ASSERT(aView1.m_bInvalidateTiles);
+CPPUNIT_ASSERT_EQUAL(size_t(2), aView1.m_aInvalidations.size());
+CPPUNIT_ASSERT_EQUAL(tools::Rectangle(0, 0, 10, 10), 
aView1.m_aInvalidations[0]);
+CPPUNIT_ASSERT_EQUAL(tools::Rectangle(26775, 0, 39525, 13005), 
aView1.m_aInvalidations[1]);
+}
+
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(ScTiledRenderingTest);
commit e740aaf876edd58c1f5c5e17af2495cad36cfc27
Author: Tamás Zolnai 
AuthorDate: Sat Sep 21 15:48:44 2019 +0200
Commit: Tamás Zolnai 
CommitDate: Wed Sep 25 12:32:53 2019 +0200

sc lok: Optimize invalidation triggered by getRowColumnHeaders() method

Don't call a full invalidation, rather use invalidation only on the new
area. Make sure that the invalidation is called first.

Change-Id: I89d1c6342ed8e95fe738a876a76ca6feda031962
Reviewed-on: https://gerrit.libreoffice.org/79494
Reviewed-by: Tamás Zolnai 
Tested-by: Tamás Zolnai 

diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index a22cca344966..35e61c791db6 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -1761,9 +1761,8 @@ void 
ScTiledRenderingTest::testGetRowColumnHeadersInvalidation()
 pModelObj->getRowColumnHeaders(tools::Rectangle(0, 15, 19650, 5400));
 Scheduler::ProcessEventsToIdle();
 CPPUNIT_ASSERT(aView1.m_bInvalidateTiles);
-CPPUNIT_ASSERT_EQUAL(size_t(2), aView1.m_aInvalidations.size());
-CPPUNIT_ASSERT_EQUAL(tools::Rectangle(0, 0, 10, 10), 
aView1.m_aInvalidations[0]);
-CPPUNIT_ASSERT_EQUAL(tools::Rectangle(26775, 0, 49725, 13005), 
aView1.m_aInvalidations[1]);
+CPPUNIT_ASSERT_EQUAL(size_t(1), aView1.m_aInvalidations.size());
+CPPUNIT_ASSERT_EQUAL(tools::Rectangle(26775, 0, 49725, 13005), 
aView1.m_aInvalidations[0]);
 
 // Extend area top-to-bottom
 aView1.m_bInvalidateTiles = false;
@@ -1771,9 +1770,8 @@ void 
ScTiledRenderingTest::testGetRowColumnHeadersInvalidation()
 pModelObj->getRowColumnHeaders(tools::Rectangle(0, 5400, 19650, 9800));
 Scheduler::ProcessEventsToIdle();
 CPPUNIT_ASSERT(aView1.m_bInvalidateTiles);
-CPPUNIT_ASSERT_EQUAL(size_t(2), aView1.m_aInvalidations.size());
-CPPUNIT_ASSERT_EQUAL(tools::Rectangle(0, 0, 10, 10), 

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

2019-09-25 Thread Tamás Zolnai (via logerrit)
 sc/qa/unit/tiledrendering/data/two_sheets.ods |binary
 sc/qa/unit/tiledrendering/tiledrendering.cxx  |   28 ++
 2 files changed, 28 insertions(+)

New commits:
commit ff0cd54de41e71e24bf7d833b1260c6dbb8dbfea
Author: Tamás Zolnai 
AuthorDate: Fri Sep 13 17:44:36 2019 +0200
Commit: Tamás Zolnai 
CommitDate: Wed Sep 25 12:21:14 2019 +0200

sc lok: Test invalidation after sheet change

Change-Id: I799089fc65d92fe72d7e76afbcd44bd4161d25f4
Reviewed-on: https://gerrit.libreoffice.org/79489
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai 

diff --git a/sc/qa/unit/tiledrendering/data/two_sheets.ods 
b/sc/qa/unit/tiledrendering/data/two_sheets.ods
new file mode 100644
index ..6aa1d03be62c
Binary files /dev/null and b/sc/qa/unit/tiledrendering/data/two_sheets.ods 
differ
diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index 9f1c0435108b..93f683ffc985 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -100,6 +100,7 @@ public:
 void testVbaRangeCopyPaste();
 void testInvalidationLoop();
 void testPageDownInvalidation();
+void testSheetChangeInvalidation();
 
 CPPUNIT_TEST_SUITE(ScTiledRenderingTest);
 CPPUNIT_TEST(testRowColumnSelections);
@@ -135,6 +136,7 @@ public:
 CPPUNIT_TEST(testVbaRangeCopyPaste);
 CPPUNIT_TEST(testInvalidationLoop);
 CPPUNIT_TEST(testPageDownInvalidation);
+CPPUNIT_TEST(testSheetChangeInvalidation);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -1669,6 +1671,28 @@ void ScTiledRenderingTest::testPageDownInvalidation()
 CPPUNIT_ASSERT_EQUAL(tools::Rectangle(15, 15, 1230, 225), 
aView1.m_aInvalidation);
 }
 
+void ScTiledRenderingTest::testSheetChangeInvalidation()
+{
+comphelper::LibreOfficeKit::setActive();
+
+ScModelObj* pModelObj = createDoc("two_sheets.ods");
+ScViewData* pViewData = ScDocShell::GetViewData();
+CPPUNIT_ASSERT(pViewData);
+
+int nView1 = SfxLokHelper::getView();
+ViewCallback aView1;
+CPPUNIT_ASSERT(!lcl_hasEditView(*pViewData));
+
+SfxLokHelper::setView(nView1);
+aView1.m_bInvalidateTiles = false;
+aView1.m_aInvalidation = tools::Rectangle();
+pModelObj->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, awt::Key::PAGEDOWN | 
KEY_MOD1);
+pModelObj->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, awt::Key::PAGEDOWN | 
KEY_MOD1);
+Scheduler::ProcessEventsToIdle();
+CPPUNIT_ASSERT(aView1.m_bInvalidateTiles);
+CPPUNIT_ASSERT_EQUAL(tools::Rectangle(0, 0, 1310720, 268435456), 
aView1.m_aInvalidation);
+}
+
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(ScTiledRenderingTest);
commit d877c232c0d63fd509fa8bf9ca433481dfb2b126
Author: Tamás Zolnai 
AuthorDate: Fri Sep 13 17:19:57 2019 +0200
Commit: Tamás Zolnai 
CommitDate: Wed Sep 25 12:20:52 2019 +0200

sc lok: Test also the invalidation rectangle in case of row/column insertion

Change-Id: I5dffc0521ae7ef3ddd47574a85457ddcec2a0566
Reviewed-on: https://gerrit.libreoffice.org/79488
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai 

diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index 9cb36f2d6133..9f1c0435108b 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -1009,9 +1009,11 @@ void ScTiledRenderingTest::testInvalidateOnInserRowCol()
 
 // insert row
 aView.m_bInvalidateTiles = false;
+aView.m_aInvalidation = tools::Rectangle();
 comphelper::dispatchCommand(".uno:InsertRows", aArgs);
 Scheduler::ProcessEventsToIdle();
 CPPUNIT_ASSERT(aView.m_bInvalidateTiles);
+CPPUNIT_ASSERT_EQUAL(tools::Rectangle(-75, 50985, 32212230, 63990), 
aView.m_aInvalidation);
 
 // move on the right
 for (int i = 0; i < 200; ++i)
@@ -1023,9 +1025,11 @@ void ScTiledRenderingTest::testInvalidateOnInserRowCol()
 
 // insert column
 aView.m_bInvalidateTiles = false;
+aView.m_aInvalidation = tools::Rectangle();
 comphelper::dispatchCommand(".uno:InsertColumns", aArgs);
 Scheduler::ProcessEventsToIdle();
 CPPUNIT_ASSERT(aView.m_bInvalidateTiles);
+CPPUNIT_ASSERT_EQUAL(tools::Rectangle(253650, -15, 32212230, 63990), 
aView.m_aInvalidation);
 }
 
 void ScTiledRenderingTest::testCommentCallback()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: 2 commits - sc/qa sc/source solenv/bin xmloff/inc xmloff/source xmloff/util

2019-07-25 Thread Miklos Vajna (via logerrit)
 sc/qa/unit/copy_paste_test.cxx  |   59 
 sc/source/ui/inc/impex.hxx  |4 +-
 sc/source/ui/undo/undoblk.cxx   |6 ++--
 solenv/bin/native-code.py   |1 
 xmloff/inc/facreg.hxx   |7 
 xmloff/source/core/facreg.cxx   |5 ---
 xmloff/source/draw/sdxmlimp.cxx |   23 +--
 xmloff/util/xo.component|3 +-
 8 files changed, 77 insertions(+), 31 deletions(-)

New commits:
commit 3f471651049a318d7d8917855929e0535daf14b9
Author: Miklos Vajna 
AuthorDate: Wed Jul 24 21:26:11 2019 +0200
Commit: Miklos Vajna 
CommitDate: Thu Jul 25 09:21:20 2019 +0200

xmloff: create XMLImportStylesImportOasis instances with an uno constructor

See tdf#74608 for motivation.

Change-Id: I7e56486339d5fd436d4dba723bac8bb9bbed170b
Reviewed-on: https://gerrit.libreoffice.org/76275
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index f7858cdd49d4..fc5e2f725c21 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -273,6 +273,7 @@ core_constructor_list = [
 "com_sun_star_comp_Impress_XMLOasisMetaExporter_get_implementation",
 "com_sun_star_comp_Impress_XMLOasisMetaImporter_get_implementation",
 "com_sun_star_comp_Impress_XMLOasisContentImporter_get_implementation",
+"com_sun_star_comp_Impress_XMLOasisStylesImporter_get_implementation",
 "com_sun_star_comp_Impress_XMLOasisSettingsExporter_get_implementation",
 "com_sun_star_comp_Impress_XMLOasisSettingsImporter_get_implementation",
 "com_sun_star_comp_Draw_XMLOasisImporter_get_implementation",
diff --git a/xmloff/inc/facreg.hxx b/xmloff/inc/facreg.hxx
index 8541b7842b17..7cb149cac9f1 100644
--- a/xmloff/inc/facreg.hxx
+++ b/xmloff/inc/facreg.hxx
@@ -33,13 +33,6 @@ namespace com { namespace sun { namespace star {
 namespace uno { class XInterface; }
 } } }
 
-// impress oasis import
-OUString XMLImpressStylesImportOasis_getImplementationName() throw();
-css::uno::Sequence 
XMLImpressStylesImportOasis_getSupportedServiceNames() throw();
-/// @throws css::uno::Exception
-css::uno::Reference 
XMLImpressStylesImportOasis_createInstance(
-css::uno::Reference const & rSMgr);
-
 // impress OOo export
 OUString XMLImpressExportOOO_getImplementationName() throw();
 css::uno::Sequence XMLImpressExportOOO_getSupportedServiceNames() 
throw();
diff --git a/xmloff/source/core/facreg.cxx b/xmloff/source/core/facreg.cxx
index cba072106f97..0190e6b0d818 100644
--- a/xmloff/source/core/facreg.cxx
+++ b/xmloff/source/core/facreg.cxx
@@ -56,10 +56,7 @@ XMLOFF_DLLPUBLIC void * xo_component_getFactory( const 
sal_Char * pImplName, voi
 
 const sal_Int32 nImplNameLen = strlen( pImplName );
 
-// impress oasis import
-SINGLEFACTORY( XMLImpressStylesImportOasis )
-
-else SINGLEFACTORY( AnimationsImport )
+SINGLEFACTORY( AnimationsImport )
 
 // impress OOo export
 else SINGLEFACTORY( XMLImpressExportOOO )
diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx
index d161d68d657b..5b5b1ad63ee2 100644
--- a/xmloff/source/draw/sdxmlimp.cxx
+++ b/xmloff/source/draw/sdxmlimp.cxx
@@ -260,20 +260,6 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL 
SdXMLFlatDocContext_Imp
 }
 }
 
-#define SERVICE(classname,servicename,implementationname,draw,flags)\
-uno::Sequence< OUString > classname##_getSupportedServiceNames() throw()\
-{\
-return uno::Sequence< OUString > { servicename };\
-}\
-OUString classname##_getImplementationName() throw()\
-{\
-return OUString( implementationname );\
-}\
-uno::Reference< uno::XInterface > classname##_createInstance(const 
uno::Reference< lang::XMultiServiceFactory > & rSMgr)\
-{\
-return static_cast(new SdXMLImport( 
comphelper::getComponentContext(rSMgr), implementationname, draw, flags )); \
-}
-
 extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
 com_sun_star_comp_Impress_XMLOasisImporter_get_implementation(
 uno::XComponentContext* pCtx, uno::Sequence const& /*rSeq*/)
@@ -324,7 +310,14 @@ 
com_sun_star_comp_Draw_XMLOasisSettingsImporter_get_implementation(
 new SdXMLImport(pCtx, "XMLDrawSettingsImportOasis", true, 
SvXMLImportFlags::SETTINGS));
 }
 
-SERVICE( XMLImpressStylesImportOasis, 
"com.sun.star.comp.Impress.XMLOasisStylesImporter", 
"XMLImpressStylesImportOasis", false, 
SvXMLImportFlags::STYLES|SvXMLImportFlags::AUTOSTYLES|SvXMLImportFlags::MASTERSTYLES
 )
+extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
+com_sun_star_comp_Impress_XMLOasisStylesImporter_get_implementation(
+uno::XComponentContext* pCtx, uno::Sequence const& /*rSeq*/)
+{
+return cppu::acquire(new SdXMLImport(pCtx, "XMLImpressStylesImportOasis", 
false,
+ SvXMLImportFlags::STYLES | 
SvXMLImportFlags::AUTOSTYLES
+ | 
SvXMLImportFlags::MASTERSTYLES));
+}
 
 

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

2019-05-12 Thread Caolán McNamara (via logerrit)
 sc/qa/unit/screenshots/screenshots.cxx |3 +--
 sc/source/ui/inc/tabvwsh.hxx   |1 -
 2 files changed, 1 insertion(+), 3 deletions(-)

New commits:
commit b49e1e709b3fc4b9831fd0961e9310ebf1050429
Author: Caolán McNamara 
AuthorDate: Sun May 12 19:24:35 2019 +0100
Commit: Caolán McNamara 
CommitDate: Sun May 12 22:20:12 2019 +0200

drop unneeded forward declare

Change-Id: Ib9a7d484cb93c0dbf6a13b540895e0e5d5c00d49
Reviewed-on: https://gerrit.libreoffice.org/72202
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index a738669dd7d1..7d51dbc5c7fa 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -38,7 +38,6 @@
 class SdrOle2Obj;
 class SfxBindings;
 class SfxChildWindow;
-class SfxModelessDialog;
 class SvxNumberInfoItem;
 struct SfxChildWinInfo;
 
commit e4228ba740f86f701b9d6f0472b65383f4cf44f0
Author: Caolán McNamara 
AuthorDate: Sun May 12 19:21:17 2019 +0100
Commit: Caolán McNamara 
CommitDate: Sun May 12 22:19:28 2019 +0200

drop intermediate vcl::Window

Change-Id: Ie8455f6082a762e730354e56bac6d76c26de6979
Reviewed-on: https://gerrit.libreoffice.org/72201
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sc/qa/unit/screenshots/screenshots.cxx 
b/sc/qa/unit/screenshots/screenshots.cxx
index 402db2452590..96b2779860d2 100644
--- a/sc/qa/unit/screenshots/screenshots.cxx
+++ b/sc/qa/unit/screenshots/screenshots.cxx
@@ -192,8 +192,7 @@ VclPtr 
ScScreenshotTest::createDialogByID(sal_uInt32 nID)
 case 8: // "modules/scalc/ui/inputstringdialog.ui"
 {
 const OString aEmpty("");
-vcl::Window* pWindow = mpViewShell->GetDialogParent();
-pReturnDialog = mpFact->CreateScStringInputDlg(pWindow ? 
pWindow->GetFrameWeld() : nullptr,
+pReturnDialog = 
mpFact->CreateScStringInputDlg(mpViewShell->GetFrameWeld(),
 ScResId(SCSTR_APDTABLE), ScResId(SCSTR_NAME),
 aDefaultSheetName, aEmpty, aEmpty );
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-05-04 Thread Dennis Francis (via logerrit)
 sc/qa/unit/data/xlsx/conditional_fmt_checkpriority.xlsx |binary
 sc/qa/unit/data/xlsx/conditional_fmt_origin.xlsx|binary
 sc/qa/unit/subsequent_export-test.cxx   |   63 +++
 sc/source/filter/excel/xecontent.cxx|   19 ++-
 sc/source/filter/excel/xeextlst.cxx |2 
 sc/source/filter/inc/condformatbuffer.hxx   |   13 ++
 sc/source/filter/inc/extlstcontext.hxx  |2 
 sc/source/filter/inc/xecontent.hxx  |2 
 sc/source/filter/oox/condformatbuffer.cxx   |   87 +++-
 sc/source/filter/oox/extlstcontext.cxx  |   15 ++
 10 files changed, 188 insertions(+), 15 deletions(-)

New commits:
commit ca40d4ce9b8134fd8bfc90e9e8289b620163475b
Author: Dennis Francis 
AuthorDate: Thu Apr 25 08:37:58 2019 +0530
Commit: Andras Timar 
CommitDate: Sat May 4 10:22:21 2019 +0200

tdf#124953: Use rangelist's combined range top-left address...

as origin address in the conditional format formula on xlsx export.
Excel seems to get confused if anything else is supplied as the
origin in the formula.

For example, before this patch, for a condfmt range over the
range-list [A3:C5 E1:F2], the origin address used in the formula
(for text search type entries) is A3.


   
   NOT(ISERROR(SEARCH("ABC",A3)))
   


In this patch we use the top-left cell address(A1) of the combined range 
"A1:F5" as
the origin address.

   NOT(ISERROR(SEARCH("ABC",A1)))

Change-Id: If08a859bc361f925148ff463758d03ebbc41c0ac
Reviewed-on: https://gerrit.libreoffice.org/71312
Tested-by: Jenkins
Reviewed-by: Andras Timar 

diff --git a/sc/qa/unit/data/xlsx/conditional_fmt_origin.xlsx 
b/sc/qa/unit/data/xlsx/conditional_fmt_origin.xlsx
new file mode 100644
index ..aef60b6cb489
Binary files /dev/null and b/sc/qa/unit/data/xlsx/conditional_fmt_origin.xlsx 
differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx 
b/sc/qa/unit/subsequent_export-test.cxx
index de8eb723b884..bc8545ca182e 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -105,6 +105,7 @@ public:
 void testConditionalFormatRangeListXLSX();
 void testConditionalFormatContainsTextXLSX();
 void testConditionalFormatPriorityCheckXLSX();
+void testConditionalFormatOriginXLSX();
 void testMiscRowHeightExport();
 void testNamedRangeBugfdo62729();
 void testBuiltinRangesXLSX();
@@ -243,6 +244,7 @@ public:
 CPPUNIT_TEST(testConditionalFormatRangeListXLSX);
 CPPUNIT_TEST(testConditionalFormatContainsTextXLSX);
 CPPUNIT_TEST(testConditionalFormatPriorityCheckXLSX);
+CPPUNIT_TEST(testConditionalFormatOriginXLSX);
 CPPUNIT_TEST(testMiscRowHeightExport);
 CPPUNIT_TEST(testNamedRangeBugfdo62729);
 CPPUNIT_TEST(testBuiltinRangesXLSX);
@@ -3976,6 +3978,19 @@ void 
ScExportTest::testConditionalFormatPriorityCheckXLSX()
 CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong priorities for A3", 
bHighPriorityExtensionA3, nA3ExtPriority < nA3NormalPriority);
 }
 
+void ScExportTest::testConditionalFormatOriginXLSX()
+{
+ScDocShellRef xDocSh = loadDoc("conditional_fmt_origin.", FORMAT_XLSX);
+CPPUNIT_ASSERT(xDocSh.is());
+
+xmlDocPtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, 
"xl/worksheets/sheet1.xml", FORMAT_XLSX);
+CPPUNIT_ASSERT(pDoc);
+
+// tdf#124953 : The range-list is B3:C6 F1:G2, origin address in the 
formula should be B1, not B3.
+OUString aFormula = getXPathContent(pDoc, 
"//x:conditionalFormatting/x:cfRule/x:formula");
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong origin address in formula", 
OUString("NOT(ISERROR(SEARCH(\"BAC\",B1)))"), aFormula);
+}
+
 void ScExportTest::testEscapeCharInNumberFormatXLSX()
 {
 ScDocShellRef xDocSh = loadDoc("tdf81939.", FORMAT_XLSX);
diff --git a/sc/source/filter/excel/xecontent.cxx 
b/sc/source/filter/excel/xecontent.cxx
index f71d48337baf..234c681c59c3 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -579,7 +579,7 @@ void XclExpLabelranges::Save( XclExpStream& rStrm )
 class XclExpCFImpl : protected XclExpRoot
 {
 public:
-explicitXclExpCFImpl( const XclExpRoot& rRoot, const 
ScCondFormatEntry& rFormatEntry, sal_Int32 nPriority );
+explicitXclExpCFImpl( const XclExpRoot& rRoot, const 
ScCondFormatEntry& rFormatEntry, sal_Int32 nPriority, ScAddress aOrigin );
 
 /** Writes the body of the CF record. */
 voidWriteBody( XclExpStream& rStrm );
@@ -587,6 +587,7 @@ public:
 
 private:
 const ScCondFormatEntry& mrFormatEntry; /// Calc conditional format entry.
+ScAddress   maOrigin;   /// Top left cell of the combined 
range
 XclFontData maFontData; /// Font formatting attributes.
 XclExpCellBordermaBorder; 

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

2019-04-08 Thread Caolán McNamara (via logerrit)
 sc/qa/unit/data/xls/pass/ofz14101-1.xls |binary
 sc/qa/unit/data/xls/pass/ofz14120-1.xls |binary
 sc/source/core/data/document.cxx|2 +-
 sc/source/core/data/table7.cxx  |4 ++--
 4 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 3d57865fa367acf143232373f1096d067128bda6
Author: Caolán McNamara 
AuthorDate: Mon Apr 8 09:51:58 2019 +0100
Commit: Caolán McNamara 
CommitDate: Mon Apr 8 12:11:24 2019 +0200

ofz#14101 another batch of oss-fuzz failures

since...

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

tdf#50916 Makes numbers of columns dynamic

Change-Id: Ibee52867c83393fe1e3d548f6d00d29df78b07e4
Reviewed-on: https://gerrit.libreoffice.org/70408
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sc/qa/unit/data/xls/pass/ofz14101-1.xls 
b/sc/qa/unit/data/xls/pass/ofz14101-1.xls
new file mode 100644
index ..953f255fb19e
Binary files /dev/null and b/sc/qa/unit/data/xls/pass/ofz14101-1.xls differ
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index a3df4639e94b..f41e9e34c1d4 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -6527,7 +6527,7 @@ void ScDocument::SetNote(const ScAddress& rPos, 
std::unique_ptr pNote)
 
 void ScDocument::SetNote(SCCOL nCol, SCROW nRow, SCTAB nTab, 
std::unique_ptr pNote)
 {
-return maTabs[nTab]->aCol[nCol].SetCellNote(nRow, std::move(pNote));
+return maTabs[nTab]->CreateColumnIfNotExists(nCol).SetCellNote(nRow, 
std::move(pNote));
 }
 
 bool ScDocument::HasNote(const ScAddress& rPos) const
commit 368448e7843bf4e58ed5637a731c67c76c3c11cb
Author: Caolán McNamara 
AuthorDate: Mon Apr 8 09:23:46 2019 +0100
Commit: Caolán McNamara 
CommitDate: Mon Apr 8 12:11:10 2019 +0200

ofz#14120 another batch of oss-fuzz failures

since...

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

tdf#50916 Makes numbers of columns dynamic

Change-Id: Ic494eb7e6ad13537caf0ac3dde0b6646fd2dcc10
Reviewed-on: https://gerrit.libreoffice.org/70406
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sc/qa/unit/data/xls/pass/ofz14120-1.xls 
b/sc/qa/unit/data/xls/pass/ofz14120-1.xls
new file mode 100644
index ..5d526b445c9d
Binary files /dev/null and b/sc/qa/unit/data/xls/pass/ofz14120-1.xls differ
diff --git a/sc/source/core/data/table7.cxx b/sc/source/core/data/table7.cxx
index e0ed0c96bce6..ae67c319651e 100644
--- a/sc/source/core/data/table7.cxx
+++ b/sc/source/core/data/table7.cxx
@@ -421,10 +421,10 @@ bool ScTable::IsEditActionAllowed(
 
 std::unique_ptr ScTable::GetColumnIterator( SCCOL nCol, 
SCROW nRow1, SCROW nRow2 ) const
 {
-if (!ValidCol(nCol) || nCol >= aCol.size())
+if (!ValidCol(nCol))
 return std::unique_ptr();
 
-return aCol[nCol].GetColumnIterator(nRow1, nRow2);
+return CreateColumnIfNotExists(nCol).GetColumnIterator(nRow1, nRow2);
 }
 
 bool ScTable::EnsureFormulaCellResults( const SCCOL nCol1, SCROW nRow1, const 
SCCOL nCol2, SCROW nRow2, bool bSkipRunning )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2018-07-14 Thread Libreoffice Gerrit user
 sc/qa/unit/data/ods/conditionalformat_containstext.ods |binary
 sc/qa/unit/subsequent_export-test.cxx  |   13 +
 sc/source/filter/excel/xecontent.cxx   |   10 ++
 3 files changed, 23 insertions(+)

New commits:
commit 7e8dbbb02f25278d5afc51ae4a397831f5b21239
Author: Markus Mohrhard 
AuthorDate: Sat Jul 14 15:29:41 2018 +0200
Commit: Markus Mohrhard 
CommitDate: Sun Jul 15 00:36:25 2018 +0200

add test for tdf#117816

Change-Id: I470b4137a3b4e23acf0f4e949a7a834fed8069db
Reviewed-on: https://gerrit.libreoffice.org/57433
Tested-by: Jenkins
Reviewed-by: Markus Mohrhard 

diff --git a/sc/qa/unit/data/ods/conditionalformat_containstext.ods 
b/sc/qa/unit/data/ods/conditionalformat_containstext.ods
new file mode 100644
index ..fa3e21e29f5a
Binary files /dev/null and 
b/sc/qa/unit/data/ods/conditionalformat_containstext.ods differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx 
b/sc/qa/unit/subsequent_export-test.cxx
index 09364c8de62e..f6e151390a5e 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -107,6 +107,7 @@ public:
 void testDataBarExportODS();
 void testDataBarExportXLSX();
 void testConditionalFormatRangeListXLSX();
+void testConditionalFormatContainsTextXLSX();
 void testMiscRowHeightExport();
 void testNamedRangeBugfdo62729();
 void testBuiltinRangesXLSX();
@@ -226,6 +227,7 @@ public:
 CPPUNIT_TEST(testDataBarExportODS);
 CPPUNIT_TEST(testDataBarExportXLSX);
 CPPUNIT_TEST(testConditionalFormatRangeListXLSX);
+CPPUNIT_TEST(testConditionalFormatContainsTextXLSX);
 CPPUNIT_TEST(testMiscRowHeightExport);
 CPPUNIT_TEST(testNamedRangeBugfdo62729);
 CPPUNIT_TEST(testBuiltinRangesXLSX);
@@ -3876,6 +3878,17 @@ void ScExportTest::testConditionalFormatRangeListXLSX()
 assertXPath(pDoc, "//x:conditionalFormatting", "sqref", "F4 F10");
 }
 
+void ScExportTest::testConditionalFormatContainsTextXLSX()
+{
+ScDocShellRef xDocSh = loadDoc("conditionalformat_containstext.", 
FORMAT_ODS);
+CPPUNIT_ASSERT(xDocSh.is());
+
+xmlDocPtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, 
"xl/worksheets/sheet1.xml", FORMAT_XLSX);
+CPPUNIT_ASSERT(pDoc);
+
+assertXPathContent(pDoc, "//x:conditionalFormatting/x:cfRule/x:formula", 
"NOT(ISERROR(SEARCH(\"test\",A1)))");
+}
+
 void ScExportTest::testEscapeCharInNumberFormatXLSX()
 {
 ScDocShellRef xDocSh = loadDoc("tdf81939.", FORMAT_XLSX);
commit e77596be879c25f5766b73a2f67cf0ddf7775ccc
Author: Markus Mohrhard 
AuthorDate: Sat Jul 14 15:16:46 2018 +0200
Commit: Markus Mohrhard 
CommitDate: Sun Jul 15 00:36:18 2018 +0200

tdf#117816, work around MS Excel bug with containsText cond format

Excel seems to require the formula that is equal to the containsText
condition.

According to cfRule (18.3.1.10) "Only rules with a type attribute
 value of expression support formula syntax." which contradicts the
MS EXCEL behavior.

Change-Id: Ifa3f9fee58194f70a64b37c62922513435d43bb8
Reviewed-on: https://gerrit.libreoffice.org/57432
Tested-by: Jenkins
Reviewed-by: Markus Mohrhard 

diff --git a/sc/source/filter/excel/xecontent.cxx 
b/sc/source/filter/excel/xecontent.cxx
index deb8f8dd2454..6d025f022eeb 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -998,6 +998,16 @@ void XclExpCFImpl::SaveXml( XclExpXmlStream& rStrm )
 rWorksheet->endElement( XML_formula );
 }
 }
+else if (IsTextRule(eOperation))
+{
+OStringBuffer aBufferOld;
+OStringBuffer aBuffer = XclXmlUtils::ToOString(aBufferOld, 
mrFormatEntry.GetValidSrcPos());
+OString aTextTopCell = aBuffer.makeStringAndClear();
+OString aFormula = "NOT(ISERROR(SEARCH(\"" + aText + "\"," + 
aTextTopCell + ")))";
+rWorksheet->startElement( XML_formula, FSEND );
+rWorksheet->writeEscaped(aFormula.getStr());
+rWorksheet->endElement( XML_formula );
+}
 // OOXTODO: XML_extLst
 rWorksheet->endElement( XML_cfRule );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-18 Thread Zdeněk Crhonek
 sc/qa/uitest/calc_tests/data/tdf86253.ods|binary
 sc/qa/uitest/calc_tests/tdf86253.py  |   66 +++
 sw/qa/uitest/writer_tests/data/tdf113284.odt |binary
 sw/qa/uitest/writer_tests/tdf113284.py   |   45 ++
 4 files changed, 111 insertions(+)

New commits:
commit b448f3cb86803ac23413cfbc643750d8e66d92b4
Author: Zdeněk Crhonek 
Date:   Wed Mar 14 17:12:50 2018 +0100

uitest for bug tdf#113284

Change-Id: If4e9875344da2525b5f7bdb658ad0096d923ead7
Reviewed-on: https://gerrit.libreoffice.org/51285
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sw/qa/uitest/writer_tests/data/tdf113284.odt 
b/sw/qa/uitest/writer_tests/data/tdf113284.odt
new file mode 100644
index ..b062fc2e8d9c
Binary files /dev/null and b/sw/qa/uitest/writer_tests/data/tdf113284.odt differ
diff --git a/sw/qa/uitest/writer_tests/tdf113284.py 
b/sw/qa/uitest/writer_tests/tdf113284.py
new file mode 100644
index ..1ab5462f997a
--- /dev/null
+++ b/sw/qa/uitest/writer_tests/tdf113284.py
@@ -0,0 +1,45 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+# 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/.
+
+from uitest.framework import UITestCase
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_state_as_dict
+import time
+from uitest.path import get_srcdir_url
+from uitest.debug import sleep
+
+def get_url_for_data_file(file_name):
+return get_srcdir_url() + "/sw/qa/uitest/writer_tests/data/" + file_name
+
+class tdf113284(UITestCase):
+
+   def test_tdf113284(self):
+writer_doc = self.ui_test.load_file(get_url_for_data_file("tdf113284.odt"))
+document = self.ui_test.get_component()
+xWriterDoc = self.xUITest.getTopFocusWindow()
+xWriterEdit = xWriterDoc.getChild("writer_edit")
+
+sleep(2)  #we need this sleep,because without this is pagecount counted 
without index. Load index takes time probably.
+xPageCount = document.CurrentController.PageCount
+self.ui_test.execute_dialog_through_command(".uno:GotoPage")
+xDialog = self.xUITest.getTopFocusWindow()
+xPageText = xDialog.getChild("page")
+xPageText.executeAction("TYPE", 
mkPropertyValues({"TEXT":str(xPageCount)})) # goto last page
+xOkBtn = xDialog.getChild("ok")
+self.ui_test.close_dialog_through_button(xOkBtn)
+
+self.assertEqual(get_state_as_dict(xWriterEdit)["CurrentPage"], 
str(xPageCount))
+self.ui_test.execute_dialog_through_command(".uno:EditCurIndex")  #open 
index dialog
+xDiagIndex = self.xUITest.getTopFocusWindow()
+xCancBtn = xDiagIndex.getChild("cancel")
+self.ui_test.close_dialog_through_button(xCancBtn)   # close dialog
+
+#page count  is not constant
+#self.assertEqual(get_state_as_dict(xWriterEdit)["CurrentPage"], "66")
#page 66 start of the Index
+#pagecount unchanged
+self.assertEqual(document.CurrentController.PageCount, xPageCount)
+
+self.ui_test.close_doc()
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
\ No newline at end of file
commit caeb7930c1d2d6508a0a170932a3688f2057363c
Author: Zdeněk Crhonek 
Date:   Sun Mar 11 21:03:08 2018 +0100

uitest for bug tdf#86253

Change-Id: If5488988ba581108d96797e58d001152cff1ad38
Reviewed-on: https://gerrit.libreoffice.org/51088
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/qa/uitest/calc_tests/data/tdf86253.ods 
b/sc/qa/uitest/calc_tests/data/tdf86253.ods
new file mode 100644
index ..d4042df43b8f
Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/tdf86253.ods differ
diff --git a/sc/qa/uitest/calc_tests/tdf86253.py 
b/sc/qa/uitest/calc_tests/tdf86253.py
new file mode 100644
index ..2f29c2a398ec
--- /dev/null
+++ b/sc/qa/uitest/calc_tests/tdf86253.py
@@ -0,0 +1,66 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# 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/.
+#
+from uitest.framework import UITestCase
+import os
+from uitest.uihelper.common import get_state_as_dict
+from uitest.path import get_srcdir_url
+from libreoffice.calc.document import get_sheet_from_doc
+from libreoffice.calc.conditional_format import 
get_conditional_format_from_sheet
+from uitest.debug import sleep
+from libreoffice.uno.propertyvalue import mkPropertyValues
+
+def get_url_for_data_file(file_name):
+return get_srcdir_url() + "/sc/qa/uitest/calc_tests/data/" + file_name
+
+class tdf86253(UITestCase):
+
+def test_tdf86253(self):
+  

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

2018-02-17 Thread Kohei Yoshida
 sc/qa/unit/data/xml/empty-rows.xml |   79 +
 sc/qa/unit/subsequent_filters-test.cxx |   35 ++
 sc/qa/unit/ucalc.cxx   |   16 +++---
 sc/qa/unit/ucalc_formula.cxx   |   20 
 sc/qa/unit/ucalc_sort.cxx  |   52 ++---
 5 files changed, 158 insertions(+), 44 deletions(-)

New commits:
commit cf9e55538375e5c5dea173151f1d0386bd29ad4e
Author: Kohei Yoshida 
Date:   Sat Feb 17 09:29:02 2018 -0500

Use the variant of checkOutput that takes nested std::vector.

That one is *the* future.  We can't remove the old one just yet...

Change-Id: I3c5b1bfee3d2cb8988b68ced5a38d52d641e5881
Reviewed-on: https://gerrit.libreoffice.org/49908
Tested-by: Jenkins 
Reviewed-by: Kohei Yoshida 

diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 7651a65a448f..29c16f6e8243 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -6028,7 +6028,7 @@ void Test::testFormulaToValue()
 
 {
 // Expected output table content.  0 = empty cell
-const char* aOutputCheck[][3] = {
+std::vector aOutputCheck = {
 { "1",  "2", "TRUE" },
 { "2",  "4", "TRUE" },
 { "3",  "6", "TRUE" },
@@ -6037,7 +6037,7 @@ void Test::testFormulaToValue()
 { "6", "12", "TRUE" },
 };
 
-bool bSuccess = checkOutput<3>(m_pDoc, aDataRange, aOutputCheck, 
"Initial value");
+bool bSuccess = checkOutput(m_pDoc, aDataRange, aOutputCheck, "Initial 
value");
 CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess);
 }
 
@@ -6048,7 +6048,7 @@ void Test::testFormulaToValue()
 
 {
 // Expected output table content.  0 = empty cell
-const char* aOutputCheck[][3] = {
+std::vector aOutputCheck = {
 { "1",  "2",  "TRUE" },
 { "2",  "4",  "TRUE" },
 { "3",  "6", "FALSE" },
@@ -6057,7 +6057,7 @@ void Test::testFormulaToValue()
 { "6", "12",  "TRUE" },
 };
 
-bool bSuccess = checkOutput<3>(m_pDoc, aDataRange, aOutputCheck, 
"Converted");
+bool bSuccess = checkOutput(m_pDoc, aDataRange, aOutputCheck, 
"Converted");
 CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess);
 }
 
@@ -6090,7 +6090,7 @@ void Test::testFormulaToValue()
 
 {
 // Expected output table content.  0 = empty cell
-const char* aOutputCheck[][3] = {
+std::vector aOutputCheck = {
 { "1",  "2", "TRUE" },
 { "2",  "4", "TRUE" },
 { "3",  "6", "TRUE" },
@@ -6099,7 +6099,7 @@ void Test::testFormulaToValue()
 { "6", "12", "TRUE" },
 };
 
-bool bSuccess = checkOutput<3>(m_pDoc, aDataRange, aOutputCheck, 
"After undo");
+bool bSuccess = checkOutput(m_pDoc, aDataRange, aOutputCheck, "After 
undo");
 CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess);
 }
 
@@ -6121,7 +6121,7 @@ void Test::testFormulaToValue()
 pUndoMgr->Redo();
 {
 // Expected output table content.  0 = empty cell
-const char* aOutputCheck[][3] = {
+std::vector aOutputCheck = {
 { "1",  "2",  "TRUE" },
 { "2",  "4",  "TRUE" },
 { "3",  "6", "FALSE" },
@@ -6130,7 +6130,7 @@ void Test::testFormulaToValue()
 { "6", "12",  "TRUE" },
 };
 
-bool bSuccess = checkOutput<3>(m_pDoc, aDataRange, aOutputCheck, 
"Converted");
+bool bSuccess = checkOutput(m_pDoc, aDataRange, aOutputCheck, 
"Converted");
 CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess);
 }
 
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index d6764c498e51..a67ef5063dcd 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -5683,7 +5683,7 @@ void Test::testFormulaDepTrackingDeleteCol()
 
 {
 // Expected output table content.  0 = empty cell
-const char* aOutputCheck[][2] = {
+std::vector aOutputCheck = {
 { "#REF!", "#REF!" },
 { nullptr,  nullptr },
 { "#REF!", "#REF!" },
@@ -5691,7 +5691,7 @@ void Test::testFormulaDepTrackingDeleteCol()
 };
 
 ScRange aCheckRange(0,0,0,1,3,0);
-bool bSuccess = checkOutput<2>(m_pDoc, aCheckRange, aOutputCheck, 
"Check after deleting column A");
+bool bSuccess = checkOutput(m_pDoc, aCheckRange, aOutputCheck, "Check 
after deleting column A");
 CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess);
 }
 
@@ -5702,7 +5702,7 @@ void Test::testFormulaDepTrackingDeleteCol()
 
 {
 // Expected output table content.  0 = empty cell
-const char* aOutputCheck[][3] = {
+std::vector aOutputCheck = {
 { "2", 

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

2018-01-30 Thread Jens Carl
 sc/qa/extras/scscenariosobj.cxx   |   23 ---
 sc/qa/extras/scspreadsheetsettingsobj.cxx |   23 ---
 2 files changed, 8 insertions(+), 38 deletions(-)

New commits:
commit 8b521b2535ca1e80758f57abf1656fc3eb21a47c
Author: Jens Carl 
Date:   Tue Jan 30 20:04:19 2018 +

Remove shared mxComponent (test document) in scspreadsheetsettingsobj

Change-Id: I6c96bf694ec64fec2ddae66a42cf8cc2a8fc0e7a
Reviewed-on: https://gerrit.libreoffice.org/48931
Tested-by: Jenkins 
Reviewed-by: Jens Carl 

diff --git a/sc/qa/extras/scspreadsheetsettingsobj.cxx 
b/sc/qa/extras/scspreadsheetsettingsobj.cxx
index 7cb3e22a6f90..34edd4cc916f 100644
--- a/sc/qa/extras/scspreadsheetsettingsobj.cxx
+++ b/sc/qa/extras/scspreadsheetsettingsobj.cxx
@@ -23,8 +23,6 @@ using namespace com::sun::star;
 
 namespace sc_apitest
 {
-#define NUMBER_OF_TESTS 1
-
 class ScSpreadsheetSettingsObj : public CalcUnoApiTest, public 
apitest::GlobalSheetSettings
 {
 public:
@@ -42,13 +40,9 @@ public:
 CPPUNIT_TEST_SUITE_END();
 
 private:
-static sal_Int32 nTest;
-static uno::Reference mxComponent;
+uno::Reference mxComponent;
 };
 
-sal_Int32 ScSpreadsheetSettingsObj::nTest = 0;
-uno::Reference ScSpreadsheetSettingsObj::mxComponent;
-
 ScSpreadsheetSettingsObj::ScSpreadsheetSettingsObj()
 : CalcUnoApiTest("/sc/qa/extras/testdocuments")
 {
@@ -56,10 +50,6 @@ ScSpreadsheetSettingsObj::ScSpreadsheetSettingsObj()
 
 uno::Reference ScSpreadsheetSettingsObj::init()
 {
-// create a calc document
-if (!mxComponent.is())
-mxComponent = loadFromDesktop("private:factory/scalc");
-
 uno::Reference xDoc(mxComponent, 
UNO_QUERY_THROW);
 CPPUNIT_ASSERT_MESSAGE("no calc document", xDoc.is());
 
@@ -69,19 +59,14 @@ uno::Reference 
ScSpreadsheetSettingsObj::init()
 
 void ScSpreadsheetSettingsObj::setUp()
 {
-nTest++;
-CPPUNIT_ASSERT(nTest <= NUMBER_OF_TESTS);
 CalcUnoApiTest::setUp();
+// create a calc document
+mxComponent = loadFromDesktop("private:factory/scalc");
 }
 
 void ScSpreadsheetSettingsObj::tearDown()
 {
-if (nTest == NUMBER_OF_TESTS)
-{
-closeDocument(mxComponent);
-mxComponent.clear();
-}
-
+closeDocument(mxComponent);
 CalcUnoApiTest::tearDown();
 }
 
commit 3e32f5530b1292a9edc5fed5997a52d0fa554420
Author: Jens Carl 
Date:   Tue Jan 30 19:55:33 2018 +

Remove shared mxComponent (test document) in scscenariosobj

Change-Id: If37b9fa10fd935c5273a817acbf7d2d2f7eeedb8
Reviewed-on: https://gerrit.libreoffice.org/48930
Tested-by: Jenkins 
Reviewed-by: Jens Carl 

diff --git a/sc/qa/extras/scscenariosobj.cxx b/sc/qa/extras/scscenariosobj.cxx
index 5f3533785103..27524fda7083 100644
--- a/sc/qa/extras/scscenariosobj.cxx
+++ b/sc/qa/extras/scscenariosobj.cxx
@@ -32,8 +32,6 @@ using namespace com::sun::star;
 
 namespace sc_apitest
 {
-#define NUMBER_OF_TESTS 2
-
 class ScScenariosObj : public CalcUnoApiTest, public apitest::XScenarios
 {
 public:
@@ -52,13 +50,9 @@ public:
 CPPUNIT_TEST_SUITE_END();
 
 private:
-static sal_Int32 nTest;
-static uno::Reference mxComponent;
+uno::Reference mxComponent;
 };
 
-sal_Int32 ScScenariosObj::nTest = 0;
-uno::Reference ScScenariosObj::mxComponent;
-
 ScScenariosObj::ScScenariosObj()
 : CalcUnoApiTest("/sc/qa/extras/testdocuments")
 {
@@ -66,10 +60,6 @@ ScScenariosObj::ScScenariosObj()
 
 uno::Reference ScScenariosObj::init()
 {
-// create a calc document
-if (!mxComponent.is())
-mxComponent = loadFromDesktop("private:factory/scalc");
-
 uno::Reference xDoc(mxComponent, 
uno::UNO_QUERY_THROW);
 CPPUNIT_ASSERT_MESSAGE("no calc document", xDoc.is());
 
@@ -95,19 +85,14 @@ uno::Reference ScScenariosObj::init()
 
 void ScScenariosObj::setUp()
 {
-nTest++;
-CPPUNIT_ASSERT(nTest <= NUMBER_OF_TESTS);
 CalcUnoApiTest::setUp();
+// create a calc document
+mxComponent = loadFromDesktop("private:factory/scalc");
 }
 
 void ScScenariosObj::tearDown()
 {
-if (nTest == NUMBER_OF_TESTS)
-{
-closeDocument(mxComponent);
-mxComponent.clear();
-}
-
+closeDocument(mxComponent);
 CalcUnoApiTest::tearDown();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-27 Thread Jens Carl
 sc/qa/extras/sccellrangesobj.cxx  |   23 ---
 sc/qa/extras/scconsolidationdescriptorobj.cxx |   23 ---
 2 files changed, 8 insertions(+), 38 deletions(-)

New commits:
commit 894b93f5ca03988aaa42b259f0b5a12d5cb3e67c
Author: Jens Carl 
Date:   Sat Jan 27 01:40:45 2018 +

Remove shared mxComponent in scconsolidationdescriptorobj

Change-Id: I4b71673fa19459eeb7ea97bb291a62f327d69958
Reviewed-on: https://gerrit.libreoffice.org/48736
Tested-by: Jenkins 
Reviewed-by: Jens Carl 

diff --git a/sc/qa/extras/scconsolidationdescriptorobj.cxx 
b/sc/qa/extras/scconsolidationdescriptorobj.cxx
index 16c4ea8b820e..a68f5fe0ef5b 100644
--- a/sc/qa/extras/scconsolidationdescriptorobj.cxx
+++ b/sc/qa/extras/scconsolidationdescriptorobj.cxx
@@ -23,8 +23,6 @@ using namespace com::sun::star;
 
 namespace sc_apitest
 {
-#define NUMBER_OF_TESTS 12
-
 class ScConsolidationDescriptorObj : public CalcUnoApiTest, public 
apitest::XConsolidationDescriptor
 {
 public:
@@ -53,13 +51,9 @@ public:
 CPPUNIT_TEST_SUITE_END();
 
 private:
-static sal_Int32 nTest;
-static uno::Reference mxComponent;
+uno::Reference mxComponent;
 };
 
-sal_Int32 ScConsolidationDescriptorObj::nTest = 0;
-uno::Reference ScConsolidationDescriptorObj::mxComponent;
-
 ScConsolidationDescriptorObj::ScConsolidationDescriptorObj()
 : CalcUnoApiTest("/sc/qa/extras/testdocuments")
 {
@@ -67,10 +61,6 @@ ScConsolidationDescriptorObj::ScConsolidationDescriptorObj()
 
 uno::Reference ScConsolidationDescriptorObj::init()
 {
-// create a calc document
-if (!mxComponent.is())
-mxComponent = loadFromDesktop("private:factory/scalc");
-
 uno::Reference xDoc(mxComponent, 
UNO_QUERY_THROW);
 CPPUNIT_ASSERT_MESSAGE("no calc document", xDoc.is());
 
@@ -80,19 +70,14 @@ uno::Reference 
ScConsolidationDescriptorObj::init()
 
 void ScConsolidationDescriptorObj::setUp()
 {
-nTest++;
-CPPUNIT_ASSERT(nTest <= NUMBER_OF_TESTS);
 CalcUnoApiTest::setUp();
+// create a calc document
+mxComponent = loadFromDesktop("private:factory/scalc");
 }
 
 void ScConsolidationDescriptorObj::tearDown()
 {
-if (nTest == NUMBER_OF_TESTS)
-{
-closeDocument(mxComponent);
-mxComponent.clear();
-}
-
+closeDocument(mxComponent);
 CalcUnoApiTest::tearDown();
 }
 
commit 6a36c66dd18db6507d66bdaed822e513d92e8127
Author: Jens Carl 
Date:   Sat Jan 27 01:35:49 2018 +

Remove shared mxComponent in sccellrangesobj

Change-Id: If357e94566440276bb1df88a4b899125beffe148
Reviewed-on: https://gerrit.libreoffice.org/48735
Tested-by: Jenkins 
Reviewed-by: Jens Carl 

diff --git a/sc/qa/extras/sccellrangesobj.cxx b/sc/qa/extras/sccellrangesobj.cxx
index 7ebe5d876842..17dbe4f9b614 100644
--- a/sc/qa/extras/sccellrangesobj.cxx
+++ b/sc/qa/extras/sccellrangesobj.cxx
@@ -27,8 +27,6 @@ using namespace css::uno;
 
 namespace sc_apitest {
 
-#define NUMBER_OF_TESTS 7
-
 class ScCellRangesObj : public CalcUnoApiTest,
 public apitest::XSheetCellRangeContainer,
 public apitest::XSheetCellRanges,
@@ -60,13 +58,9 @@ public:
 CPPUNIT_TEST_SUITE_END();
 
 private:
-static sal_Int32 nTest;
-static uno::Reference< lang::XComponent > mxComponent;
+uno::Reference< lang::XComponent > mxComponent;
 };
 
-sal_Int32 ScCellRangesObj::nTest = 0;
-uno::Reference< lang::XComponent > ScCellRangesObj::mxComponent;
-
 ScCellRangesObj::ScCellRangesObj():
 CalcUnoApiTest("/sc/qa/extras/testdocuments")
 {
@@ -74,10 +68,6 @@ ScCellRangesObj::ScCellRangesObj():
 
 uno::Reference< uno::XInterface > ScCellRangesObj::init()
 {
-// create a calc document
-if (!mxComponent.is())
-mxComponent = loadFromDesktop("private:factory/scalc");
-
 uno::Reference< sheet::XSpreadsheetDocument > xDoc(mxComponent, 
uno::UNO_QUERY_THROW);
 CPPUNIT_ASSERT_MESSAGE("no calc document", xDoc.is());
 
@@ -109,19 +99,14 @@ uno::Reference< uno::XInterface > ScCellRangesObj::init()
 
 void ScCellRangesObj::setUp()
 {
-nTest++;
-CPPUNIT_ASSERT(nTest <= NUMBER_OF_TESTS);
 CalcUnoApiTest::setUp();
+// create a calc document
+mxComponent = loadFromDesktop("private:factory/scalc");
 }
 
 void ScCellRangesObj::tearDown()
 {
-if (nTest == NUMBER_OF_TESTS)
-{
-closeDocument(mxComponent);
-mxComponent.clear();
-}
-
+closeDocument(mxComponent);
 CalcUnoApiTest::tearDown();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-27 Thread Jens Carl
 sc/qa/extras/sccellobj.cxx  |   24 ++
 sc/qa/extras/sccellrangeobj.cxx |   43 ++--
 2 files changed, 10 insertions(+), 57 deletions(-)

New commits:
commit acdb698fb762fc5769d3e3f3325f04e549c1722c
Author: Jens Carl 
Date:   Sat Jan 27 01:32:19 2018 +

Remove shared mxComponent in sccellrangeobj

Change-Id: I6044091da3b883d885642bfda3dce8acc8044420
Reviewed-on: https://gerrit.libreoffice.org/48734
Tested-by: Jenkins 
Reviewed-by: Jens Carl 

diff --git a/sc/qa/extras/sccellrangeobj.cxx b/sc/qa/extras/sccellrangeobj.cxx
index 02cdf20e4948..8c9b9423696b 100644
--- a/sc/qa/extras/sccellrangeobj.cxx
+++ b/sc/qa/extras/sccellrangeobj.cxx
@@ -46,8 +46,6 @@ using namespace css::uno;
 
 namespace sc_apitest {
 
-#define NUMBER_OF_TESTS 29
-
 class ScCellRangeObj : public CalcUnoApiTest, public apitest::CellProperties,
   public 
apitest::XCellFormatRangesSupplier,
   public 
apitest::XCellRangeAddressable,
@@ -140,13 +138,9 @@ public:
 CPPUNIT_TEST_SUITE_END();
 
 private:
-static sal_Int32 nTest;
-static uno::Reference< lang::XComponent > mxComponent;
+uno::Reference< lang::XComponent > mxComponent;
 };
 
-sal_Int32 ScCellRangeObj::nTest = 0;
-uno::Reference< lang::XComponent > ScCellRangeObj::mxComponent;
-
 ScCellRangeObj::ScCellRangeObj():
 CalcUnoApiTest("/sc/qa/extras/testdocuments"),
 apitest::XCellSeries(2, 1),
@@ -157,13 +151,6 @@ ScCellRangeObj::ScCellRangeObj():
 
 uno::Reference< uno::XInterface > ScCellRangeObj::init()
 {
-OUString aFileURL;
-const OUString aFileBase("xcellrangesquery.ods");
-createFileURL(aFileBase, aFileURL);
-std::cout << OUStringToOString(aFileURL, RTL_TEXTENCODING_UTF8).getStr() 
<< std::endl;
-if (!mxComponent.is())
-mxComponent = loadFromDesktop(aFileURL, 
"com.sun.star.sheet.SpreadsheetDocument");
-
 uno::Reference< sheet::XSpreadsheetDocument> xDoc (mxComponent, 
UNO_QUERY_THROW);
 CPPUNIT_ASSERT_MESSAGE("no calc document!", xDoc.is());
 
@@ -180,13 +167,6 @@ uno::Reference< uno::XInterface > ScCellRangeObj::init()
 
 uno::Reference< uno::XInterface > ScCellRangeObj::getXSpreadsheet()
 {
-OUString aFileURL;
-const OUString aFileBase("xcellrangesquery.ods");
-createFileURL(aFileBase, aFileURL);
-std::cout << OUStringToOString(aFileURL, RTL_TEXTENCODING_UTF8).getStr() 
<< std::endl;
-if (!mxComponent.is())
-mxComponent = loadFromDesktop(aFileURL, 
"com.sun.star.sheet.SpreadsheetDocument");
-
 uno::Reference< sheet::XSpreadsheetDocument> xDoc (mxComponent, 
UNO_QUERY_THROW);
 CPPUNIT_ASSERT_MESSAGE("no calc document!", xDoc.is());
 
@@ -198,13 +178,6 @@ uno::Reference< uno::XInterface > 
ScCellRangeObj::getXSpreadsheet()
 
 uno::Reference< uno::XInterface > ScCellRangeObj::getXCellRangeData()
 {
-OUString aFileURL;
-const OUString aFileBase("xcellrangesquery.ods");
-createFileURL(aFileBase, aFileURL);
-std::cout << OUStringToOString(aFileURL, RTL_TEXTENCODING_UTF8).getStr() 
<< std::endl;
-if (!mxComponent.is())
-mxComponent = loadFromDesktop(aFileURL, 
"com.sun.star.sheet.SpreadsheetDocument");
-
 uno::Reference< sheet::XSpreadsheetDocument> xDoc (mxComponent, 
UNO_QUERY_THROW);
 CPPUNIT_ASSERT_MESSAGE("no calc document!", xDoc.is());
 
@@ -238,19 +211,17 @@ void ScCellRangeObj::testSortOOB()
 
 void ScCellRangeObj::setUp()
 {
-nTest++;
-CPPUNIT_ASSERT(nTest <= NUMBER_OF_TESTS);
 CalcUnoApiTest::setUp();
+
+OUString aFileURL;
+const OUString aFileBase("xcellrangesquery.ods");
+createFileURL(aFileBase, aFileURL);
+mxComponent = loadFromDesktop(aFileURL, 
"com.sun.star.sheet.SpreadsheetDocument");
 }
 
 void ScCellRangeObj::tearDown()
 {
-if (nTest == NUMBER_OF_TESTS)
-{
-closeDocument(mxComponent);
-mxComponent.clear();
-}
-
+closeDocument(mxComponent);
 CalcUnoApiTest::tearDown();
 }
 
commit 241fe1be3b06d0c4c9cbfffd80a62465e485c1bd
Author: Jens Carl 
Date:   Sat Jan 27 01:26:04 2018 +

Remove shared mxComponent in sccellobj

Change-Id: I4b1fa30316c05cd0527ba429f8ad863db8be77a3
Reviewed-on: https://gerrit.libreoffice.org/48733
Tested-by: Jenkins 
Reviewed-by: Jens Carl 

diff --git a/sc/qa/extras/sccellobj.cxx b/sc/qa/extras/sccellobj.cxx
index bd572af4c4f5..996d8a9f4268 100644
--- a/sc/qa/extras/sccellobj.cxx
+++ b/sc/qa/extras/sccellobj.cxx
@@ -27,8 +27,6 @@ using namespace css::uno;
 
 namespace sc_apitest {
 
-#define NUMBER_OF_TESTS 3
-
 class ScCellObj : public CalcUnoApiTest, public apitest::SheetCell,
  public apitest::XCellAddressable,
  public apitest::XSheetAnnotationAnchor
@@ 

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

2018-01-26 Thread Jens Carl
 sc/qa/extras/scarealinkobj.cxx  |   22 +++---
 sc/qa/extras/scarealinksobj.cxx |   22 +++---
 2 files changed, 6 insertions(+), 38 deletions(-)

New commits:
commit 926ce174109c6e140012bf2dca92650f38d7e9ba
Author: Jens Carl 
Date:   Sat Jan 27 01:09:24 2018 +

Remove shared mxComponent in scarealinksobj

Change-Id: I86263b5d023b095759d572421d3ef1fc291c0cfd
Reviewed-on: https://gerrit.libreoffice.org/48730
Tested-by: Jenkins 
Reviewed-by: Jens Carl 

diff --git a/sc/qa/extras/scarealinksobj.cxx b/sc/qa/extras/scarealinksobj.cxx
index 21a90ee6f6c0..df65526c8d0f 100644
--- a/sc/qa/extras/scarealinksobj.cxx
+++ b/sc/qa/extras/scarealinksobj.cxx
@@ -22,8 +22,6 @@ using namespace css::uno;
 
 namespace sc_apitest {
 
-#define NUMBER_OF_TESTS 2
-
 class ScAreaLinksObj : public CalcUnoApiTest, public apitest::XAreaLinks
 {
 public:
@@ -42,14 +40,10 @@ public:
 CPPUNIT_TEST_SUITE_END();
 
 private:
-static sal_Int32 nTest;
-static uno::Reference< lang::XComponent > mxComponent;
+uno::Reference< lang::XComponent > mxComponent;
 
 };
 
-sal_Int32 ScAreaLinksObj::nTest = 0;
-uno::Reference< lang::XComponent > ScAreaLinksObj::mxComponent;
-
 ScAreaLinksObj::ScAreaLinksObj()
 : CalcUnoApiTest("/sc/qa/extras/testdocuments")
 {
@@ -57,10 +51,6 @@ ScAreaLinksObj::ScAreaLinksObj()
 
 uno::Reference< uno::XInterface > ScAreaLinksObj::init()
 {
-// create a calc document
-if (!mxComponent.is())
-mxComponent = loadFromDesktop("private:factory/scalc");
-
 uno::Reference< sheet::XSpreadsheetDocument > xDoc(mxComponent, 
uno::UNO_QUERY_THROW);
 CPPUNIT_ASSERT_MESSAGE("no calc document", xDoc.is());
 
@@ -72,19 +62,13 @@ uno::Reference< uno::XInterface > ScAreaLinksObj::init()
 
 void ScAreaLinksObj::setUp()
 {
-nTest++;
-CPPUNIT_ASSERT(nTest <= NUMBER_OF_TESTS);
 CalcUnoApiTest::setUp();
+mxComponent = loadFromDesktop("private:factory/scalc");
 }
 
 void ScAreaLinksObj::tearDown()
 {
-if (nTest == NUMBER_OF_TESTS)
-{
-closeDocument(mxComponent);
-mxComponent.clear();
-}
-
+closeDocument(mxComponent);
 CalcUnoApiTest::tearDown();
 }
 
commit 06d3f998658c677a42934369a72b18d70165552b
Author: Jens Carl 
Date:   Fri Jan 26 23:14:08 2018 +

Remove shared mxComponent in scarealinkobj

Change-Id: I5bcebbf203b86b7a3875643e66ddd0a783f55986
Reviewed-on: https://gerrit.libreoffice.org/48728
Tested-by: Jenkins 
Reviewed-by: Jens Carl 

diff --git a/sc/qa/extras/scarealinkobj.cxx b/sc/qa/extras/scarealinkobj.cxx
index c84d0964dbb9..c0c8c6c9b188 100644
--- a/sc/qa/extras/scarealinkobj.cxx
+++ b/sc/qa/extras/scarealinkobj.cxx
@@ -27,8 +27,6 @@ using namespace css::uno;
 
 namespace sc_apitest {
 
-#define NUMBER_OF_TESTS 9
-
 class ScAreaLinkObj : public CalcUnoApiTest, public apitest::CellAreaLink, 
public apitest::XAreaLink
 {
 public:
@@ -56,14 +54,10 @@ public:
 CPPUNIT_TEST_SUITE_END();
 
 private:
-static sal_Int32 nTest;
-static uno::Reference< lang::XComponent > mxComponent;
+uno::Reference< lang::XComponent > mxComponent;
 
 };
 
-sal_Int32 ScAreaLinkObj::nTest = 0;
-uno::Reference< lang::XComponent > ScAreaLinkObj::mxComponent;
-
 ScAreaLinkObj::ScAreaLinkObj()
 : CalcUnoApiTest("/sc/qa/extras/testdocuments")
 {
@@ -71,10 +65,6 @@ ScAreaLinkObj::ScAreaLinkObj()
 
 uno::Reference< uno::XInterface > ScAreaLinkObj::init()
 {
-// create a calc document
-if (!mxComponent.is())
-mxComponent = loadFromDesktop("private:factory/scalc");
-
 uno::Reference< sheet::XSpreadsheetDocument > xDoc(mxComponent, 
uno::UNO_QUERY_THROW);
 CPPUNIT_ASSERT_MESSAGE("no calc document", xDoc.is());
 
@@ -90,19 +80,13 @@ uno::Reference< uno::XInterface > ScAreaLinkObj::init()
 
 void ScAreaLinkObj::setUp()
 {
-nTest++;
-CPPUNIT_ASSERT(nTest <= NUMBER_OF_TESTS);
 CalcUnoApiTest::setUp();
+mxComponent = loadFromDesktop("private:factory/scalc");
 }
 
 void ScAreaLinkObj::tearDown()
 {
-if (nTest == NUMBER_OF_TESTS)
-{
-closeDocument(mxComponent);
-mxComponent.clear();
-}
-
+closeDocument(mxComponent);
 CalcUnoApiTest::tearDown();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-23 Thread Dennis Francis
 sc/qa/unit/parallelism.cxx   |   23 +++
 sc/source/core/tool/formulagroup.cxx |   16 +---
 sw/source/uibase/dochdl/swdtflvr.cxx |2 +-
 3 files changed, 37 insertions(+), 4 deletions(-)

New commits:
commit ff166845fa5ed178a97b54bb2deef4beb0cf3bdf
Author: Dennis Francis 
Date:   Tue Jan 23 19:53:19 2018 +0530

tdf#115093 : Do not reuse singleref tokens...

...in formula group computation if the formula contains
only a single reference besides any ocOpen/ocClose pairs
wrapping it as the sole content.

In such a case the "result" formula token
returned by ScInterpreter::GetResultToken() is the same
as the original singleref token, so for each row of the
formulagroup, we need to use a separate singleref token.

Also added a unit test in sc/qa/unit/parallelism.cxx

Change-Id: I6032efc5be9b51ca1e9daf9bdd19997a949d2f43
Reviewed-on: https://gerrit.libreoffice.org/48449
Reviewed-by: Michael Meeks 
Tested-by: Jenkins 

diff --git a/sc/qa/unit/parallelism.cxx b/sc/qa/unit/parallelism.cxx
index 428d65a20bec..896b7c1d8382 100644
--- a/sc/qa/unit/parallelism.cxx
+++ b/sc/qa/unit/parallelism.cxx
@@ -46,12 +46,14 @@ public:
 void testDivision();
 void testVLOOKUP();
 void testVLOOKUPSUM();
+void testSingleRef();
 
 CPPUNIT_TEST_SUITE(ScParallelismTest);
 CPPUNIT_TEST(testSUMIFS);
 CPPUNIT_TEST(testDivision);
 CPPUNIT_TEST(testVLOOKUP);
 CPPUNIT_TEST(testVLOOKUPSUM);
+CPPUNIT_TEST(testSingleRef);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -296,6 +298,27 @@ void ScParallelismTest::testVLOOKUPSUM()
 m_pDoc->DeleteTab(0);
 }
 
+void ScParallelismTest::testSingleRef()
+{
+m_pDoc->InsertTab(0, "1");
+
+const size_t nNumRows = 200;
+for (size_t i = 0; i < nNumRows; ++i)
+{
+m_pDoc->SetValue(0, i, 0, static_cast(i));
+m_pDoc->SetFormula(ScAddress(1, i, 0), "=A" + OUString::number(i+1), 
formula::FormulaGrammar::GRAM_NATIVE_UI);
+}
+
+m_xDocShell->DoHardRecalc();
+
+for (size_t i = 0; i < nNumRows; ++i)
+{
+OString aMsg = "At row " + OString::number(i);
+CPPUNIT_ASSERT_EQUAL_MESSAGE(aMsg.getStr(), i, 
static_cast(m_pDoc->GetValue(1, i, 0)));
+}
+m_pDoc->DeleteTab(0);
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(ScParallelismTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sc/source/core/tool/formulagroup.cxx 
b/sc/source/core/tool/formulagroup.cxx
index 57ad65d2b114..b494d25d1146 100644
--- a/sc/source/core/tool/formulagroup.cxx
+++ b/sc/source/core/tool/formulagroup.cxx
@@ -177,6 +177,7 @@ public:
 ScTokenArray aCode2;
 
 ScInterpreterContext aContext(mrDoc, mpFormatter);
+sal_uInt16 nNumNonOpenClose = mrCode.GetLen();
 
 for (SCROW i = mnIdx; i <= mnLastIdx; ++i, maBatchTopPos.IncRow())
 {
@@ -212,7 +213,7 @@ public:
 aCode2.AddString(rPool.intern(OUString(pStr)));
 else
 {
-if ( pTargetTok->GetType() == 
formula::svString )
+if ( ( pTargetTok->GetType() == 
formula::svString ) && ( nNumNonOpenClose > 1 ) )
 
pTargetTok->SetString(rPool.intern(OUString(pStr)));
 else
 {
@@ -226,7 +227,7 @@ public:
 // Value of NaN represents an empty cell.
 if ( !pTargetTok )
 aCode2.AddToken(ScEmptyCellToken(false, 
false));
-else if ( pTargetTok->GetType() != 
formula::svEmptyCell )
+else if ( ( pTargetTok->GetType() != 
formula::svEmptyCell ) || ( nNumNonOpenClose == 1 ) )
 {
 ScEmptyCellToken* pEmptyTok = new 
ScEmptyCellToken(false, false);
 aCode2.ReplaceToken(nTokIdx, pEmptyTok, 
formula::FormulaTokenArray::CODE_ONLY);
@@ -239,7 +240,7 @@ public:
 aCode2.AddDouble(fVal);
 else
 {
-if ( pTargetTok->GetType() == 
formula::svDouble )
+if ( ( pTargetTok->GetType() == 
formula::svDouble ) && ( nNumNonOpenClose > 1 ) )
 pTargetTok->GetDoubleAsReference() = fVal;
 else
 {
@@ -291,7 +292,16 @@ public:
 break;
 default:
 if ( !pTargetTok )
+{
+if ( p->GetType() == formula::svSep )
+{
+OpCode eOp = 

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

2017-08-16 Thread Markus Mohrhard
 sc/qa/unit/data/dataprovider/html/test1.html |   44 +++
 sc/qa/unit/dataproviders_test.cxx|   42 +
 sc/source/ui/dataprovider/datatransformation.cxx |   10 +
 sc/source/ui/dataprovider/htmldataprovider.cxx   |7 +++
 sc/source/ui/inc/datatransformation.hxx  |   12 ++
 5 files changed, 115 insertions(+)

New commits:
commit b607f62fde45a907f17545f4073e53d308b4cd1f
Author: Markus Mohrhard 
Date:   Tue Aug 15 18:19:08 2017 +0200

external data: add HTML data provider test

Change-Id: I594581ce388221760554f6272ee3af761f172c05
Reviewed-on: https://gerrit.libreoffice.org/41197
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/qa/unit/data/dataprovider/html/test1.html 
b/sc/qa/unit/data/dataprovider/html/test1.html
new file mode 100644
index ..2d81f0503d21
--- /dev/null
+++ b/sc/qa/unit/data/dataprovider/html/test1.html
@@ -0,0 +1,44 @@
+
+
+
+
+Col1
+Col2
+Col3
+Col4
+
+
+
+
+1
+2
+Audi
+Berlin
+
+
+10
+2.1
+GM
+San Francisco
+
+
+-100
+2010-1-1
+Nissan
+Tokyo
+
+
+-0.1
+2
+Ferrari
+Rome
+
+
+1
+2
+Peugeot
+Paris
+
+
+
+
diff --git a/sc/qa/unit/dataproviders_test.cxx 
b/sc/qa/unit/dataproviders_test.cxx
index 5ab7dfe3f933..4b18db5ecd75 100644
--- a/sc/qa/unit/dataproviders_test.cxx
+++ b/sc/qa/unit/dataproviders_test.cxx
@@ -28,10 +28,12 @@ public:
 
 void testCSVImport();
 void testDataLargerThanDB();
+void testHTMLImport();
 
 CPPUNIT_TEST_SUITE(ScDataProvidersTest);
 CPPUNIT_TEST(testCSVImport);
 CPPUNIT_TEST(testDataLargerThanDB);
+CPPUNIT_TEST(testHTMLImport);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -95,6 +97,46 @@ void ScDataProvidersTest::testDataLargerThanDB()
 CPPUNIT_ASSERT_EQUAL(OUString(), m_pDoc->GetString(2, 1, 0));
 }
 
+void ScDataProvidersTest::testHTMLImport()
+{
+ScDBData* pDBData = new ScDBData("testDB", 0, 0, 0, 10, 10);
+bool bInserted = m_pDoc->GetDBCollection()->getNamedDBs().insert(pDBData);
+CPPUNIT_ASSERT(bInserted);
+
+OUString aFileURL;
+createFileURL("test1.", "html", aFileURL);
+sc::ExternalDataSource aDataSource(aFileURL, "org.libreoffice.calc.html", 
m_pDoc);
+aDataSource.setID("//table");
+aDataSource.setDBData(pDBData);
+
+
+m_pDoc->GetExternalDataMapper().insertDataSource(aDataSource);
+auto& rDataSources = m_pDoc->GetExternalDataMapper().getDataSources();
+CPPUNIT_ASSERT(!rDataSources.empty());
+
+rDataSources[0].refresh(m_pDoc, true);
+Scheduler::ProcessEventsToIdle();
+
+
+std::vector aCarManufacturers = {"Audi", "GM", "Nissan", 
"Ferrari", "Peugeot"};
+std::vector aCities = {"Berlin", "San Francisco", "Tokyo", 
"Rome", "Paris"};
+std::vector aFirstCol = {1, 10, -100, -0.1, 1};
+std::vector aSecondCol = {2, 2.1, 40179, 2, 2,}; // 40179 is equal 
to 2010-1-1
+
+CPPUNIT_ASSERT_EQUAL(OUString("Col1"), m_pDoc->GetString(0, 0, 0));
+CPPUNIT_ASSERT_EQUAL(OUString("Col2"), m_pDoc->GetString(1, 0, 0));
+CPPUNIT_ASSERT_EQUAL(OUString("Col3"), m_pDoc->GetString(2, 0, 0));
+CPPUNIT_ASSERT_EQUAL(OUString("Col4"), m_pDoc->GetString(3, 0, 0));
+
+for (SCROW nRow = 0; nRow <= 4; ++nRow)
+{
+ASSERT_DOUBLES_EQUAL(aFirstCol[nRow], m_pDoc->GetValue(0, nRow + 1, 
0));
+ASSERT_DOUBLES_EQUAL(aSecondCol[nRow], m_pDoc->GetValue(1, nRow + 1, 
0));
+CPPUNIT_ASSERT_EQUAL(aCarManufacturers[nRow], m_pDoc->GetString(2, 
nRow + 1, 0));
+CPPUNIT_ASSERT_EQUAL(aCities[nRow], m_pDoc->GetString(3, nRow + 1, 0));
+}
+}
+
 ScDataProvidersTest::ScDataProvidersTest() :
 ScBootstrapFixture( "/sc/qa/unit/data/dataprovider" ),
 m_pDoc(nullptr)
diff --git a/sc/source/ui/dataprovider/datatransformation.cxx 
b/sc/source/ui/dataprovider/datatransformation.cxx
index 2c2fe72bbcf4..b4251dc7201a 100644
--- a/sc/source/ui/dataprovider/datatransformation.cxx
+++ b/sc/source/ui/dataprovider/datatransformation.cxx
@@ -91,6 +91,16 @@ void MergeColumnTransformation::Transform(ScDocument& rDoc)
 rDoc.DeleteCol(0, 0, MAXROW, 0, mnCol2, 1);
 }
 
+SortTransformation::SortTransformation(const ScSortParam& rSortParam):
+maSortParam(rSortParam)
+{
+}
+
+void SortTransformation::Transform(ScDocument& rDoc)
+{
+rDoc.Sort(0, maSortParam, false, false, nullptr, nullptr);
+}
+
 

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

2017-07-23 Thread Markus Mohrhard
 sc/qa/unit/screenshots/screenshots.cxx |1 +
 sw/qa/unit/sw-dialogs-test_2.cxx   |2 ++
 2 files changed, 3 insertions(+)

New commits:
commit 9263470903a46fa030fb941ee024bf24f2b98e59
Author: Markus Mohrhard 
Date:   Mon Jul 24 00:09:31 2017 +0200

screenshots: the screenshots now need a initialized SwModule

Change-Id: I44ea8630a874300e9163d71bd5094a5941d2a419

diff --git a/sw/qa/unit/sw-dialogs-test_2.cxx b/sw/qa/unit/sw-dialogs-test_2.cxx
index a2adfdc1bf08..261735c9405c 100644
--- a/sw/qa/unit/sw-dialogs-test_2.cxx
+++ b/sw/qa/unit/sw-dialogs-test_2.cxx
@@ -16,6 +16,7 @@
 #include 
 
 #include 
+#include 
 
 using namespace ::com::sun::star;
 
@@ -56,6 +57,7 @@ SwDialogsTest2::SwDialogsTest2()
 void SwDialogsTest2::setUp()
 {
 ScreenshotTest::setUp();
+SwGlobals::ensure();
 // Make sure the swui library's global pSwResMgr is initialized
 // (alternatively to dynamically loading the library, SwCreateDialogFactory
 // could be declared in an include file and this CppunitTest link against
commit 7ebdc10f04539269542bbe348b5a0a297183f116
Author: Markus Mohrhard 
Date:   Mon Jul 24 00:09:04 2017 +0200

screenshots: fix the screenshot build

Change-Id: I3c295c4817e19c5e31b793fd455c3071015098d7

diff --git a/sc/qa/unit/screenshots/screenshots.cxx 
b/sc/qa/unit/screenshots/screenshots.cxx
index a49ab9c152ae..adcfe9e93dbe 100644
--- a/sc/qa/unit/screenshots/screenshots.cxx
+++ b/sc/qa/unit/screenshots/screenshots.cxx
@@ -40,6 +40,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-06-09 Thread Eike Rathke
 sc/qa/unit/ucalc_formula.cxx |  141 -
 sc/source/core/tool/interpr1.cxx |  259 +++
 2 files changed, 342 insertions(+), 58 deletions(-)

New commits:
commit 076ed447f694239d5c67adee528ea6e471d909ff
Author: Eike Rathke 
Date:   Sat Jun 10 00:46:00 2017 +0200

Unit test for COUNTIFS, SUMIFS, AVERAGEIFS with array of references, 
tdf#58874

Change-Id: Ie833716fcde0b82dcaa2e5b66deb2952ee912b7f

diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index dffcfff11dda..93c500a1dbfa 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -7936,15 +7936,140 @@ void Test::testFuncSUMIFS()
 // Matrix formula in E8:E10 with AVERAGEIFS
 m_pDoc->InsertMatrixFormula(4, 7, 4, 9, aMark, 
"=AVERAGEIFS(B1:B7;A1:A7;A9:A11)");
 
-// Result B1+B5, B2+B6, B3+B7 and counts and averages.
-std::vector aCheck = {
-{ "17", "2",  "8.5" },
-{ "34", "2", "17" },
-{ "68", "2", "34" }
-};
+{
+// Result B1+B5, B2+B6, B3+B7 and counts and averages.
+std::vector aCheck = {
+{ "17", "2",  "8.5" },
+{ "34", "2", "17" },
+{ "68", "2", "34" }
+};
+bool bGood = checkOutput(m_pDoc, ScRange(2,7,0, 4,9,0), aCheck,
+"SUMIFS, COUNTIFS and AVERAGEIFS in array context");
+CPPUNIT_ASSERT_MESSAGE("SUMIFS, COUNTIFS or AVERAGEIFS in array 
context failed", bGood);
+}
+
+// Matrix formula in G8:G10 with SUMIFS and reference list arrays.
+m_pDoc->InsertMatrixFormula(6, 7, 6, 9, aMark, 
"=SUMIFS(OFFSET(B1;ROW(1:3);0;2);OFFSET(B1;ROW(1:3);0;2);\">4\")");
+// Matrix formula in H8:H10 with COUNTIFS and reference list arrays.
+m_pDoc->InsertMatrixFormula(7, 7, 7, 9, aMark, 
"=COUNTIFS(OFFSET(B1;ROW(1:3);0;2);\">4\")");
+// Matrix formula in I8:I10 with AVERAGEIFS and reference list arrays.
+m_pDoc->InsertMatrixFormula(8, 7, 8, 9, aMark, 
"=AVERAGEIFS(OFFSET(B1;ROW(1:3);0;2);OFFSET(B1;ROW(1:3);0;2);\">4\")");
+
+{
+// Result sums, counts and averages.
+std::vector aCheck = {
+{  "0", "0", "#DIV/0!" },
+{  "8", "1",  "8" },
+{ "24", "2", "12" }
+};
+bool bGood = checkOutput(m_pDoc, ScRange(6,7,0, 8,9,0), aCheck,
+"SUMIFS, COUNTIFS and AVERAGEIFS with reference list arrays");
+CPPUNIT_ASSERT_MESSAGE("SUMIFS, COUNTIFS or AVERAGEIFS with reference 
list arrays failed", bGood);
+}
+
+// Matrix formula in K8:K10 with SUMIFS and reference list array condition
+// and "normal" data range.
+m_pDoc->InsertMatrixFormula(10, 7, 10, 9, aMark, 
"=SUMIFS(B1:B2;OFFSET(B1;ROW(1:3);0;2);\">4\")");
+// Matrix formula in L8:L10 with AVERAGEIFS and reference list array
+// condition and "normal" data range.
+m_pDoc->InsertMatrixFormula(11, 7, 11, 9, aMark, 
"=AVERAGEIFS(B1:B2;OFFSET(B1;ROW(1:3);0;2);\">4\")");
+
+{
+// Result sums and averages.
+std::vector aCheck = {
+{ "0", "#DIV/0!" },
+{ "2", "2" },
+{ "3", "1.5" }
+};
+bool bGood = checkOutput(m_pDoc, ScRange(10,7,0, 11,9,0), aCheck,
+"SUMIFS, COUNTIFS and AVERAGEIFS with reference list array and 
normal range");
+CPPUNIT_ASSERT_MESSAGE("SUMIFS, COUNTIFS or AVERAGEIFS with reference 
list array and normal range failed", bGood);
+}
+
+// Matrix formula in G18:G20 with SUMIFS and reference list arrays and a
+// "normal" criteria range.
+m_pDoc->InsertMatrixFormula(6, 17, 6, 19, aMark, 
"=SUMIFS(OFFSET(B1;ROW(1:3);0;2);OFFSET(B1;ROW(1:3);0;2);\">4\";B1:B2;\">1\")");
+// Matrix formula in H18:H20 with COUNTIFS and reference list arrays and a
+// "normal" criteria range.
+m_pDoc->InsertMatrixFormula(7, 17, 7, 19, aMark, 
"=COUNTIFS(OFFSET(B1;ROW(1:3);0;2);\">4\";B1:B2;\">1\")");
+// Matrix formula in I18:I20 with AVERAGEIFS and reference list arrays and
+// a "normal" criteria range.
+m_pDoc->InsertMatrixFormula(8, 17, 8, 19, aMark, 
"=AVERAGEIFS(OFFSET(B1;ROW(1:3);0;2);OFFSET(B1;ROW(1:3);0;2);\">4\";B1:B2;\">1\")");
+
+{
+// Result sums, counts and averages.
+std::vector aCheck = {
+{  "0", "0", "#DIV/0!" },
+{  "8", "1",  "8" },
+{ "16", "1", "16" }
+};
+bool bGood = checkOutput(m_pDoc, ScRange(6,17,0, 8,19,0), aCheck,
+"SUMIFS, COUNTIFS and AVERAGEIFS with reference list arrays 
and a normal criteria range");
+CPPUNIT_ASSERT_MESSAGE("SUMIFS, COUNTIFS or AVERAGEIFS with reference 
list arrays and a normal criteria range failed", bGood);
+}
+
+// Matrix formula in K18:K20 with SUMIFS and reference list array condition
+// and "normal" data range and a "normal" criteria range.
+m_pDoc->InsertMatrixFormula(10, 

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

2017-05-22 Thread Eike Rathke
 sc/qa/unit/ucalc_formula.cxx |9 +++
 sc/source/core/tool/interpr1.cxx |  114 +++
 2 files changed, 113 insertions(+), 10 deletions(-)

New commits:
commit a21f1c11aacde31fa190859828f257544afea818
Author: Eike Rathke 
Date:   Mon May 22 16:57:36 2017 +0200

Unit test for SUBTOTAL STDEV with array of references, tdf#58874

Change-Id: I27d8a0a3c03012a4575785feb32df11a76d6fcdb

diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index 69f3a47962c1..da0dc34cec2c 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -7955,6 +7955,15 @@ void Test::testFuncRefListArraySUBTOTAL()
 aPos.IncRow();
 CPPUNIT_ASSERT_EQUAL_MESSAGE("SUBTOTAL MAX for A4:A5 failed", 16.0, 
m_pDoc->GetValue(aPos));
 
+// Matrix in F7:F9, individual STDEV of A2:A3, A3:A4 and A4:A5
+m_pDoc->InsertMatrixFormula(5, 6, 5, 8, aMark, 
"=SUBTOTAL(7;OFFSET(A1;ROW(1:3);0;2))");
+aPos.Set(5,6,0);
+CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("SUBTOTAL STDEV for A2:A3 failed", 
1.414214, m_pDoc->GetValue(aPos), 1e-6);
+aPos.IncRow();
+CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("SUBTOTAL STDEV for A3:A4 failed", 
2.828427, m_pDoc->GetValue(aPos), 1e-6);
+aPos.IncRow();
+CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("SUBTOTAL STDEV for A4:A5 failed", 
5.656854, m_pDoc->GetValue(aPos), 1e-6);
+
 m_pDoc->DeleteTab(0);
 }
 
commit fda09a666dd22aa6b2a9abfb25f7c97a3ab910fe
Author: Eike Rathke 
Date:   Mon May 22 16:56:50 2017 +0200

Handle STDEV, STDEVP, VAR and VARP with arrays of references, tdf#58874

Change-Id: Ifdd5336124df9a085902417590d081646d05a588

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 23f599e45a2d..f80f49557d82 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -3785,10 +3785,19 @@ void ScInterpreter::ScMax( bool bTextAsZero )
 void ScInterpreter::GetStVarParams( bool bTextAsZero, double(*VarResult)( 
double fVal, size_t nValCount ) )
 {
 short nParamCount = GetByte();
+const SCSIZE nMatRows = GetRefListArrayMaxSize( nParamCount);
+
+struct ArrayRefListValue
+{
+std::vector mvValues;
+double mfSum;
+ArrayRefListValue() : mfSum(0.0) {}
+};
+std::vector vArrayValues;
+size_t nRefArrayPos = std::numeric_limits::max();
 
 std::vector values;
 double fSum= 0.0;
-double vSum= 0.0;
 double fVal = 0.0;
 ScAddress aAdr;
 ScRange aRange;
@@ -3826,9 +3835,60 @@ void ScInterpreter::GetStVarParams( bool bTextAsZero, 
double(*VarResult)( double
 }
 }
 break;
-case svDoubleRef :
 case svRefList :
 {
+const ScRefListToken* p = dynamic_cast(pStack[sp-1]);
+if (p && p->IsArrayResult())
+{
+nRefArrayPos = nRefInList;
+if (vArrayValues.empty())
+{
+// Create and init all elements with current value.
+assert(nMatRows > 0);
+vArrayValues.resize(nMatRows);
+for (auto & it : vArrayValues)
+{
+it.mvValues = values;
+it.mfSum = fSum;
+}
+}
+else
+{
+// Current value and values from vector are operands
+// for each vector position.
+for (auto & it : vArrayValues)
+{
+it.mvValues.insert( it.mvValues.end(), 
values.begin(), values.end());
+it.mfSum += fSum;
+}
+}
+ArrayRefListValue& rArrayValue = 
vArrayValues[nRefArrayPos];
+FormulaError nErr = FormulaError::NONE;
+PopDoubleRef( aRange, nParamCount, nRefInList);
+ScValueIterator aValIter( pDok, aRange, mnSubTotalFlags, 
bTextAsZero );
+if (aValIter.GetFirst(fVal, nErr))
+{
+do
+{
+rArrayValue.mvValues.push_back(fVal);
+rArrayValue.mfSum += fVal;
+}
+while ((nErr == FormulaError::NONE) && 
aValIter.GetNext(fVal, nErr));
+}
+if ( nErr != FormulaError::NONE )
+{
+rArrayValue.mfSum = CreateDoubleError( nErr);
+}
+// Reset.
+std::vector().swap(values);
+fSum = 0.0;
+nRefArrayPos = std::numeric_limits::max();
+

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

2017-05-22 Thread Eike Rathke
 sc/qa/unit/ucalc_formula.cxx |   19 ++-
 sc/source/core/tool/interpr6.cxx |5 ++---
 2 files changed, 16 insertions(+), 8 deletions(-)

New commits:
commit 3e9f9bff4a3d8365f58545dae0c004a1254a56e3
Author: Eike Rathke 
Date:   Mon May 22 16:23:25 2017 +0200

Unit test for SUBTOTAL AVERAGE with array of references, tdf#58874

To test the count vector as well.

Change-Id: Idc6bcdc779ea0e6e8a6118934fd8e7856eba1518

diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index 92f93722c531..69f3a47962c1 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -7928,18 +7928,27 @@ void Test::testFuncRefListArraySUBTOTAL()
 aPos.IncRow();
 CPPUNIT_ASSERT_EQUAL_MESSAGE("SUBTOTAL SUM for A4:A5 failed", 24.0, 
m_pDoc->GetValue(aPos));
 
-// Matrix in C7:C9, individual MIN of A2:A3, A3:A4 and A4:A5
-m_pDoc->InsertMatrixFormula(2, 6, 2, 8, aMark, 
"=SUBTOTAL(5;OFFSET(A1;ROW(1:3);0;2))");
+// Matrix in C7:C9, individual AVERAGE of A2:A3, A3:A4 and A4:A5
+m_pDoc->InsertMatrixFormula(2, 6, 2, 8, aMark, 
"=SUBTOTAL(1;OFFSET(A1;ROW(1:3);0;2))");
 aPos.Set(2,6,0);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("SUBTOTAL AVERAGE for A2:A3 failed",  3.0, 
m_pDoc->GetValue(aPos));
+aPos.IncRow();
+CPPUNIT_ASSERT_EQUAL_MESSAGE("SUBTOTAL AVERAGE for A3:A4 failed",  6.0, 
m_pDoc->GetValue(aPos));
+aPos.IncRow();
+CPPUNIT_ASSERT_EQUAL_MESSAGE("SUBTOTAL AVERAGE for A4:A5 failed", 12.0, 
m_pDoc->GetValue(aPos));
+
+// Matrix in D7:D9, individual MIN of A2:A3, A3:A4 and A4:A5
+m_pDoc->InsertMatrixFormula(3, 6, 3, 8, aMark, 
"=SUBTOTAL(5;OFFSET(A1;ROW(1:3);0;2))");
+aPos.Set(3,6,0);
 CPPUNIT_ASSERT_EQUAL_MESSAGE("SUBTOTAL MIN for A2:A3 failed",  2.0, 
m_pDoc->GetValue(aPos));
 aPos.IncRow();
 CPPUNIT_ASSERT_EQUAL_MESSAGE("SUBTOTAL MIN for A3:A4 failed",  4.0, 
m_pDoc->GetValue(aPos));
 aPos.IncRow();
 CPPUNIT_ASSERT_EQUAL_MESSAGE("SUBTOTAL MIN for A4:A5 failed",  8.0, 
m_pDoc->GetValue(aPos));
 
-// Matrix in D7:D9, individual MAX of A2:A3, A3:A4 and A4:A5
-m_pDoc->InsertMatrixFormula(3, 6, 3, 8, aMark, 
"=SUBTOTAL(4;OFFSET(A1;ROW(1:3);0;2))");
-aPos.Set(3,6,0);
+// Matrix in E7:E9, individual MAX of A2:A3, A3:A4 and A4:A5
+m_pDoc->InsertMatrixFormula(4, 6, 4, 8, aMark, 
"=SUBTOTAL(4;OFFSET(A1;ROW(1:3);0;2))");
+aPos.Set(4,6,0);
 CPPUNIT_ASSERT_EQUAL_MESSAGE("SUBTOTAL MAX for A2:A3 failed",  4.0, 
m_pDoc->GetValue(aPos));
 aPos.IncRow();
 CPPUNIT_ASSERT_EQUAL_MESSAGE("SUBTOTAL MAX for A3:A4 failed",  8.0, 
m_pDoc->GetValue(aPos));
commit 44b56bab060b3268617ed930fb783a20e617d137
Author: Eike Rathke 
Date:   Mon May 22 16:20:59 2017 +0200

Get vector count right, tdf#58874

Change-Id: I1d4224c6a87af4ed9f879e144958f95418fabbf7

diff --git a/sc/source/core/tool/interpr6.cxx b/sc/source/core/tool/interpr6.cxx
index 35004f2846bc..6e614098e4a7 100644
--- a/sc/source/core/tool/interpr6.cxx
+++ b/sc/source/core/tool/interpr6.cxx
@@ -997,14 +997,13 @@ void ScInterpreter::IterateParameters( ScIterFunc eFunc, 
bool bTextAsZero )
 // Include value of last non-references-array type and calculate final 
result.
 for (SCSIZE i=0; i < nMatRows; ++i)
 {
-if (xResCount)
-nCount += xResCount->GetDouble(0,i);
+sal_uLong nVecCount = (xResCount ? nCount + 
xResCount->GetDouble(0,i) : nCount);
 double fVecRes = xResMat->GetDouble(0,i);
 if (eFunc == ifPRODUCT)
 fVecRes *= fRes;
 else
 fVecRes += fRes;
-fVecRes = lcl_IterResult( eFunc, fVecRes, fMem, nCount);
+fVecRes = lcl_IterResult( eFunc, fVecRes, fMem, nVecCount);
 xResMat->PutDouble( fVecRes, 0,i);
 }
 PushMatrix( xResMat);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-05-03 Thread Marco Cecchetti
 sc/qa/unit/tiledrendering/data/cursor-away.ods |binary
 sc/qa/unit/tiledrendering/tiledrendering.cxx   |   39 +
 sc/source/ui/view/gridwin4.cxx |6 ---
 3 files changed, 39 insertions(+), 6 deletions(-)

New commits:
commit 44eb05c254c3a45b3590fba7b4ea2194f45930b5
Author: Marco Cecchetti 
Date:   Wed May 3 18:15:11 2017 +0200

sc lok:fix up: scrolling issue: the document size is not updated in client

Change-Id: Ied16f52b0a3a3be074390d60120493c75076c84d

diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 346f833050f2..fa565a4ab8c3 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -1156,16 +1156,10 @@ void ScGridWindow::PaintTile( VirtualDevice& rDevice,
 pDoc->GetTiledRenderingArea(nTab, nEndCol, nEndRow);
 
 if (nEndCol < nBottomRightTileCol)
-{
 nEndCol = nBottomRightTileCol;
-pViewData->SetMaxTiledCol(nEndCol);
-}
 
 if (nEndRow < nBottomRightTileRow)
-{
 nEndRow = nBottomRightTileRow;
-pViewData->SetMaxTiledRow(nEndRow);
-}
 
 nTopLeftTileCol = std::max(nTopLeftTileCol, 0);
 nTopLeftTileRow = std::max(nTopLeftTileRow, 0);
commit 02359793bbb8e2b762d3f9ce0f41905f8422d7d4
Author: Jan Holesovsky 
Date:   Tue May 2 16:32:28 2017 +0200

sc lok: Unit test that painting tiles after pgdown returns actual content.

Test based on the online.git test by Ashod Nakashian, thanks for the repro
steps there!

Change-Id: I225127e953b0dade0b1bd4e12c131dc984b7e3fc

diff --git a/sc/qa/unit/tiledrendering/data/cursor-away.ods 
b/sc/qa/unit/tiledrendering/data/cursor-away.ods
new file mode 100644
index ..c593fc7db033
Binary files /dev/null and b/sc/qa/unit/tiledrendering/data/cursor-away.ods 
differ
diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index 220a1a271e3b..29f8e5179a96 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -82,6 +82,7 @@ public:
 void testUndoLimiting();
 void testUndoRepairDispatch();
 void testInsertGraphicInvalidations();
+void testDocumentSizeWithTwoViews();
 
 CPPUNIT_TEST_SUITE(ScTiledRenderingTest);
 CPPUNIT_TEST(testRowColumnSelections);
@@ -107,6 +108,7 @@ public:
 CPPUNIT_TEST(testUndoLimiting);
 CPPUNIT_TEST(testUndoRepairDispatch);
 CPPUNIT_TEST(testInsertGraphicInvalidations);
+CPPUNIT_TEST(testDocumentSizeWithTwoViews);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -1314,6 +1316,43 @@ void 
ScTiledRenderingTest::testInsertGraphicInvalidations()
 comphelper::LibreOfficeKit::setActive(false);
 }
 
+void ScTiledRenderingTest::testDocumentSizeWithTwoViews()
+{
+comphelper::LibreOfficeKit::setActive();
+
+// Open a document that has the cursor far away & paint a tile
+ScModelObj* pModelObj = createDoc("cursor-away.ods");
+
+// Set the visible area, and press page down
+pModelObj->setClientVisibleArea(Rectangle(750, 1861, 20583, 6997));
+pModelObj->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, awt::Key::PAGEDOWN);
+pModelObj->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, awt::Key::PAGEDOWN);
+Scheduler::ProcessEventsToIdle();
+
+int nCanvasWidth = 256;
+int nCanvasHeight = 256;
+std::vector aBuffer1(nCanvasWidth * nCanvasHeight * 4);
+ScopedVclPtrInstance pDevice1(nullptr, Size(1, 1), 
DeviceFormat::DEFAULT);
+pDevice1->SetOutputSizePixelScaleOffsetAndBuffer(Size(nCanvasWidth, 
nCanvasHeight), Fraction(1.0), Point(), aBuffer1.data());
+pModelObj->paintTile(*pDevice1.get(), nCanvasWidth, nCanvasHeight, 
/*nTilePosX=*/0, /*nTilePosY=*/291840, /*nTileWidth=*/3840, 
/*nTileHeight=*/3840);
+Scheduler::ProcessEventsToIdle();
+
+// Create a new view
+SfxLokHelper::createView();
+
+std::vector aBuffer2(nCanvasWidth * nCanvasHeight * 4);
+ScopedVclPtrInstance pDevice2(nullptr, Size(1, 1), 
DeviceFormat::DEFAULT);
+pDevice2->SetOutputSizePixelScaleOffsetAndBuffer(Size(nCanvasWidth, 
nCanvasHeight), Fraction(1.0), Point(), aBuffer2.data());
+pModelObj->paintTile(*pDevice2.get(), nCanvasWidth, nCanvasHeight, 
/*nTilePosX=*/0, /*nTilePosY=*/291840, /*nTileWidth=*/3840, 
/*nTileHeight=*/3840);
+Scheduler::ProcessEventsToIdle();
+
+// Check that the tiles actually have the same content
+for (size_t i = 0; i < aBuffer1.size(); ++i)
+CPPUNIT_ASSERT_EQUAL(aBuffer1[i], aBuffer2[i]);
+
+comphelper::LibreOfficeKit::setActive(false);
+}
+
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(ScTiledRenderingTest);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-16 Thread Markus Mohrhard
 sc/qa/unit/ucalc.hxx|2 ++
 sc/qa/unit/ucalc_condformat.cxx |   33 +
 sc/source/core/data/table7.cxx  |4 ++--
 3 files changed, 37 insertions(+), 2 deletions(-)

New commits:
commit 36d7e21c00d59eead018ad8ef339847a782b9734
Author: Markus Mohrhard 
Date:   Thu Mar 16 21:35:05 2017 +0100

add test for tdf#106242

Change-Id: I11f67c118617c78fa86b87afed87fcddba4e69e1
Reviewed-on: https://gerrit.libreoffice.org/35295
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/qa/unit/ucalc.hxx b/sc/qa/unit/ucalc.hxx
index c48a25f126af..fb2390c1f5da 100644
--- a/sc/qa/unit/ucalc.hxx
+++ b/sc/qa/unit/ucalc.hxx
@@ -468,6 +468,7 @@ public:
 void testCondCopyPaste();
 void testCondCopyPasteSingleCell(); //e.g. fdo#82503
 void testCondCopyPasteSingleCellToRange(); //e.g. fdo#82503
+void testCondCopyPasteSingleRowToRange(); //e.g. tdf#106242
 void testCondCopyPasteSheetBetweenDoc();
 void testCondCopyPasteSheet();
 void testIconSet();
@@ -745,6 +746,7 @@ public:
 CPPUNIT_TEST(testCondCopyPaste);
 CPPUNIT_TEST(testCondCopyPasteSingleCell);
 CPPUNIT_TEST(testCondCopyPasteSingleCellToRange);
+CPPUNIT_TEST(testCondCopyPasteSingleRowToRange);
 CPPUNIT_TEST(testCondCopyPasteSheetBetweenDoc);
 CPPUNIT_TEST(testCondCopyPasteSheet);
 CPPUNIT_TEST(testCondFormatEndsWithStr);
diff --git a/sc/qa/unit/ucalc_condformat.cxx b/sc/qa/unit/ucalc_condformat.cxx
index ee0d8abee066..0b0a8a2af97b 100644
--- a/sc/qa/unit/ucalc_condformat.cxx
+++ b/sc/qa/unit/ucalc_condformat.cxx
@@ -378,6 +378,39 @@ void Test::testCondCopyPasteSingleCellToRange()
 m_pDoc->DeleteTab(0);
 }
 
+void Test::testCondCopyPasteSingleRowToRange()
+{
+m_pDoc->InsertTab(0, "Test");
+
+ScConditionalFormat* pFormat = new ScConditionalFormat(1, m_pDoc);
+ScRange aCondFormatRange(0,0,0,0,0,0);
+ScRangeList aRangeList(aCondFormatRange);
+pFormat->SetRange(aRangeList);
+
+ScCondFormatEntry* pEntry = new 
ScCondFormatEntry(SC_COND_DIRECT,"=B2","",m_pDoc,ScAddress(0,0,0),ScGlobal::GetRscString(STR_STYLENAME_RESULT));
+pFormat->AddEntry(pEntry);
+m_pDoc->AddCondFormat(pFormat, 0);
+
+ScDocument aClipDoc(SCDOCMODE_CLIP);
+copyToClip(m_pDoc, ScRange(0,0,0,MAXCOL,0,0), );
+ScRange aTargetRange(0,4,0,MAXCOL,4,0);
+pasteOneCellFromClip(m_pDoc, aTargetRange, );
+
+std::set aCondFormatIndices;
+
+ScConditionalFormat* pNewFormat = m_pDoc->GetCondFormat(0, 4, 0);
+CPPUNIT_ASSERT(pNewFormat);
+CPPUNIT_ASSERT(pNewFormat->GetKey() != pFormat->GetKey());
+
+for (SCCOL nCol = 1; nCol <= MAXCOL; ++nCol)
+{
+ScConditionalFormat* pNewFormat2 = m_pDoc->GetCondFormat(nCol, 4, 0);
+CPPUNIT_ASSERT(!pNewFormat2);
+}
+
+m_pDoc->DeleteTab(0);
+}
+
 void Test::testCondCopyPasteSheetBetweenDoc()
 {
 m_pDoc->InsertTab(0, "Test");
commit d4bdac90c3b12d1de74b99786f2e830ee2ae18dc
Author: Markus Mohrhard 
Date:   Thu Mar 16 21:46:57 2017 +0100

CopyOneCellFromClip also copies one row ranges, tdf#106242

Change-Id: I1750d411766ba2b4128fc1c00769a8b2e56e7547
Reviewed-on: https://gerrit.libreoffice.org/35294
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/source/core/data/table7.cxx b/sc/source/core/data/table7.cxx
index a84942912aa5..72595dae9b77 100644
--- a/sc/source/core/data/table7.cxx
+++ b/sc/source/core/data/table7.cxx
@@ -65,10 +65,10 @@ void ScTable::CopyOneCellFromClip(
 assert(nColOffset >= 0);
 aCol[nCol].CopyOneCellFromClip(rCxt, nRow1, nRow2, nColOffset);
 
-if (rCxt.getInsertFlag() & InsertDeleteFlags::ATTRIB)
+if ((rCxt.getInsertFlag() & InsertDeleteFlags::ATTRIB) && (nColOffset 
== 0))
 {
 for (SCROW nRow = nRow1; nRow <= nRow2; ++nRow)
-CopyConditionalFormat(nCol, nRow, nCol, nRow, nCol - 
aSrcRange.aStart.Col(),
+CopyConditionalFormat(nCol, nRow, nCol + nSrcColSize - 1, 
nRow, nCol - aSrcRange.aStart.Col(),
 nRow - nSrcRow, pSrcTab);
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-16 Thread Markus Mohrhard
 sc/qa/unit/ucalc.hxx |4 +++
 sc/qa/unit/ucalc_condformat.cxx  |   40 +++
 sc/source/core/data/conditio.cxx |6 ++---
 3 files changed, 47 insertions(+), 3 deletions(-)

New commits:
commit ad9336f29650dc38be06d771f5c3dbc7f0078ff1
Author: Markus Mohrhard 
Date:   Thu Mar 16 20:07:04 2017 +0100

add tests for tdf#104026

Change-Id: I928828f5f3ee22429e174e6e761d6683a36fdb24
Reviewed-on: https://gerrit.libreoffice.org/35290
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/qa/unit/ucalc.hxx b/sc/qa/unit/ucalc.hxx
index 076e5b0e404a..92f0d6dd04d5 100644
--- a/sc/qa/unit/ucalc.hxx
+++ b/sc/qa/unit/ucalc.hxx
@@ -485,6 +485,8 @@ public:
 void testCondFormatUpdateDeleteTab();
 void testCondFormatUpdateInsertTab();
 void testCondFormatUpdateReference();
+void testCondFormatUpdateReferenceDelRow();
+void testCondFormatUpdateReferenceInsRow();
 
 void testCondFormatEndsWithStr();
 void testCondFormatEndsWithVal();
@@ -745,6 +747,8 @@ public:
 CPPUNIT_TEST(testCondCopyPasteSheet);
 CPPUNIT_TEST(testCondFormatEndsWithStr);
 CPPUNIT_TEST(testCondFormatEndsWithVal);
+CPPUNIT_TEST(testCondFormatUpdateReferenceDelRow);
+CPPUNIT_TEST(testCondFormatUpdateReferenceInsRow);
 CPPUNIT_TEST(testIconSet);
 CPPUNIT_TEST(testDataBarLengthAutomaticAxis);
 CPPUNIT_TEST(testDataBarLengthMiddleAxis);
diff --git a/sc/qa/unit/ucalc_condformat.cxx b/sc/qa/unit/ucalc_condformat.cxx
index 47230e100aac..ee0d8abee066 100644
--- a/sc/qa/unit/ucalc_condformat.cxx
+++ b/sc/qa/unit/ucalc_condformat.cxx
@@ -875,4 +875,44 @@ void Test::testCondFormatUpdateReference()
 m_pDoc->DeleteTab(0);
 }
 
+void Test::testCondFormatUpdateReferenceDelRow()
+{
+m_pDoc->InsertTab(0, "test");
+
+ScConditionEntry* pEntry = new ScConditionEntry(SC_COND_EQUAL, "B6", "", 
m_pDoc, ScAddress(0, 5, 0), "", "", formula::FormulaGrammar::GRAM_DEFAULT, 
formula::FormulaGrammar::GRAM_DEFAULT);
+
+ScConditionalFormat* pFormat = new ScConditionalFormat(0, m_pDoc);
+pFormat->SetRange(ScRange(0, 5, 0, 0, 5, 0));
+m_pDoc->AddCondFormat(pFormat, 0);
+
+pFormat->AddEntry(pEntry);
+
+m_pDoc->DeleteRow(0, 0, MAXCOL, 0, 4, 1);
+
+OUString aStr = pEntry->GetExpression(ScAddress(0, 4, 0), 0);
+CPPUNIT_ASSERT_EQUAL(OUString("B5"), aStr);
+
+m_pDoc->DeleteTab(0);
+}
+
+void Test::testCondFormatUpdateReferenceInsRow()
+{
+m_pDoc->InsertTab(0, "test");
+
+ScConditionEntry* pEntry = new ScConditionEntry(SC_COND_EQUAL, "B6", "", 
m_pDoc, ScAddress(0, 5, 0), "", "", formula::FormulaGrammar::GRAM_DEFAULT, 
formula::FormulaGrammar::GRAM_DEFAULT);
+
+ScConditionalFormat* pFormat = new ScConditionalFormat(0, m_pDoc);
+pFormat->SetRange(ScRange(0, 5, 0, 0, 5, 0));
+m_pDoc->AddCondFormat(pFormat, 0);
+
+pFormat->AddEntry(pEntry);
+
+m_pDoc->InsertRow(0, 0, MAXCOL, 0, 4, 1);
+
+OUString aStr = pEntry->GetExpression(ScAddress(0, 6, 0), 0);
+CPPUNIT_ASSERT_EQUAL(OUString("B7"), aStr);
+
+m_pDoc->DeleteTab(0);
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 3f0f35c89f3f64fcb110483fd562a59f729dc344
Author: Markus Mohrhard 
Date:   Thu Mar 16 20:08:30 2017 +0100

the range should be updated after the references, tdf#104026

Change-Id: I2cb674b8b3bc64df031b473b337d266a2eaab43d
Reviewed-on: https://gerrit.libreoffice.org/35289
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index 6657dcf37608..f4f0f116ba61 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -1926,13 +1926,13 @@ void ScConditionalFormat::CompileXML()
 
 void ScConditionalFormat::UpdateReference( sc::RefUpdateContext& rCxt, bool 
bCopyAsMove )
 {
+for(CondFormatContainer::iterator itr = maEntries.begin(); itr != 
maEntries.end(); ++itr)
+(*itr)->UpdateReference(rCxt);
+
 if (rCxt.meMode == URM_COPY && bCopyAsMove)
 maRanges.UpdateReference(URM_MOVE, pDoc, rCxt.maRange, 
rCxt.mnColDelta, rCxt.mnRowDelta, rCxt.mnTabDelta);
 else
 maRanges.UpdateReference(rCxt.meMode, pDoc, rCxt.maRange, 
rCxt.mnColDelta, rCxt.mnRowDelta, rCxt.mnTabDelta);
-
-for(CondFormatContainer::iterator itr = maEntries.begin(); itr != 
maEntries.end(); ++itr)
-(*itr)->UpdateReference(rCxt);
 }
 
 void ScConditionalFormat::InsertRow(SCTAB nTab, SCCOL nColStart, SCCOL 
nColEnd, SCROW nRowPos, SCSIZE nSize)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-09 Thread Eike Rathke
 sc/qa/unit/ucalc.cxx   |   15 +++
 sc/source/core/data/postit.cxx |4 +++-
 2 files changed, 18 insertions(+), 1 deletion(-)

New commits:
commit da3d56b077ce81f6f399a68f53895590dbb1357f
Author: Eike Rathke 
Date:   Thu Mar 9 23:15:42 2017 +0100

finally turn this into a hard assert

Change-Id: Iba6abafeaa2542fc94b76a642ddb0eb5b70b572d

diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index c01b6d7..3addea4 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -959,7 +959,9 @@ void ScPostIt::UpdateCaptionPos( const ScAddress& rPos )
 
 void ScPostIt::CreateCaptionFromInitData( const ScAddress& rPos ) const
 {
-OSL_ENSURE( maNoteData.mxCaption || maNoteData.mxInitData.get(), 
"ScPostIt::CreateCaptionFromInitData - need caption object or initial caption 
data" );
+// Captions are not created in Undo documents and only rarely in Clipboard,
+// but otherwise we need caption or initial data.
+assert((maNoteData.mxCaption || maNoteData.mxInitData.get()) || 
mrDoc.IsUndo() || mrDoc.IsClipboard());
 if( maNoteData.mxInitData.get() )
 {
 /*  This function is called from ScPostIt::Clone() when copying cells
commit 96175e7ed24fc007f88c418f8d449b6bd07563ad
Author: Eike Rathke 
Date:   Thu Mar 9 22:38:57 2017 +0100

it's raining drawing layers

Change-Id: Ieee5cb5792535185ef09c3775072ed739fb0e4b0

diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index dcb9a90..40a2801 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -776,6 +776,9 @@ void Test::testCopyToDocument()
 {
 CPPUNIT_ASSERT_MESSAGE ("failed to insert sheet", m_pDoc->InsertTab (0, 
"src"));
 
+// We need a drawing layer in order to create caption objects.
+m_pDoc->InitDrawLayer(());
+
 m_pDoc->SetString(0, 0, 0, "Header");
 m_pDoc->SetString(0, 1, 0, "1");
 m_pDoc->SetString(0, 2, 0, "2");
@@ -1986,6 +1989,9 @@ void Test::testSheetCopy()
 CPPUNIT_ASSERT_EQUAL_MESSAGE("document should have one sheet to begin 
with.",
static_cast(1), m_pDoc->GetTableCount());
 
+// We need a drawing layer in order to create caption objects.
+m_pDoc->InitDrawLayer(());
+
 // Insert text in A1.
 m_pDoc->SetString(ScAddress(0,0,0), "copy me");
 
@@ -5247,6 +5253,9 @@ void Test::testNoteDeleteCol()
 ScDocument& rDoc = getDocShell().GetDocument();
 rDoc.InsertTab(0, "Sheet1");
 
+// We need a drawing layer in order to create caption objects.
+m_pDoc->InitDrawLayer(());
+
 ScAddress rAddr(1, 1, 0);
 ScPostIt* pNote = m_pDoc->GetOrCreateNote(rAddr);
 pNote->SetText(rAddr, "Hello");
@@ -5471,6 +5480,9 @@ void Test::testAreasWithNotes()
 ScDocument& rDoc = getDocShell().GetDocument();
 rDoc.InsertTab(0, "Sheet1");
 
+// We need a drawing layer in order to create caption objects.
+m_pDoc->InitDrawLayer(());
+
 ScAddress rAddr(1, 5, 0);
 ScPostIt* pNote = m_pDoc->GetOrCreateNote(rAddr);
 pNote->SetText(rAddr, "Hello");
@@ -6270,6 +6282,9 @@ void Test::testSetStringAndNote()
 {
 m_pDoc->InsertTab(0, "Test");
 
+// We need a drawing layer in order to create caption objects.
+m_pDoc->InitDrawLayer(());
+
 //note on A1
 ScAddress aAdrA1 (0, 0, 0);
 ScPostIt* pNote = m_pDoc->GetOrCreateNote(aAdrA1);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-02-19 Thread Jochen Nitschke
 sc/qa/unit/ucalc_pivottable.cxx   |4 
++--
 xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx |4 
++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 696479aafa6c43daf95c39755f8ce6b772b3938e
Author: Jochen Nitschke 
Date:   Sun Feb 19 22:44:02 2017 +0100

cppcheck: redundantAssignment

Change-Id: I4537ced9dafb5b20dbf8cfb7d335698536067c49
Reviewed-on: https://gerrit.libreoffice.org/34436
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git 
a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx 
b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
index 710191c..14fb71d 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
@@ -808,13 +808,13 @@ sal_Int32 
SecurityEnvironment_MSCryptImpl::verifyCertificate(
 sal_Int32 validity = 0;
 PCCERT_CHAIN_CONTEXT pChainContext = nullptr;
 PCCERT_CONTEXT pCertContext = nullptr;
-const X509Certificate_MSCryptImpl* xcert = nullptr;
 
 Reference< XUnoTunnel > xCertTunnel( aCert, UNO_QUERY_THROW ) ;
 
 SAL_INFO("xmlsecurity.xmlsec", "Start verification of certificate: " << 
aCert->getSubjectName());
 
-xcert = 
reinterpret_cast(xCertTunnel->getSomething( 
X509Certificate_MSCryptImpl::getUnoTunnelId() ));
+auto xcert = reinterpret_cast
+(xCertTunnel->getSomething( 
X509Certificate_MSCryptImpl::getUnoTunnelId() ));
 if( xcert == nullptr ) {
 throw RuntimeException() ;
 }
commit f173262024391af6cbeac180f8628d0022a22426
Author: Jochen Nitschke 
Date:   Sun Feb 19 22:40:57 2017 +0100

cppcheck: redundantAssignment and unreadVariable

Change-Id: I19e8aef9149154967a5a1ba32e3d8e0a918adeaf
Reviewed-on: https://gerrit.libreoffice.org/34437
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/sc/qa/unit/ucalc_pivottable.cxx b/sc/qa/unit/ucalc_pivottable.cxx
index 2c2cfb5..b2ca97a 100644
--- a/sc/qa/unit/ucalc_pivottable.cxx
+++ b/sc/qa/unit/ucalc_pivottable.cxx
@@ -2430,7 +2430,6 @@ void Test::testPivotTableDPCollection()
 ScRange aDataRange(nCol1, nRow1, 0, nCol2, nRow2, 0);
 
 ScDPCollection* pDPs = m_pDoc->GetDPCollection();
-bool bSuccess = false;
 
 // Check at the beginning
 CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be no DP table", size_t(0), 
pDPs->GetCount());
@@ -2442,7 +2441,7 @@ void Test::testPivotTableDPCollection()
 
 // Add 2 DP objects
 ScDPObject* pDPObj = createDPFromRange(m_pDoc, aDataRange , aFields, 
nFieldCount, false);
-bSuccess = pDPs->InsertNewTable(pDPObj);
+bool bSuccess = pDPs->InsertNewTable(pDPObj);
 CPPUNIT_ASSERT_MESSAGE("failed to insert a new DP object into document", 
bSuccess);
 pDPObj->SetName("DP1"); // set custom name
 
@@ -2563,6 +2562,7 @@ void Test::testPivotTableMedianFunc()
 }
 
 bSuccess = aFunc.RemovePivotTable(*pDPObject, false, true);
+CPPUNIT_ASSERT_MESSAGE("Failed to remove pivot table object.", bSuccess);
 
 m_pDoc->DeleteTab(1);
 m_pDoc->DeleteTab(0);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-02-13 Thread Justin Luth
 sc/qa/unit/data/xlsx/tdf105840_allRowsHidden.xlsx |binary
 sc/qa/unit/subsequent_export-test.cxx |   14 +++
 sc/source/filter/excel/xetable.cxx|   26 ++
 sc/source/filter/inc/xetable.hxx  |2 +
 4 files changed, 33 insertions(+), 9 deletions(-)

New commits:
commit 1cde2eb9d128c9b1b658b1380074461429ab2214
Author: Justin Luth 
Date:   Fri Feb 10 12:44:47 2017 +0300

tdf#105840 EXCEL export: fixes for hidden defaultRow

second attempt at fixing hidden rows without creating
a million repeated rows. (related to tdf#98106)
This affects both .xls and .xlsx.  XLSX previously had
NO support for default-hidden(zeroHeight), but XLS already did.

Change-Id: I804e3f2ba21e595a1c2b2ebb355f0995868dd289
Reviewed-on: https://gerrit.libreoffice.org/34128
Tested-by: Jenkins 
Reviewed-by: Bartosz Kosiorek 

diff --git a/sc/qa/unit/data/xlsx/tdf105840_allRowsHidden.xlsx 
b/sc/qa/unit/data/xlsx/tdf105840_allRowsHidden.xlsx
new file mode 100644
index 000..e2c22cd
Binary files /dev/null and b/sc/qa/unit/data/xlsx/tdf105840_allRowsHidden.xlsx 
differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx 
b/sc/qa/unit/subsequent_export-test.cxx
index 6413db8..fbb16cd 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -116,6 +116,7 @@ public:
 void testColumnWidthExportFromODStoXLSX();
 void testOutlineExportXLSX();
 void testHiddenEmptyRowsXLSX();
+void testAllRowsHiddenXLSX();
 void testLandscapeOrientationXLSX();
 
 void testInlineArrayXLS();
@@ -217,6 +218,7 @@ public:
 CPPUNIT_TEST(testColumnWidthExportFromODStoXLSX);
 CPPUNIT_TEST(testOutlineExportXLSX);
 CPPUNIT_TEST(testHiddenEmptyRowsXLSX);
+CPPUNIT_TEST(testAllRowsHiddenXLSX);
 CPPUNIT_TEST(testLandscapeOrientationXLSX);
 CPPUNIT_TEST(testInlineArrayXLS);
 CPPUNIT_TEST(testEmbeddedChartXLS);
@@ -891,6 +893,17 @@ void ScExportTest::testOutlineExportXLSX()
 assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row", 30);
 }
 
+void ScExportTest::testAllRowsHiddenXLSX()
+{
+ScDocShellRef xOrigDocSh = loadDoc("tdf105840_allRowsHidden.", 
FORMAT_XLSX);
+CPPUNIT_ASSERT(xOrigDocSh.is());
+
+std::shared_ptr pXPathFile = 
ScBootstrapFixture::exportTo(&(*xOrigDocSh), FORMAT_XLSX);
+xmlDocPtr pSheet = XPathHelper::parseExport(pXPathFile, m_xSFactory, 
"xl/worksheets/sheet1.xml");
+CPPUNIT_ASSERT(pSheet);
+assertXPath(pSheet, "/x:worksheet/x:sheetFormatPr", "zeroHeight", "true" );
+assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row", 0);
+}
 
 void ScExportTest::testHiddenEmptyRowsXLSX()
 {
@@ -902,6 +915,7 @@ void ScExportTest::testHiddenEmptyRowsXLSX()
 xmlDocPtr pSheet = XPathHelper::parseExport(pXPathFile, m_xSFactory, 
"xl/worksheets/sheet1.xml");
 CPPUNIT_ASSERT(pSheet);
 
+assertXPath(pSheet, "/x:worksheet/x:sheetFormatPr",  "zeroHeight", "false" 
);
 assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[1]", "hidden", "true");
 assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[2]", "hidden", "true");
 assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[3]", "hidden", "true");
diff --git a/sc/source/filter/excel/xetable.cxx 
b/sc/source/filter/excel/xetable.cxx
index ee16f16..9ec23a1 100644
--- a/sc/source/filter/excel/xetable.cxx
+++ b/sc/source/filter/excel/xetable.cxx
@@ -2047,7 +2047,7 @@ sal_uInt16 XclExpRow::GetFirstFreeXclCol() const
 
 bool XclExpRow::IsDefaultable() const
 {
-const sal_uInt16 nFlagsAlwaysMarkedAsDefault = EXC_ROW_DEFAULTFLAGS | 
EXC_ROW_UNSYNCED;
+const sal_uInt16 nFlagsAlwaysMarkedAsDefault = EXC_ROW_DEFAULTFLAGS | 
EXC_ROW_HIDDEN | EXC_ROW_UNSYNCED;
 return !::get_flag( mnFlags, static_cast< sal_uInt16 >( 
~nFlagsAlwaysMarkedAsDefault ) ) &&
IsEmpty();
 }
@@ -2056,6 +2056,7 @@ void XclExpRow::DisableIfDefault( const 
XclExpDefaultRowData& rDefRowData )
 {
 mbEnabled = !IsDefaultable() ||
 (mnHeight != rDefRowData.mnHeight) ||
+(IsHidden() != rDefRowData.IsHidden()) ||
 (IsUnsynced() != rDefRowData.IsUnsynced());
 }
 
@@ -2275,12 +2276,15 @@ void XclExpRowBuffer::Finalize( XclExpDefaultRowData& 
rDefRowData, const ScfUInt
 // return the default row format to caller
 rDefRowData = aMaxDefData;
 
-// now disable repeating extra (empty) rows that are equal to
-// default row height
+// now disable repeating extra (empty) rows that are equal to the default 
row
 for ( XclRepeatedRows::iterator it = aRepeated.begin(), it_end = 
aRepeated.end(); it != it_end; ++it)
 {
-if ( (*it)->GetXclRowRpt() > 1 && (*it)->GetHeight() == 
rDefRowData.mnHeight )
+if ( (*it)->GetXclRowRpt() > 1
+ && (*it)->GetHeight() == rDefRowData.mnHeight
+ && (*it)->IsHidden() == rDefRowData.IsHidden() )
+{
 

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

2017-02-13 Thread Zdeněk Crhonek
 sc/qa/unit/data/functions/mathematical/fods/rawsubtract.fods | 4776 +
 sc/qa/unit/data/functions/statistical/fods/t.inv.2t.fods | 5355 +++
 2 files changed, 10131 insertions(+)

New commits:
commit d9b6edc0981c3f064d580df53e35dec11809afc5
Author: Zdeněk Crhonek 
Date:   Mon Feb 13 18:34:40 2017 +0100

add RAWSUBTRACT test case

Change-Id: I338823f626d16dbc435a7b7efe0e5f1e30bf3497
Reviewed-on: https://gerrit.libreoffice.org/34221
Tested-by: Jenkins 
Reviewed-by: Zdenek Crhonek 

diff --git a/sc/qa/unit/data/functions/mathematical/fods/rawsubtract.fods 
b/sc/qa/unit/data/functions/mathematical/fods/rawsubtract.fods
new file mode 100644
index 000..588c8f1
--- /dev/null
+++ b/sc/qa/unit/data/functions/mathematical/fods/rawsubtract.fods
@@ -0,0 +1,4776 @@
+
+
+http://www.w3.org/1999/xlink; 
xmlns:dc="http://purl.org/dc/elements/1.1/; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:scr
 ipt="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office; 
xmlns:ooow="http://openoffice.org/2004/writer; 
xmlns:oooc="http://openoffice.org/2004/calc; 
xmlns:dom="http://www.w3.org/2001/xml-events; 
xmlns:xforms="http://www.w3.org/2002/xforms; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xmlns:rpt="http://openoffice.org/2005/report; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#; 
xmlns:tableooo="http://openoffice.org/2009/table; 
xmlns:drawooo="http://openoffice.org/2010/draw; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:form
 x="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
+ 
2017-02-13T17:55:32.263157328P0D1LibreOfficeDev/5.4.0.0.alpha0$Linux_X86_64
 
LibreOffice_project/2aea0d0148ea0940da2b32387c330f9aa590294c
+ 
+  
+   0
+   0
+   42024
+   6896
+   
+
+ view1
+ 
+  
+   2
+   8
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   100
+   60
+   true
+   false
+  
+  
+   2
+   12
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   100
+   60
+   true
+   false
+  
+ 
+ Sheet2
+ 1241
+ 0
+ 100
+ 60
+ false
+ true
+ true
+ true
+ 12632256
+ true
+ true
+ true
+ true
+ true
+ false
+ false
+ 1270
+ 1270
+ 1
+ 1
+ true
+ false
+
+   
+  
+  
+   7
+   false
+   false
+   true
+   true
+   false
+   false
+   false
+   1270
+   1270
+   true
+   true
+   true
+   true
+   true
+   false
+   12632256
+   false
+   Lexmark-E352dn
+   
+
+ cs
+ CZ
+ 
+ 
+ 
+
+
+ de
+ DE
+ 
+ 
+ 
+
+
+ en
+ US
+ 
+ 
+ 
+
+
+ nl
+ NL
+ 
+ 
+ 
+
+   
+   true
+   true
+   3
+   1
+   true
+   1
+   true
+   sgH+/0xleG1hcmstRTM1MmRuQ1VQUzpMZXhtYXJrLUUzNTJkbgAWAAMA0wAIAFZUAAAkbQAASm9iRGF0YSAxCnByaW50ZXI9TGV4bWFyay1FMzUyZG4Kb3JpZW50YXRpb249UG9ydHJhaXQKY29waWVzPTEKY29sbGF0ZT1mYWxzZQptYXJnaW5kYWp1c3RtZW50PTAsMCwwLDAKY29sb3JkZXB0aD0yNApwc2xldmVsPTAKcGRmZGV2aWNlPTEKY29sb3JkZXZpY2U9MApQUERDb250ZXhEYXRhCkR1cGxleDpOb25lAElucHV0U2xvdDpUcmF5MQBQYWdlU2l6ZTpMZXR0ZXIAABIAQ09NUEFUX0RVUExFWF9NT0RFDwBEdXBsZXhNb2RlOjpPZmY=
+   false
+   0
+  
+ 
+ 
+  
+   http://openoffice.org/2004/office; 
xmlns:xlink="http://www.w3.org/1999/xlink;>
+
+   
+  
+ 
+ 
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+ 
+ 
+  
+   
+   
+  
+  
+   
+  
+  
+   
+  
+  
+   
+
+   Kč
+  
+  
+   
+   -
+   
+
+   Kč
+   
+  
+  
+
+   
+
+  
+  
+
+   (
+   
+   )
+  
+  
+
+   -

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

2017-02-09 Thread Eike Rathke
 sc/qa/unit/ucalc_formula.cxx  |3 ++-
 sc/source/core/tool/token.cxx |7 ++-
 2 files changed, 8 insertions(+), 2 deletions(-)

New commits:
commit 1e02bf3ceb747c8491b6489bef56dd4a896269b1
Author: Eike Rathke 
Date:   Thu Feb 9 18:54:50 2017 +0100

and more unit tests for tdf#103890

Change-Id: I342b11cb1442ff5ad4a51d8b8f2f7ed9f081bcaa

diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index ceba828..cec64f1 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -3349,7 +3349,8 @@ void Test::testTokenArrayRefUpdateMove()
 std::vector aTests = {
 "B1*C1",
 "SUM(B1:C1)",
-"$Sheet1.B1"
+"$Sheet1.B1",
+"SUM(Sheet1.B1:Sheet2.B1)"
 };
 
 // Since C3 is not referenced in any of the above formulas, moving C3 from
commit aeb465a458fc7ba02e3b1ca6b4193488defef511
Author: Eike Rathke 
Date:   Thu Feb 9 18:54:15 2017 +0100

yet more 3D flag to preserve cases, tdf#103890 follow-up

Change-Id: I8b8cdb01325d0cd54e436c1043c243eedfddbfb0

diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 02f8a04..dcbde70 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -3167,7 +3167,12 @@ sc::RefUpdateResult ScTokenArray::AdjustReferenceOnMove(
 }
 
 rRef.SetRange(aAbs, rNewPos);
-rRef.Ref1.SetFlag3D(aAbs.aStart.Tab() != rNewPos.Tab() 
|| !rRef.Ref1.IsTabRel());
+// Absolute sheet reference => set 3D flag.
+// More than one sheet referenced => has to have both 
3D flags.
+// If end part has 3D flag => start part must have it 
too.
+rRef.Ref2.SetFlag3D(aAbs.aStart.Tab() != 
aAbs.aEnd.Tab() || !rRef.Ref2.IsTabRel());
+rRef.Ref1.SetFlag3D(aAbs.aStart.Tab() != rNewPos.Tab() 
|| !rRef.Ref1.IsTabRel() ||
+rRef.Ref2.IsFlag3D());
 }
 break;
 case svExternalSingleRef:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-02-08 Thread Zdeněk Crhonek
 sc/qa/unit/data/functions/addin/fods/imcot.fods  | 6070 +++
 sc/qa/unit/data/functions/addin/fods/imlog2.fods | 6040 ++
 2 files changed, 12110 insertions(+)

New commits:
commit d8a3a0e5d858abf0ac81fef2e47c63e4367567cc
Author: Zdeněk Crhonek 
Date:   Sun Feb 5 11:55:42 2017 +0100

add IMLOG2 test case

Change-Id: Ic313ce3807c9b16563cc3421a84d1d28dab54670
Reviewed-on: https://gerrit.libreoffice.org/33928
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/qa/unit/data/functions/addin/fods/imlog2.fods 
b/sc/qa/unit/data/functions/addin/fods/imlog2.fods
new file mode 100644
index 000..b3a5961
--- /dev/null
+++ b/sc/qa/unit/data/functions/addin/fods/imlog2.fods
@@ -0,0 +1,6040 @@
+
+
+http://www.w3.org/1999/xlink; 
xmlns:dc="http://purl.org/dc/elements/1.1/; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:scr
 ipt="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office; 
xmlns:ooow="http://openoffice.org/2004/writer; 
xmlns:oooc="http://openoffice.org/2004/calc; 
xmlns:dom="http://www.w3.org/2001/xml-events; 
xmlns:xforms="http://www.w3.org/2002/xforms; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xmlns:rpt="http://openoffice.org/2005/report; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#; 
xmlns:tableooo="http://openoffice.org/2009/table; 
xmlns:drawooo="http://openoffice.org/2010/draw; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:form
 x="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
+ 
2016-12-29T18:23:56.52200P0D1LibreOfficeDev/5.4.0.0.alpha0$Linux_X86_64
 
LibreOffice_project/326729ce54de5296cb2a673ae88d2befa3e245ef
+ 
+  
+   0
+   0
+   78015
+   359233
+   
+
+ view1
+ 
+  
+   2
+   8
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   75
+   60
+   true
+   false
+  
+  
+   5
+   1
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   75
+   60
+   true
+   false
+  
+ 
+ Sheet2
+ 1241
+ 0
+ 75
+ 60
+ false
+ true
+ true
+ true
+ 12632256
+ true
+ true
+ true
+ true
+ true
+ false
+ false
+ 1270
+ 1270
+ 1
+ 1
+ true
+ false
+
+   
+  
+  
+   7
+   false
+   false
+   true
+   true
+   false
+   false
+   false
+   1270
+   1270
+   true
+   true
+   true
+   true
+   true
+   false
+   12632256
+   false
+   Lexmark-E352dn
+   
+
+ cs
+ CZ
+ 
+ 
+ 
+
+
+ de
+ DE
+ 
+ 
+ 
+
+
+ en
+ US
+ 
+ 
+ 
+
+
+ nl
+ NL
+ 
+ 
+ 
+
+   
+   true
+   true
+   3
+   1
+   true
+   1
+   true
+   sgH+/0xleG1hcmstRTM1MmRuQ1VQUzpMZXhtYXJrLUUzNTJkbgAWAAMA0wAIAFZUAAAkbQAASm9iRGF0YSAxCnByaW50ZXI9TGV4bWFyay1FMzUyZG4Kb3JpZW50YXRpb249UG9ydHJhaXQKY29waWVzPTEKY29sbGF0ZT1mYWxzZQptYXJnaW5kYWp1c3RtZW50PTAsMCwwLDAKY29sb3JkZXB0aD0yNApwc2xldmVsPTAKcGRmZGV2aWNlPTEKY29sb3JkZXZpY2U9MApQUERDb250ZXhEYXRhClBhZ2VTaXplOkxldHRlcgBJbnB1dFNsb3Q6VHJheTEARHVwbGV4Ok5vbmUAABIAQ09NUEFUX0RVUExFWF9NT0RFDwBEdXBsZXhNb2RlOjpPZmY=
+   false
+   0
+  
+ 
+ 
+  
+   http://openoffice.org/2004/office; 
xmlns:xlink="http://www.w3.org/1999/xlink;>
+
+   
+  
+ 
+ 
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+ 
+ 
+  
+   
+   
+  
+  
+   
+  
+  
+   
+  
+  
+   
+
+   Kč
+  
+  
+   
+   -
+   
+
+   Kč
+   
+  
+  
+
+   
+
+  
+  
+
+   (
+   
+   )
+  
+  
+
+   -
+   
+
+  
+  
+   
+
+   
+  

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

2017-01-07 Thread Zdeněk Crhonek
 sc/qa/unit/data/functions/statistical/fods/skew.fods  | 6880 
 sc/qa/unit/data/functions/statistical/fods/slope.fods | 7286 ++
 2 files changed, 14166 insertions(+)

New commits:
commit 97d6e58fd8cceed862eb93f9c8195316cf0d04e3
Author: Zdeněk Crhonek 
Date:   Sat Jan 7 09:23:25 2017 +0100

add SLOPE test case

Change-Id: Icc592273d980c62e666a4c3b4e829d2bc35016cc
Reviewed-on: https://gerrit.libreoffice.org/32812
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/qa/unit/data/functions/statistical/fods/slope.fods 
b/sc/qa/unit/data/functions/statistical/fods/slope.fods
new file mode 100644
index 000..672be8f
--- /dev/null
+++ b/sc/qa/unit/data/functions/statistical/fods/slope.fods
@@ -0,0 +1,7286 @@
+
+
+http://www.w3.org/1999/xlink; 
xmlns:dc="http://purl.org/dc/elements/1.1/; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:scr
 ipt="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office; 
xmlns:ooow="http://openoffice.org/2004/writer; 
xmlns:oooc="http://openoffice.org/2004/calc; 
xmlns:dom="http://www.w3.org/2001/xml-events; 
xmlns:xforms="http://www.w3.org/2002/xforms; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xmlns:rpt="http://openoffice.org/2005/report; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#; 
xmlns:tableooo="http://openoffice.org/2009/table; 
xmlns:drawooo="http://openoffice.org/2010/draw; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:form
 x="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
+ 
2016-12-29T18:23:56.52200P0D1LibreOfficeDev/5.4.0.0.alpha0$Linux_X86_64
 
LibreOffice_project/92a1ad1f36b6d3cc13135a8c0805508933011577
+ 
+  
+   0
+   0
+   82301
+   56504
+   
+
+ view1
+ 
+  
+   2
+   8
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   100
+   60
+   true
+   false
+  
+  
+   0
+   7
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   100
+   60
+   true
+   false
+  
+ 
+ Sheet2
+ 1241
+ 0
+ 100
+ 60
+ false
+ true
+ true
+ true
+ 12632256
+ true
+ true
+ true
+ true
+ true
+ false
+ false
+ 1270
+ 1270
+ 1
+ 1
+ true
+ false
+
+   
+  
+  
+   7
+   false
+   false
+   true
+   true
+   false
+   false
+   false
+   1270
+   1270
+   true
+   true
+   true
+   true
+   true
+   false
+   12632256
+   false
+   Lexmark-E352dn
+   
+
+ cs
+ CZ
+ 
+ 
+ 
+
+
+ de
+ DE
+ 
+ 
+ 
+
+
+ en
+ US
+ 
+ 
+ 
+
+
+ nl
+ NL
+ 
+ 
+ 
+
+   
+   true
+   true
+   3
+   1
+   true
+   1
+   true
+   lgH+/0xleG1hcmstRTM1MmRuQ1VQUzpMZXhtYXJrLUUzNTJkbgAWAAMAtwAIAFZUAAAkbQAASm9iRGF0YSAxCnByaW50ZXI9TGV4bWFyay1FMzUyZG4Kb3JpZW50YXRpb249UG9ydHJhaXQKY29waWVzPTEKY29sbGF0ZT1mYWxzZQptYXJnaW5kYWp1c3RtZW50PTAsMCwwLDAKY29sb3JkZXB0aD0yNApwc2xldmVsPTAKcGRmZGV2aWNlPTEKY29sb3JkZXZpY2U9MApQUERDb250ZXhEYXRhClBhZ2VTaXplOkxldHRlcgAAEgBDT01QQVRfRFVQTEVYX01PREUPAER1cGxleE1vZGU6Ok9mZg==
+   false
+   0
+  
+ 
+ 
+  
+   http://openoffice.org/2004/office; 
xmlns:xlink="http://www.w3.org/1999/xlink;>
+
+   
+  
+ 
+ 
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+ 
+ 
+  
+   
+   
+  
+  
+   
+  
+  
+   
+  
+  
+   
+
+   Kč
+  
+  
+   
+   -
+   
+
+   Kč
+   
+  
+  
+
+   
+
+  
+  
+
+   (
+   
+   )
+  
+  
+
+   -
+   
+
+  
+  
+   
+
+   
+   
+   
+  
+  
+   
+  

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

2017-01-02 Thread Zdeněk Crhonek
 sc/qa/unit/data/functions/statistical/fods/phi.fods  | 4692 +++
 sc/qa/unit/data/functions/statistical/fods/prob.fods | 4499 ++
 2 files changed, 9191 insertions(+)

New commits:
commit a53cd3c0b3d2c2e10beb76a0829205eb86a3a0d1
Author: Zdeněk Crhonek 
Date:   Sat Dec 31 17:44:41 2016 +0100

add PHI test case

Change-Id: I23afaf7381a8619c4224a55e368ede1973ba457a
Reviewed-on: https://gerrit.libreoffice.org/32541
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/qa/unit/data/functions/statistical/fods/phi.fods 
b/sc/qa/unit/data/functions/statistical/fods/phi.fods
new file mode 100644
index 000..7794cdb
--- /dev/null
+++ b/sc/qa/unit/data/functions/statistical/fods/phi.fods
@@ -0,0 +1,4692 @@
+
+
+http://www.w3.org/1999/xlink; 
xmlns:dc="http://purl.org/dc/elements/1.1/; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:scr
 ipt="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office; 
xmlns:ooow="http://openoffice.org/2004/writer; 
xmlns:oooc="http://openoffice.org/2004/calc; 
xmlns:dom="http://www.w3.org/2001/xml-events; 
xmlns:xforms="http://www.w3.org/2002/xforms; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xmlns:rpt="http://openoffice.org/2005/report; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#; 
xmlns:tableooo="http://openoffice.org/2009/table; 
xmlns:drawooo="http://openoffice.org/2010/draw; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:form
 x="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
+ 
2016-12-31T17:21:23.214030677P0D1LibreOfficeDev/5.4.0.0.alpha0$Linux_X86_64
 
LibreOffice_project/a7c51323b7343f82b5aea6098f5d5e31a8bad0e9
+ 
+  
+   0
+   0
+   31557
+   18591
+   
+
+ view1
+ 
+  
+   2
+   8
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   100
+   60
+   true
+   false
+  
+  
+   4
+   6
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   100
+   60
+   true
+   false
+  
+ 
+ Sheet2
+ 1241
+ 0
+ 100
+ 60
+ false
+ true
+ true
+ true
+ 12632256
+ true
+ true
+ true
+ true
+ true
+ false
+ false
+ 1270
+ 1270
+ 1
+ 1
+ true
+ false
+
+   
+  
+  
+   7
+   false
+   false
+   true
+   true
+   false
+   false
+   false
+   1270
+   1270
+   true
+   true
+   true
+   true
+   true
+   false
+   12632256
+   false
+   Lexmark-E352dn
+   
+
+ cs
+ CZ
+ 
+ 
+ 
+
+
+ de
+ DE
+ 
+ 
+ 
+
+
+ en
+ US
+ 
+ 
+ 
+
+
+ nl
+ NL
+ 
+ 
+ 
+
+   
+   true
+   true
+   3
+   1
+   true
+   1
+   true
+   sgH+/0xleG1hcmstRTM1MmRuQ1VQUzpMZXhtYXJrLUUzNTJkbgAWAAMA0wAIAFZUAAAkbQAASm9iRGF0YSAxCnByaW50ZXI9TGV4bWFyay1FMzUyZG4Kb3JpZW50YXRpb249UG9ydHJhaXQKY29waWVzPTEKY29sbGF0ZT1mYWxzZQptYXJnaW5kYWp1c3RtZW50PTAsMCwwLDAKY29sb3JkZXB0aD0yNApwc2xldmVsPTAKcGRmZGV2aWNlPTEKY29sb3JkZXZpY2U9MApQUERDb250ZXhEYXRhCkR1cGxleDpOb25lAElucHV0U2xvdDpUcmF5MQBQYWdlU2l6ZTpMZXR0ZXIAABIAQ09NUEFUX0RVUExFWF9NT0RFDwBEdXBsZXhNb2RlOjpPZmY=
+   false
+   0
+  
+ 
+ 
+  
+   http://openoffice.org/2004/office; 
xmlns:xlink="http://www.w3.org/1999/xlink;>
+
+   
+  
+ 
+ 
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+ 
+ 
+  
+   
+   
+  
+  
+   
+  
+  
+   
+  
+  
+   
+
+   Kč
+  
+  
+   
+   -
+   
+
+   Kč
+   
+  
+  
+
+   
+
+  
+  
+
+   (
+   
+   )
+  
+  
+
+   -
+   
+
+  
+  
+   
+
+   

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

2016-11-24 Thread Caolán McNamara
 sc/qa/unit/range.cxx  |   12 
 vcl/unx/gtk3/gtk3gtkframe.cxx |6 ++
 2 files changed, 10 insertions(+), 8 deletions(-)

New commits:
commit f9fee44d1b49d859f9ee6ab22cc34c758aac71f0
Author: Caolán McNamara 
Date:   Thu Nov 24 09:51:07 2016 +

can have gtk >= 3.10.0 with cairo < 1.14.0

I imagine that without cairo 1.14.0 there's no point scaling, so force 1
then.

Change-Id: I0e778ed5a57f9ede9f4b78369c470b23b94fe82f

diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 5acb139..645f800 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -1576,13 +1576,19 @@ void GtkSalFrame::AllocateFrame()
 cairo_surface_destroy(m_pSurface);
 
 #if GTK_CHECK_VERSION(3,10,0)
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 14, 0)
 int scale = getDisplay()->IsOwnHiDpiScale() ? 1 : 
gtk_widget_get_scale_factor(m_pWindow);
+#else
+int scale = 1;
+#endif
 m_pSurface = 
gdk_window_create_similar_image_surface(widget_get_window(m_pWindow),
  
CAIRO_FORMAT_ARGB32,
  aFrameSize.getX() 
* scale,
  aFrameSize.getY() 
* scale,
  scale);
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 14, 0)
 cairo_surface_set_device_scale(m_pSurface, scale, scale);
+#endif
 #else
 m_pSurface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32,
 aFrameSize.getX(),
commit c7f2115d774485a235b671c82302dbf38841e3c9
Author: Caolán McNamara 
Date:   Thu Nov 24 09:07:01 2016 +

coverity#1394669 Uninitialized pointer field

and

coverity#1394670 Uninitialized pointer field

Change-Id: I5869ff5dc19a994d33d44313becec1eb590e31f8

diff --git a/sc/qa/unit/range.cxx b/sc/qa/unit/range.cxx
index c1e4214..9684344 100644
--- a/sc/qa/unit/range.cxx
+++ b/sc/qa/unit/range.cxx
@@ -29,14 +29,14 @@ public:
 void testAddressParsing();
 
 private:
-ScDocument *m_pDoc;
 ScDocShellRef m_xDocShRef;
 };
 
 void ScAddressTest::testAddressParsing()
 {
 ScAddress aAddr;
-ScRefFlags nRes = aAddr.Parse("1", m_pDoc, 
formula::FormulaGrammar::CONV_OOO);
+ScDocument& rDoc = m_xDocShRef->GetDocument();
+ScRefFlags nRes = aAddr.Parse("1", , 
formula::FormulaGrammar::CONV_OOO);
 CPPUNIT_ASSERT_MESSAGE("Should fail to parse.", !(nRes & 
ScRefFlags::VALID));
 }
 
@@ -49,8 +49,6 @@ void ScAddressTest::setUp()
 SfxModelFlags::EMBEDDED_OBJECT |
 SfxModelFlags::DISABLE_EMBEDDED_SCRIPTS |
 SfxModelFlags::DISABLE_DOCUMENT_RECOVERY);
-
-m_pDoc = _xDocShRef->GetDocument();
 }
 
 void ScAddressTest::tearDown()
@@ -72,14 +70,14 @@ public:
 void testRangeParsing();
 
 private:
-ScDocument *m_pDoc;
 ScDocShellRef m_xDocShRef;
 };
 
 void ScRangeTest::testRangeParsing()
 {
 ScRange aRange;
-ScRefFlags nRes = aRange.Parse(":1", m_pDoc, 
formula::FormulaGrammar::CONV_OOO);
+ScDocument& rDoc = m_xDocShRef->GetDocument();
+ScRefFlags nRes = aRange.Parse(":1", , 
formula::FormulaGrammar::CONV_OOO);
 CPPUNIT_ASSERT_MESSAGE("Should fail to parse.", !(nRes & 
ScRefFlags::VALID));
 }
 
@@ -92,8 +90,6 @@ void ScRangeTest::setUp()
 SfxModelFlags::EMBEDDED_OBJECT |
 SfxModelFlags::DISABLE_EMBEDDED_SCRIPTS |
 SfxModelFlags::DISABLE_DOCUMENT_RECOVERY);
-
-m_pDoc = _xDocShRef->GetDocument();
 }
 
 void ScRangeTest::tearDown()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-11-23 Thread Zdeněk Crhonek
 sc/qa/unit/data/functions/fods/received.fods |  493 -
 sc/qa/unit/data/functions/fods/vdb.fods  | 1420 ++-
 2 files changed, 1245 insertions(+), 668 deletions(-)

New commits:
commit ca0b7ae19a06cc575c63c64d64fb59dfa91f44be
Author: Zdeněk Crhonek 
Date:   Sun Sep 18 13:30:35 2016 +0200

update RECEIVED test case (add test for bug tdf#101228)

Change-Id: Ic29c19df3c3e5a0624365656a725bb4ce4ed4bd3
Reviewed-on: https://gerrit.libreoffice.org/28990
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/qa/unit/data/functions/fods/received.fods 
b/sc/qa/unit/data/functions/fods/received.fods
index ae6764d..0073043 100644
--- a/sc/qa/unit/data/functions/fods/received.fods
+++ b/sc/qa/unit/data/functions/fods/received.fods
@@ -1,7 +1,7 @@
 
 
 http://www.w3.org/1999/xlink; 
xmlns:dc="http://purl.org/dc/elements/1.1/; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:scr
 ipt="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office; 
xmlns:ooow="http://openoffice.org/2004/writer; 
xmlns:oooc="http://openoffice.org/2004/calc; 
xmlns:dom="http://www.w3.org/2001/xml-events; 
xmlns:xforms="http://www.w3.org/2002/xforms; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xmlns:rpt="http://openoffice.org/2005/report; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#; 
xmlns:tableooo="http://openoffice.org/2009/table; 
xmlns:drawooo="http://openoffice.org/2010/draw; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:form
 x="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
- 
2016-07-18T18:53:36.155207394P0D1LibreOfficeDev/5.3.0.0.alpha0$Linux_X86_64
 
LibreOffice_project/a2c557d80ac68c06ea59586245a7431e061938f0
+ 
2016-07-18T18:53:36.155207394P0D1LibreOfficeDev/5.3.0.0.alpha0$Linux_X86_64
 
LibreOffice_project/7b660e1423554928350e1de2cd4cb7eb577a27ec
  
   
0
@@ -31,8 +31,8 @@
false
   
   
-   1
-   20
+   2
+   17
0
0
0
@@ -41,7 +41,7 @@
0
0
0
-   0
+   4
0
75
60
@@ -50,7 +50,7 @@
   
  
  Sheet2
- 1280
+ 1241
  0
  75
  60
@@ -125,7 +125,7 @@
true
1
true
-   kQH+/0xleG1hcmstRTM1MmRuQ1VQUzpMZXhtYXJrLUUzNTJkbgAWAAMAtwAIAFZUAAAkbQAASm9iRGF0YSAxCnByaW50ZXI9TGV4bWFyay1FMzUyZG4Kb3JpZW50YXRpb249UG9ydHJhaXQKY29waWVzPTEKY29sbGF0ZT1mYWxzZQptYXJnaW5kYWp1c3RtZW50PTAsMCwwLDAKY29sb3JkZXB0aD0yNApwc2xldmVsPTAKcGRmZGV2aWNlPTEKY29sb3JkZXZpY2U9MApQUERDb250ZXhEYXRhClBhZ2VTaXplOkxldHRlcgAAEgBDT01QQVRfRFVQTEVYX01PREUKAERVUExFWF9PRkY=
+   sgH+/0xleG1hcmstRTM1MmRuQ1VQUzpMZXhtYXJrLUUzNTJkbgAWAAMA0wAIAFZUAAAkbQAASm9iRGF0YSAxCnByaW50ZXI9TGV4bWFyay1FMzUyZG4Kb3JpZW50YXRpb249UG9ydHJhaXQKY29waWVzPTEKY29sbGF0ZT1mYWxzZQptYXJnaW5kYWp1c3RtZW50PTAsMCwwLDAKY29sb3JkZXB0aD0yNApwc2xldmVsPTAKcGRmZGV2aWNlPTEKY29sb3JkZXZpY2U9MApQUERDb250ZXhEYXRhClBhZ2VTaXplOkxldHRlcgBJbnB1dFNsb3Q6VHJheTEARHVwbGV4Ok5vbmUAABIAQ09NUEFUX0RVUExFWF9NT0RFDwBEdXBsZXhNb2RlOjpPZmY=
false
0
   
@@ -806,7 +806,7 @@

   
   
--
+   -


   
@@ -827,7 +827,7 @@
 € 
   
   
--
+   -

 € 
   
@@ -1216,7 +1216,7 @@
)
   
   
--
+   -

 
   
@@ -1974,38 +1974,41 @@
   
   

-   
+   
   
   

   
-  
-   
-   
-  
-  
+  

   
-  
+  


   
-  
-  
-  
+  
+  
+  





   
-  
+  





   
+  
+   
+   
+   
+   
+   
+  
   


@@ -2023,16 +2026,16 @@

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

2016-11-11 Thread Michael Meeks
 sc/qa/extras/sccellrangeobj.cxx  |   33 -
 sc/source/ui/unoobj/cellsuno.cxx |8 
 2 files changed, 40 insertions(+), 1 deletion(-)

New commits:
commit 99316fc0c830ae6c827d9b7f56bf057ff7731ed5
Author: Michael Meeks 
Date:   Thu Nov 10 19:11:07 2016 +

tdf#103632 - sc: OOB sort fields unit test.

Change-Id: I6734d51c8f9c4ca5a01c3e54a71f83ba15db508d
Reviewed-on: https://gerrit.libreoffice.org/30761
Tested-by: Jenkins 
Reviewed-by: Michael Meeks 

diff --git a/sc/qa/extras/sccellrangeobj.cxx b/sc/qa/extras/sccellrangeobj.cxx
index a81377e..12e2864 100644
--- a/sc/qa/extras/sccellrangeobj.cxx
+++ b/sc/qa/extras/sccellrangeobj.cxx
@@ -17,13 +17,15 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 using namespace css;
 using namespace css::uno;
 
 namespace sc_apitest {
 
-#define NUMBER_OF_TESTS 14
+#define NUMBER_OF_TESTS 15
 
 class ScCellRangeObj : public CalcUnoApiTest, public 
apitest::XCellRangesQuery, public apitest::CellProperties,
 public apitest::XSearchable, public 
apitest::XReplaceable, public apitest::XCellRangeData
@@ -35,6 +37,8 @@ public:
 virtual void tearDown() override;
 virtual uno::Reference< uno::XInterface > init() override;
 virtual uno::Reference< uno::XInterface > getXCellRangeData() override;
+void testSortOOB();
+
 
 CPPUNIT_TEST_SUITE(ScCellRangeObj);
 CPPUNIT_TEST(testQueryColumnDifference);
@@ -52,6 +56,7 @@ public:
 CPPUNIT_TEST(testCreateReplaceDescriptor);
 CPPUNIT_TEST(testGetDataArray);
 CPPUNIT_TEST(testSetDataArray);
+CPPUNIT_TEST(testSortOOB);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -109,6 +114,32 @@ uno::Reference< uno::XInterface > 
ScCellRangeObj::getXCellRangeData()
 return xReturn;
 }
 
+void ScCellRangeObj::testSortOOB()
+{
+uno::Reference xSortable(init(),UNO_QUERY_THROW);
+try {
+uno::Sequence aEmptyDescriptor;
+xSortable->sort(aEmptyDescriptor);
+} catch (const uno::Exception &) {
+CPPUNIT_FAIL("exception thrown during empty sort");
+}
+
+try {
+uno::Sequence aProps(1);
+uno::Sequence aSort(1);
+
+aSort[0].Field = 0xff;
+aSort[0].SortAscending = true;
+
+aProps[0].Name = "SortFields";
+aProps[0].Value = uno::makeAny(aSort);
+
+xSortable->sort(aProps);
+} catch (const uno::Exception &) {
+CPPUNIT_FAIL("exception thrown during OOB sort");
+}
+}
+
 void ScCellRangeObj::setUp()
 {
 nTest++;
commit b8fa4d1b2d135cabc9eb5162ca0c5af649f1cdaf
Author: Michael Meeks 
Date:   Fri Nov 4 21:14:34 2016 +

tdf#103632 - sc: tolerate OOB sort fields from UNO API.

Change-Id: Ie04b4281947a05572672838b3b4b5c6173d8fa0b
Reviewed-on: https://gerrit.libreoffice.org/30576
Tested-by: Jenkins 
Reviewed-by: Michael Meeks 

diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 49ac5e2..a1084a6 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -5598,8 +5598,16 @@ void SAL_CALL ScCellRangeObj::sort( const 
uno::Sequence& a
 SCCOLROW nFieldStart = aParam.bByRow ?
 static_cast(aRange.aStart.Col()) :
 static_cast(aRange.aStart.Row());
+SCCOLROW nFieldEnd = aParam.bByRow ?
+static_cast(aRange.aEnd.Col()) :
+static_cast(aRange.aEnd.Row());
 for (i=0; i nFieldEnd)
+aParam.maKeyState[i].nField = nFieldEnd;
+}
 
 SCTAB nTab = aRange.aStart.Tab();
 aParam.nCol1 = aRange.aStart.Col();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-10-16 Thread Stephan Bergmann
 sc/qa/unit/subsequent_export-test.cxx|8 
 sc/source/ui/docshell/docsh4.cxx |4 ++--
 sd/source/ui/dlg/filedlg.cxx |4 ++--
 sd/source/ui/remotecontrol/BluetoothServer.cxx   |6 +++---
 sd/source/ui/remotecontrol/DiscoveryService.cxx  |6 --
 sd/source/ui/remotecontrol/WINNetworkService.cxx |2 +-
 sd/source/ui/remotecontrol/WINNetworkService.hxx |8 
 7 files changed, 24 insertions(+), 14 deletions(-)

New commits:
commit 4cfb22aaf50f93019ee888e84a2db2efd048b894
Author: Stephan Bergmann 
Date:   Fri Oct 14 16:53:50 2016 +0200

clang-cl loplugin: sc

Change-Id: I24d091174ab602ecf80c65ad75fd450e55cb01ac
Reviewed-on: https://gerrit.libreoffice.org/29856
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/sc/qa/unit/subsequent_export-test.cxx 
b/sc/qa/unit/subsequent_export-test.cxx
index 693990d..9a47f47 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -141,7 +141,9 @@ public:
 void testCeilingFloorXLS();
 void testCeilingFloorODS();
 
+#if !defined _WIN32
 void testRelativePaths();
+#endif
 void testSheetProtection();
 
 void testPivotTableXLSX();
@@ -151,7 +153,9 @@ public:
 void testLinkedGraphicRT();
 void testImageWithSpecialID();
 
+#if !defined _WIN32
 void testSupBookVirtualPath();
+#endif
 void testSheetLocalRangeNameXLS();
 void testSheetTextBoxHyperlink();
 void testFontSize();
@@ -2622,6 +2626,7 @@ void ScExportTest::testCeilingFloorODS()
 testCeilingFloor(FORMAT_ODS);
 }
 
+#if !defined _WIN32
 void ScExportTest::testRelativePaths()
 {
 ScDocShellRef xDocSh = loadDoc("fdo79305.", FORMAT_ODS);
@@ -2634,6 +2639,7 @@ void ScExportTest::testRelativePaths()
 // make sure that the URL is relative
 CPPUNIT_ASSERT(aURL.startsWith(".."));
 }
+#endif
 
 namespace {
 
@@ -3025,6 +3031,7 @@ void ScExportTest::tearDown()
 test::BootstrapFixture::tearDown();
 }
 
+#if !defined _WIN32
 void ScExportTest::testSupBookVirtualPath()
 {
 ScDocShellRef xShell = loadDoc("external-ref.", FORMAT_XLS);
@@ -3041,6 +3048,7 @@ void ScExportTest::testSupBookVirtualPath()
 
 xDocSh->DoClose();
 }
+#endif
 
 void ScExportTest::testLinkedGraphicRT()
 {
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index e9a362c..977f03e 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -2195,10 +2195,10 @@ bool ScDocShell::DdeSetData( const OUString& rItem,
 if( aDdeTextFmt == "CSV" ||
 aDdeTextFmt == "FCSV" )
 aObj.SetSeparator( ',' );
-return aObj.ImportData( rMimeType, rValue );
+return ScImportExport::ImportData( rMimeType, rValue );
 }
 ScImportExport aObj( , rItem );
-return aObj.IsRef() && aObj.ImportData( rMimeType, rValue );
+return aObj.IsRef() && ScImportExport::ImportData( rMimeType, rValue );
 }
 #endif
 
commit 480e84d88d96d2d245b653613a9b83f3d7120ed8
Author: Stephan Bergmann 
Date:   Fri Oct 14 16:53:45 2016 +0200

clang-cl loplugin: sd

Change-Id: I26a1e20a3b811aea535994cda2e49a9c39df64b7
Reviewed-on: https://gerrit.libreoffice.org/29855
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/sd/source/ui/dlg/filedlg.cxx b/sd/source/ui/dlg/filedlg.cxx
index 0f0c87d..e5823d1 100644
--- a/sd/source/ui/dlg/filedlg.cxx
+++ b/sd/source/ui/dlg/filedlg.cxx
@@ -273,9 +273,9 @@ SdOpenSoundFileDialog::SdOpenSoundFileDialog() :
 mpImpl->AddFilter( aDescr, "*.svx");
 #else
 aDescr = SD_RESSTR(STR_WAV_FILE);
-mpImpl->AddFilter( aDescr, OUString("*.wav;*.mp3;*.ogg" ));
+mpImpl->AddFilter( aDescr, "*.wav;*.mp3;*.ogg" );
 aDescr = SD_RESSTR(STR_MIDI_FILE);
-mpImpl->AddFilter( aDescr, OUString("*.mid" ));
+mpImpl->AddFilter( aDescr, "*.mid" );
 #endif
 }
 
diff --git a/sd/source/ui/remotecontrol/BluetoothServer.cxx 
b/sd/source/ui/remotecontrol/BluetoothServer.cxx
index f177d86..3002160 100644
--- a/sd/source/ui/remotecontrol/BluetoothServer.cxx
+++ b/sd/source/ui/remotecontrol/BluetoothServer.cxx
@@ -1336,7 +1336,7 @@ void SAL_CALL BluetoothServer::run()
 aAddr.btAddr = 0;
 aAddr.serviceClassId = GUID_NULL;
 aAddr.port = BT_PORT_ANY; // Select any free socket.
-if ( bind( aSocket, (SOCKADDR*) , sizeof(aAddr) ) == SOCKET_ERROR )
+if ( bind( aSocket, reinterpret_cast(), sizeof(aAddr) ) 
== SOCKET_ERROR )
 {
 closesocket( aSocket );
 WSACleanup();
@@ -1372,7 +1372,7 @@ void SAL_CALL BluetoothServer::run()
 L"LibreOffice Impress Remote Control");
 aRecord.lpszComment = const_cast(
 L"Remote control of presentations over bluetooth.");
-aRecord.lpServiceClassId = (LPGUID) _UUID;
+aRecord.lpServiceClassId = 

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

2016-10-16 Thread Zdeněk Crhonek
 sc/qa/unit/data/functions/fods/critbinom.fods  | 3884 
 sc/qa/unit/data/functions/fods/gamma.dist.fods | 4776 +
 2 files changed, 8660 insertions(+)

New commits:
commit 51069a07fb637e0de2aec71b9f21d891667acaa3
Author: Zdeněk Crhonek 
Date:   Sat Oct 15 17:50:54 2016 +0200

add CRITBINOM test case

Change-Id: I0f6c28937da22ab3b514a51e5c4f63ca89377169
Reviewed-on: https://gerrit.libreoffice.org/29906
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/qa/unit/data/functions/fods/critbinom.fods 
b/sc/qa/unit/data/functions/fods/critbinom.fods
new file mode 100644
index 000..bc51d5a
--- /dev/null
+++ b/sc/qa/unit/data/functions/fods/critbinom.fods
@@ -0,0 +1,3884 @@
+
+
+http://www.w3.org/1999/xlink; 
xmlns:dc="http://purl.org/dc/elements/1.1/; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:scr
 ipt="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office; 
xmlns:ooow="http://openoffice.org/2004/writer; 
xmlns:oooc="http://openoffice.org/2004/calc; 
xmlns:dom="http://www.w3.org/2001/xml-events; 
xmlns:xforms="http://www.w3.org/2002/xforms; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xmlns:rpt="http://openoffice.org/2005/report; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#; 
xmlns:tableooo="http://openoffice.org/2009/table; 
xmlns:drawooo="http://openoffice.org/2010/draw; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:form
 x="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
+ 
2016-07-24T08:15:55.36200P0D1LibreOfficeDev/5.3.0.0.alpha0$Linux_X86_64
 
LibreOffice_project/619e74ccb0e97b0ea12ae11c5b36084706d5002e
+ 
+  
+   0
+   0
+   47464
+   10451
+   
+
+ view1
+ 
+  
+   2
+   8
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   75
+   60
+   true
+   false
+  
+  
+   4
+   9
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   75
+   60
+   true
+   false
+  
+ 
+ Sheet2
+ 1241
+ 0
+ 75
+ 60
+ false
+ true
+ true
+ true
+ 12632256
+ true
+ true
+ true
+ true
+ false
+ false
+ false
+ 1270
+ 1270
+ 1
+ 1
+ true
+ false
+
+   
+  
+  
+   7
+   false
+   false
+   true
+   true
+   false
+   false
+   false
+   1270
+   1270
+   true
+   true
+   true
+   true
+   true
+   false
+   12632256
+   false
+   Lexmark-E352dn
+   
+
+ cs
+ CZ
+ 
+ 
+ 
+
+
+ de
+ DE
+ 
+ 
+ 
+
+
+ en
+ US
+ 
+ 
+ 
+
+
+ nl
+ NL
+ 
+ 
+ 
+
+   
+   true
+   true
+   3
+   1
+   true
+   1
+   true
+   lgH+/0xleG1hcmstRTM1MmRuQ1VQUzpMZXhtYXJrLUUzNTJkbgAWAAMAtwAIAFZUAAAkbQAASm9iRGF0YSAxCnByaW50ZXI9TGV4bWFyay1FMzUyZG4Kb3JpZW50YXRpb249UG9ydHJhaXQKY29waWVzPTEKY29sbGF0ZT1mYWxzZQptYXJnaW5kYWp1c3RtZW50PTAsMCwwLDAKY29sb3JkZXB0aD0yNApwc2xldmVsPTAKcGRmZGV2aWNlPTEKY29sb3JkZXZpY2U9MApQUERDb250ZXhEYXRhClBhZ2VTaXplOkxldHRlcgAAEgBDT01QQVRfRFVQTEVYX01PREUPAER1cGxleE1vZGU6Ok9mZg==
+   false
+   0
+  
+ 
+ 
+  
+   http://openoffice.org/2004/office; 
xmlns:xlink="http://www.w3.org/1999/xlink;>
+
+   
+  
+ 
+ 
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+ 
+ 
+  
+   
+   
+  
+  
+   
+  
+  
+   
+
+   Kč
+  
+  
+   
+   -
+   
+
+   Kč
+   
+  
+  
+
+   
+
+  
+  
+
+   (
+   
+   )
+  
+  
+
+   -
+   
+
+  
+  
+   
+
+   
+   
+   
+  
+  
+   
+  
+  
+   
+
+   Kč
+  
+  
+   -
+   
+
+  

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

2016-10-16 Thread Zdeněk Crhonek
 sc/qa/unit/data/functions/fods/betainv.fods | 4060 
 sc/qa/unit/data/functions/fods/dollar.fods  | 1360 +
 2 files changed, 5420 insertions(+)

New commits:
commit 842e503a03bb0f27eb4799ba4a8cb91ab07c3174
Author: Zdeněk Crhonek 
Date:   Sat Oct 15 11:07:48 2016 +0200

add BETAINV test case

Change-Id: I0e3ed47b3efd4f869ab7d3b75577282d37b76619
Reviewed-on: https://gerrit.libreoffice.org/29895
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/qa/unit/data/functions/fods/betainv.fods 
b/sc/qa/unit/data/functions/fods/betainv.fods
new file mode 100644
index 000..3e1d40a
--- /dev/null
+++ b/sc/qa/unit/data/functions/fods/betainv.fods
@@ -0,0 +1,4060 @@
+
+
+http://www.w3.org/1999/xlink; 
xmlns:dc="http://purl.org/dc/elements/1.1/; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:scr
 ipt="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office; 
xmlns:ooow="http://openoffice.org/2004/writer; 
xmlns:oooc="http://openoffice.org/2004/calc; 
xmlns:dom="http://www.w3.org/2001/xml-events; 
xmlns:xforms="http://www.w3.org/2002/xforms; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xmlns:rpt="http://openoffice.org/2005/report; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#; 
xmlns:tableooo="http://openoffice.org/2009/table; 
xmlns:drawooo="http://openoffice.org/2010/draw; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:form
 x="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
+ 
2016-07-24T08:15:55.36200P0D1LibreOfficeDev/5.3.0.0.alpha0$Linux_X86_64
 
LibreOffice_project/619e74ccb0e97b0ea12ae11c5b36084706d5002e
+ 
+  
+   0
+   0
+   89632
+   13220
+   
+
+ view1
+ 
+  
+   2
+   8
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   75
+   60
+   true
+   false
+  
+  
+   4
+   10
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   75
+   60
+   true
+   false
+  
+ 
+ Sheet2
+ 1241
+ 0
+ 75
+ 60
+ false
+ true
+ true
+ true
+ 12632256
+ true
+ true
+ true
+ true
+ false
+ false
+ false
+ 1270
+ 1270
+ 1
+ 1
+ true
+ false
+
+   
+  
+  
+   7
+   false
+   false
+   true
+   true
+   false
+   false
+   false
+   1270
+   1270
+   true
+   true
+   true
+   true
+   true
+   false
+   12632256
+   false
+   Lexmark-E352dn
+   
+
+ cs
+ CZ
+ 
+ 
+ 
+
+
+ en
+ US
+ 
+ 
+ 
+
+
+ nl
+ NL
+ 
+ 
+ 
+
+   
+   true
+   true
+   3
+   1
+   true
+   1
+   true
+   sgH+/0xleG1hcmstRTM1MmRuQ1VQUzpMZXhtYXJrLUUzNTJkbgAWAAMA0wAIAFZUAAAkbQAASm9iRGF0YSAxCnByaW50ZXI9TGV4bWFyay1FMzUyZG4Kb3JpZW50YXRpb249UG9ydHJhaXQKY29waWVzPTEKY29sbGF0ZT1mYWxzZQptYXJnaW5kYWp1c3RtZW50PTAsMCwwLDAKY29sb3JkZXB0aD0yNApwc2xldmVsPTAKcGRmZGV2aWNlPTEKY29sb3JkZXZpY2U9MApQUERDb250ZXhEYXRhCkR1cGxleDpOb25lAElucHV0U2xvdDpUcmF5MQBQYWdlU2l6ZTpMZXR0ZXIAABIAQ09NUEFUX0RVUExFWF9NT0RFDwBEdXBsZXhNb2RlOjpPZmY=
+   false
+   0
+  
+ 
+ 
+  
+   http://openoffice.org/2004/office; 
xmlns:xlink="http://www.w3.org/1999/xlink;>
+
+   
+  
+ 
+ 
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+ 
+ 
+  
+   
+   
+  
+  
+   
+  
+  
+   
+
+   Kč
+  
+  
+   
+   -
+   
+
+   Kč
+   
+  
+  
+
+   
+
+  
+  
+
+   (
+   
+   )
+  
+  
+
+   -
+   
+
+  
+  
+   
+
+   
+   
+   
+  
+  
+   
+  
+  
+   
+
+   Kč
+  
+  
+   -
+   
+
+   Kč
+   
+  
+  
+   
+

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

2016-10-03 Thread Caolán McNamara
 sc/qa/unit/tiledrendering/tiledrendering.cxx |1 +
 vcl/inc/unx/saldisp.hxx  |1 -
 vcl/unx/generic/app/saldisp.cxx  |8 
 3 files changed, 1 insertion(+), 9 deletions(-)

New commits:
commit bb43a23036dcfda114368441c5aa82a9a90355cd
Author: Caolán McNamara 
Date:   Mon Oct 3 09:26:54 2016 +0100

coverity#1373353 Uninitialized scalar field

Change-Id: Ifc65e3fbc2dd076f322482459f4ad96745f64882

diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index 9fdefb5..63175fe 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -390,6 +390,7 @@ public:
 : m_bOwnCursorInvalidated(false),
   m_bViewCursorInvalidated(false),
   m_bTextViewSelectionInvalidated(false),
+  m_bGraphicSelection(false),
   m_bGraphicViewSelection(false),
   m_bFullInvalidateTiles(false),
   m_bViewLock(false)
commit d8b8ddf372c980f8c7d1ad66ae439d2ce60b82ba
Author: Caolán McNamara 
Date:   Sat Oct 1 21:26:13 2016 +0100

custom dtor is unnecessary

Change-Id: I2b9d167628995747a6c1b032f3461d988ed485e5

diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx
index ee651b6..f4d2b23 100644
--- a/vcl/inc/unx/saldisp.hxx
+++ b/vcl/inc/unx/saldisp.hxx
@@ -120,7 +120,6 @@ public:
  SalX11Screen   nXScreen );
 SalColormap( sal_uInt16 nDepth );
 SalColormap();
-~SalColormap();
 
 inline  ColormapGetXColormap() const { return m_hColormap; }
 inline  const SalDisplay*   GetDisplay() const { return m_pDisplay; }
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index ed1fb53..3cb7cec 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -2705,14 +2705,6 @@ SalColormap::SalColormap( sal_uInt16 nDepth )
 }
 }
 
-SalColormap::~SalColormap()
-{
-#ifdef DBG_UTIL
-m_hColormap  = None;
-m_pDisplay   = nullptr;
-#endif
-}
-
 void SalColormap::GetPalette()
 {
 Pixel i;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-28 Thread Zdeněk Crhonek
 sc/qa/unit/data/functions/fods/gauss.fods   | 5175 +++
 sc/qa/unit/data/functions/fods/harmean.fods | 5192 
 2 files changed, 10367 insertions(+)

New commits:
commit a39c1f86abe5442ccdf2c693455c545562bd8139
Author: Zdeněk Crhonek 
Date:   Tue Sep 27 21:38:36 2016 +0200

add HARMEAN test case

Change-Id: I5a7a04e4030e26bcf1eac4d9c72382b4fc68ec8e
Reviewed-on: https://gerrit.libreoffice.org/29329
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/qa/unit/data/functions/fods/harmean.fods 
b/sc/qa/unit/data/functions/fods/harmean.fods
new file mode 100644
index 000..01023ad
--- /dev/null
+++ b/sc/qa/unit/data/functions/fods/harmean.fods
@@ -0,0 +1,5192 @@
+
+
+http://www.w3.org/1999/xlink; 
xmlns:dc="http://purl.org/dc/elements/1.1/; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:scr
 ipt="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office; 
xmlns:ooow="http://openoffice.org/2004/writer; 
xmlns:oooc="http://openoffice.org/2004/calc; 
xmlns:dom="http://www.w3.org/2001/xml-events; 
xmlns:xforms="http://www.w3.org/2002/xforms; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xmlns:rpt="http://openoffice.org/2005/report; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#; 
xmlns:tableooo="http://openoffice.org/2009/table; 
xmlns:drawooo="http://openoffice.org/2010/draw; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:form
 x="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
+ 
2016-07-24T08:15:55.36200P0D1LibreOfficeDev/5.3.0.0.alpha0$Linux_X86_64
 
LibreOffice_project/7b8832ff972a4e9f3e03fd7d96882b2a78c03b3e
+ 
+  
+   0
+   0
+   103829
+   24597
+   
+
+ view1
+ 
+  
+   2
+   8
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   75
+   60
+   true
+   false
+  
+  
+   2
+   28
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   12
+   0
+   75
+   60
+   true
+   false
+  
+ 
+ Sheet2
+ 1241
+ 0
+ 75
+ 60
+ false
+ true
+ true
+ true
+ 12632256
+ true
+ true
+ true
+ true
+ true
+ false
+ false
+ 1270
+ 1270
+ 1
+ 1
+ true
+ false
+
+   
+  
+  
+   7
+   false
+   false
+   true
+   true
+   false
+   false
+   false
+   1270
+   1270
+   true
+   true
+   true
+   true
+   true
+   false
+   12632256
+   false
+   Lexmark-E352dn
+   
+
+ cs
+ CZ
+ 
+ 
+ 
+
+
+ de
+ DE
+ 
+ 
+ 
+
+
+ en
+ US
+ 
+ 
+ 
+
+
+ nl
+ NL
+ 
+ 
+ 
+
+   
+   true
+   true
+   3
+   1
+   true
+   1
+   true
+   lgH+/0xleG1hcmstRTM1MmRuQ1VQUzpMZXhtYXJrLUUzNTJkbgAWAAMAtwAIAFZUAAAkbQAASm9iRGF0YSAxCnByaW50ZXI9TGV4bWFyay1FMzUyZG4Kb3JpZW50YXRpb249UG9ydHJhaXQKY29waWVzPTEKY29sbGF0ZT1mYWxzZQptYXJnaW5kYWp1c3RtZW50PTAsMCwwLDAKY29sb3JkZXB0aD0yNApwc2xldmVsPTAKcGRmZGV2aWNlPTEKY29sb3JkZXZpY2U9MApQUERDb250ZXhEYXRhClBhZ2VTaXplOkxldHRlcgAAEgBDT01QQVRfRFVQTEVYX01PREUPAER1cGxleE1vZGU6Ok9mZg==
+   false
+   0
+  
+ 
+ 
+  
+   http://openoffice.org/2004/office; 
xmlns:xlink="http://www.w3.org/1999/xlink;>
+
+   
+  
+ 
+ 
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+ 
+ 
+  
+   
+   
+  
+  
+   
+  
+  
+   
+
+   Kč
+  
+  
+   
+   -
+   
+
+   Kč
+   
+  
+  
+
+   
+
+  
+  
+
+   (
+   
+   )
+  
+  
+
+   -
+   
+
+  
+  
+   
+
+   
+   
+   
+  
+  
+   
+  
+  
+   
+  
+  
+   
+
+   

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

2016-09-27 Thread Kohei Yoshida
 dev/null |binary
 sc/qa/unit/data/xlsx/pivot-table/shared-group-field.xlsx |binary
 sc/qa/unit/subsequent_filters-test.cxx   |   17 +--
 3 files changed, 15 insertions(+), 2 deletions(-)

New commits:
commit 3d9231dd4945dcd6c3d53ba11152049d382b975f
Author: Kohei Yoshida 
Date:   Tue Sep 27 22:11:18 2016 -0400

Add a bit more checking on the internal pivot table states.

Change-Id: I8be8f510cecab8ec8aa07f2f81795bbfdf727a26

diff --git a/sc/qa/unit/subsequent_filters-test.cxx 
b/sc/qa/unit/subsequent_filters-test.cxx
index 7f8b614..8ef4a8c 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -2070,7 +2070,6 @@ void ScFiltersTest::testPivotTableSharedGroupXLSX()
 ScDocShellRef xDocSh = loadDoc("pivot-table/shared-group-field.", 
FORMAT_XLSX);
 CPPUNIT_ASSERT_MESSAGE("Failed to load file", xDocSh.Is());
 ScDocument& rDoc = xDocSh->GetDocument();
-rDoc.CalcAll();
 
 // Check whether right group names are imported for both tables
 // First table
@@ -2089,6 +2088,20 @@ void ScFiltersTest::testPivotTableSharedGroupXLSX()
 CPPUNIT_ASSERT_EQUAL(OUString("17"), rDoc.GetString(ScAddress(0,16,0)));
 CPPUNIT_ASSERT_EQUAL(OUString("18"), rDoc.GetString(ScAddress(0,17,0)));
 
+// There should be exactly 2 pivot tables and 1 cache.
+ScDPCollection* pDPs = rDoc.GetDPCollection();
+CPPUNIT_ASSERT_EQUAL(static_cast(2), pDPs->GetCount());
+
+ScDPCollection::SheetCaches& rSheetCaches = pDPs->GetSheetCaches();
+CPPUNIT_ASSERT_EQUAL(static_cast(1), rSheetCaches.size());
+
+const ScDPCache* pCache = 
rSheetCaches.getExistingCache(ScRange(0,0,1,13,18,1));
+CPPUNIT_ASSERT_MESSAGE("Pivot cache is expected for A1:N19 on the second 
sheet.", pCache);
+CPPUNIT_ASSERT_EQUAL(static_cast(14), pCache->GetFieldCount());
+
+// TODO : Look into this and find out why it fails.
+// CPPUNIT_ASSERT_EQUAL(static_cast(1), 
pCache->GetGroupFieldCount());
+
 xDocSh->DoClose();
 }
 
commit 57d925dede88d870a20f6ec469a26bf6961658ce
Author: Kohei Yoshida 
Date:   Tue Sep 27 21:18:22 2016 -0400

Let's keep the naming style of test document consistent.

Change-Id: Ib832509bc4c4daa5eddb9a8e1a341a5892436455

diff --git a/sc/qa/unit/data/xlsx/pivot-table/shared_group.xlsx 
b/sc/qa/unit/data/xlsx/pivot-table/shared-group-field.xlsx
similarity index 100%
rename from sc/qa/unit/data/xlsx/pivot-table/shared_group.xlsx
rename to sc/qa/unit/data/xlsx/pivot-table/shared-group-field.xlsx
diff --git a/sc/qa/unit/subsequent_filters-test.cxx 
b/sc/qa/unit/subsequent_filters-test.cxx
index 3195fa8..7f8b614 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -2067,7 +2067,7 @@ void ScFiltersTest::testGetPivotDataXLS()
 
 void ScFiltersTest::testPivotTableSharedGroupXLSX()
 {
-ScDocShellRef xDocSh = loadDoc("pivot-table/shared_group.", FORMAT_XLSX);
+ScDocShellRef xDocSh = loadDoc("pivot-table/shared-group-field.", 
FORMAT_XLSX);
 CPPUNIT_ASSERT_MESSAGE("Failed to load file", xDocSh.Is());
 ScDocument& rDoc = xDocSh->GetDocument();
 rDoc.CalcAll();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-27 Thread Markus Mohrhard
 sc/qa/unit/subsequent_export-test.cxx |   24 
 sc/source/filter/xml/xmlexprt.cxx |6 ++
 2 files changed, 30 insertions(+)

New commits:
commit 7cf54c0c27e2f6d764164ea880b87163f45a
Author: Markus Mohrhard 
Date:   Tue Sep 27 18:36:52 2016 +0200

add test for tdf#101843

Change-Id: I90bd5e8042e3157286774c97d2ea3c109da2b658

diff --git a/sc/qa/unit/subsequent_export-test.cxx 
b/sc/qa/unit/subsequent_export-test.cxx
index ac1f035..0b78c56 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -174,6 +174,8 @@ public:
 void testEscapeCharInNumberFormatXLSX();
 void testNatNumInNumberFormatXLSX();
 
+void testHiddenRepeatedRowsODS();
+
 CPPUNIT_TEST_SUITE(ScExportTest);
 CPPUNIT_TEST(test);
 CPPUNIT_TEST(testPasswordExport);
@@ -255,6 +257,8 @@ public:
 CPPUNIT_TEST(testEscapeCharInNumberFormatXLSX);
 CPPUNIT_TEST(testNatNumInNumberFormatXLSX);
 
+CPPUNIT_TEST(testHiddenRepeatedRowsODS);
+
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -3655,6 +3659,26 @@ void ScExportTest::testNatNumInNumberFormatXLSX()
 xDocSh->DoClose();
 }
 
+void ScExportTest::testHiddenRepeatedRowsODS()
+{
+ScDocShellRef xDocSh = loadDoc("empty.", FORMAT_ODS);
+CPPUNIT_ASSERT( xDocSh.Is() );
+
+{
+ScDocument& rDoc = xDocSh->GetDocument();
+rDoc.SetRowHidden(0, 20, 0, true);
+}
+
+xDocSh = saveAndReload( &(*xDocSh), FORMAT_ODS);  // Convert [NatNum5] to 
[DBNum2] in Chinese
+ScDocument& rDoc = xDocSh->GetDocument();
+SCROW nFirstRow = 0;
+SCROW nLastRow = 0;
+bool bHidden = rDoc.RowHidden(0, 0, , );
+CPPUNIT_ASSERT(bHidden);
+CPPUNIT_ASSERT_EQUAL((SCROW)0, nFirstRow);
+CPPUNIT_ASSERT_EQUAL((SCROW)20, nLastRow);
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(ScExportTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
commit 7e7f6b0a056b51a425934f63745ae5c9fed2e51f
Author: Markus Mohrhard 
Date:   Tue Sep 27 18:17:11 2016 +0200

tdf#101843, ensure repeated rows set the hidden/filtered flag correctly

Change-Id: I759107eeb074698d5e4987c76005788aee33287d

diff --git a/sc/source/filter/xml/xmlexprt.cxx 
b/sc/source/filter/xml/xmlexprt.cxx
index 8a0931c..4853373 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -1439,9 +1439,15 @@ void ScXMLExport::OpenRow(const sal_Int32 nTable, const 
sal_Int32 nStartRow, con
 if (pDoc)
 {
 if (nRow > nEndRowHidden)
+{
 bPrevHidden = rRowAttr.rowHidden(nTable, nRow, 
nEndRowHidden);
+bHidden = bPrevHidden;
+}
 if (nRow > nEndRowFiltered)
+{
 bPrevFiltered = rRowAttr.rowFiltered(nTable, nRow, 
nEndRowFiltered);
+bFiltered = bPrevFiltered;
+}
 }
 
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-26 Thread Markus Mohrhard
 sc/qa/unit/ucalc.cxx   |   13 +
 sc/qa/unit/ucalc.hxx   |1 +
 sc/qa/unit/ucalc_condformat.cxx|5 ++---
 sc/source/core/data/colorscale.cxx |4 
 4 files changed, 16 insertions(+), 7 deletions(-)

New commits:
commit f3531bebd1746e2f3cec2a18d92322ab482ee2ab
Author: Markus Mohrhard 
Date:   Tue Sep 27 00:11:32 2016 +0200

tdf#101104 this paranoid safety check actually causes a bug

Change-Id: Id31f98f5f84eabf603045e4d9f7ebd448689eed5

diff --git a/sc/source/core/data/colorscale.cxx 
b/sc/source/core/data/colorscale.cxx
index 2f816b0..25707bf 100644
--- a/sc/source/core/data/colorscale.cxx
+++ b/sc/source/core/data/colorscale.cxx
@@ -944,10 +944,6 @@ ScIconSetInfo* ScIconSetFormat::GetIconSetInfo(const 
ScAddress& rAddr) const
 double nMin = GetMinValue();
 double nMax = GetMaxValue();
 
-// this check is for safety
-if(nMin > nMax)
-return nullptr;
-
 sal_Int32 nIndex = 0;
 const_iterator itr = begin();
 ++itr;
commit c8a5f46b6121106d3efc0a4d45922bf910f6f94c
Author: Markus Mohrhard 
Date:   Mon Sep 26 22:28:20 2016 +0200

OOPS, we were actually testing the wrong method

Change-Id: I29adf81d3da56d7150e5182025d931ee62598e63

diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 0db6a1c..f103f7d 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -34,6 +34,7 @@
 #include "dbdata.hxx"
 #include "reftokenhelper.hxx"
 #include "userdat.hxx"
+#include "clipcontext.hxx"
 
 #include "docsh.hxx"
 #include "docfunc.hxx"
@@ -6135,6 +6136,18 @@ void Test::pasteFromClip(ScDocument* pDestDoc, const 
ScRange& rDestRange, ScDocu
 pDestDoc->CopyFromClip(rDestRange, aMark, InsertDeleteFlags::ALL, nullptr, 
pClipDoc);
 }
 
+void Test::pasteOneCellFromClip(ScDocument* pDestDoc, const ScRange& 
rDestRange, ScDocument* pClipDoc, InsertDeleteFlags eFlags)
+{
+ScMarkData aMark;
+aMark.SetMarkArea(rDestRange);
+sc::CopyFromClipContext aCxt(*pDestDoc, nullptr, pClipDoc, eFlags, false, 
false);
+aCxt.setDestRange(rDestRange.aStart.Col(), rDestRange.aStart.Row(),
+rDestRange.aEnd.Col(), rDestRange.aEnd.Row());
+aCxt.setTabRange(rDestRange.aStart.Tab(), rDestRange.aEnd.Tab());
+pDestDoc->CopyOneCellFromClip(aCxt, rDestRange.aStart.Col(), 
rDestRange.aStart.Row(),
+rDestRange.aEnd.Col(), rDestRange.aEnd.Row());
+}
+
 ScUndoPaste* Test::createUndoPaste(ScDocShell& rDocSh, const ScRange& rRange, 
ScDocument* pUndoDoc)
 {
 ScDocument& rDoc = rDocSh.GetDocument();
diff --git a/sc/qa/unit/ucalc.hxx b/sc/qa/unit/ucalc.hxx
index b66110c..cbc9981 100644
--- a/sc/qa/unit/ucalc.hxx
+++ b/sc/qa/unit/ucalc.hxx
@@ -47,6 +47,7 @@ public:
 static void clearSheet(ScDocument* pDoc, SCTAB nTab);
 static void copyToClip(ScDocument* pSrcDoc, const ScRange& rRange, 
ScDocument* pClipDoc);
 static void pasteFromClip(ScDocument* pDestDoc, const ScRange& rDestRange, 
ScDocument* pClipDoc);
+static void pasteOneCellFromClip(ScDocument* pDestDoc, const ScRange& 
rDestRange, ScDocument* pClipDoc, InsertDeleteFlags eFlags = 
InsertDeleteFlags::ALL);
 static ScUndoPaste* createUndoPaste(ScDocShell& rDocSh, const ScRange& 
rRange, ScDocument* pUndoDoc);
 
 /**
diff --git a/sc/qa/unit/ucalc_condformat.cxx b/sc/qa/unit/ucalc_condformat.cxx
index 93ce111..66f9a12 100644
--- a/sc/qa/unit/ucalc_condformat.cxx
+++ b/sc/qa/unit/ucalc_condformat.cxx
@@ -317,7 +317,7 @@ void Test::testCondCopyPasteSingleCell()
 copyToClip(m_pDoc, ScRange(0,0,0,0,0,0), );
 
 ScRange aTargetRange(4,4,0,4,4,0);
-pasteFromClip(m_pDoc, aTargetRange, );
+pasteOneCellFromClip(m_pDoc, aTargetRange, );
 
 ScConditionalFormat* pPastedFormat = m_pDoc->GetCondFormat(4,4,0);
 CPPUNIT_ASSERT(pPastedFormat);
@@ -349,9 +349,8 @@ void Test::testCondCopyPasteSingleCellToRange()
 
 ScDocument aClipDoc(SCDOCMODE_CLIP);
 copyToClip(m_pDoc, ScRange(0,0,0,0,0,0), );
-
 ScRange aTargetRange(4,4,0,5,8,0);
-pasteFromClip(m_pDoc, aTargetRange, );
+pasteOneCellFromClip(m_pDoc, aTargetRange, );
 
 std::set aCondFormatIndices;
 for(SCROW nRow = 4; nRow <= 8; ++nRow)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-08 Thread Zdeněk Crhonek
 sc/qa/unit/data/functions/fods/f.dist.rt.fods | 3859 +
 sc/qa/unit/data/functions/fods/f.inv.rt.fods  | 3910 ++
 2 files changed, 7769 insertions(+)

New commits:
commit 4a751b119129fc3c924b92cc9d527ab9b504b5c5
Author: Zdeněk Crhonek 
Date:   Sat Sep 3 14:28:22 2016 +0200

add F.DIST.RT test case

Change-Id: I8afc84c7e397061f9794985d3ffca54d81713fdc
Reviewed-on: https://gerrit.libreoffice.org/28645
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/qa/unit/data/functions/fods/f.dist.rt.fods 
b/sc/qa/unit/data/functions/fods/f.dist.rt.fods
new file mode 100644
index 000..ce726fa
--- /dev/null
+++ b/sc/qa/unit/data/functions/fods/f.dist.rt.fods
@@ -0,0 +1,3859 @@
+
+
+http://www.w3.org/1999/xlink; 
xmlns:dc="http://purl.org/dc/elements/1.1/; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:scr
 ipt="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office; 
xmlns:ooow="http://openoffice.org/2004/writer; 
xmlns:oooc="http://openoffice.org/2004/calc; 
xmlns:dom="http://www.w3.org/2001/xml-events; 
xmlns:xforms="http://www.w3.org/2002/xforms; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xmlns:rpt="http://openoffice.org/2005/report; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#; 
xmlns:tableooo="http://openoffice.org/2009/table; 
xmlns:drawooo="http://openoffice.org/2010/draw; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:form
 x="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
+ 
2016-09-03T14:27:23.271485583P0D1LibreOfficeDev/5.3.0.0.alpha0$Linux_X86_64
 
LibreOffice_project/a8a7b7114d96b2013b00e9bc0ced81aad5495457
+ 
+  
+   0
+   0
+   39262
+   10234
+   
+
+ view1
+ 
+  
+   2
+   8
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   75
+   60
+   true
+   false
+  
+  
+   4
+   1
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   75
+   60
+   true
+   false
+  
+ 
+ Sheet2
+ 1241
+ 0
+ 75
+ 60
+ false
+ true
+ true
+ true
+ 12632256
+ true
+ true
+ true
+ true
+ false
+ false
+ false
+ 1270
+ 1270
+ 1
+ 1
+ true
+ false
+
+   
+  
+  
+   7
+   false
+   false
+   true
+   true
+   false
+   false
+   false
+   1270
+   1270
+   true
+   true
+   true
+   true
+   true
+   false
+   12632256
+   false
+   Lexmark-E352dn
+   
+
+ cs
+ CZ
+ 
+ 
+ 
+
+
+ de
+ DE
+ 
+ 
+ 
+
+
+ en
+ US
+ 
+ 
+ 
+
+
+ nl
+ NL
+ 
+ 
+ 
+
+   
+   true
+   true
+   3
+   1
+   true
+   1
+   true
+   kQH+/0xleG1hcmstRTM1MmRuQ1VQUzpMZXhtYXJrLUUzNTJkbgAWAAMAtwAIAFZUAAAkbQAASm9iRGF0YSAxCnByaW50ZXI9TGV4bWFyay1FMzUyZG4Kb3JpZW50YXRpb249UG9ydHJhaXQKY29waWVzPTEKY29sbGF0ZT1mYWxzZQptYXJnaW5kYWp1c3RtZW50PTAsMCwwLDAKY29sb3JkZXB0aD0yNApwc2xldmVsPTAKcGRmZGV2aWNlPTEKY29sb3JkZXZpY2U9MApQUERDb250ZXhEYXRhClBhZ2VTaXplOkxldHRlcgAAEgBDT01QQVRfRFVQTEVYX01PREUKAERVUExFWF9PRkY=
+   false
+   0
+  
+ 
+ 
+  
+   http://openoffice.org/2004/office; 
xmlns:xlink="http://www.w3.org/1999/xlink;>
+
+   
+  
+ 
+ 
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+ 
+ 
+  
+   
+   
+  
+  
+   
+  
+  
+   
+
+   Kč
+  
+  
+   
+   -
+   
+
+   Kč
+   
+  
+  
+
+   
+
+  
+  
+
+   (
+   
+   )
+  
+  
+
+   -
+   
+
+  
+  
+   
+
+   
+   
+   
+  
+  
+   
+  
+  
+   
+
+   Kč
+  
+  
+   -
+   
+
+   

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

2016-09-08 Thread Zdeněk Crhonek
 sc/qa/unit/data/functions/fods/expondist.fods | 3769 +
 sc/qa/unit/data/functions/fods/indirect.fods  | 4581 ++
 2 files changed, 8350 insertions(+)

New commits:
commit 3d1391e05a1dcbe0e8468fd84282137fcc73f152
Author: Zdeněk Crhonek 
Date:   Sat Sep 3 08:47:36 2016 +0200

add INDIRECT test case

Change-Id: Ifcfcf47dd22560a1e6abdd393e9712ec68a4d5e6
Reviewed-on: https://gerrit.libreoffice.org/28638
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/qa/unit/data/functions/fods/indirect.fods 
b/sc/qa/unit/data/functions/fods/indirect.fods
new file mode 100644
index 000..641da18
--- /dev/null
+++ b/sc/qa/unit/data/functions/fods/indirect.fods
@@ -0,0 +1,4581 @@
+
+
+http://www.w3.org/1999/xlink; 
xmlns:dc="http://purl.org/dc/elements/1.1/; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:scr
 ipt="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office; 
xmlns:ooow="http://openoffice.org/2004/writer; 
xmlns:oooc="http://openoffice.org/2004/calc; 
xmlns:dom="http://www.w3.org/2001/xml-events; 
xmlns:xforms="http://www.w3.org/2002/xforms; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xmlns:rpt="http://openoffice.org/2005/report; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#; 
xmlns:tableooo="http://openoffice.org/2009/table; 
xmlns:drawooo="http://openoffice.org/2010/draw; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:form
 x="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
+ 
2016-09-03T08:45:20.467594215P0D1LibreOfficeDev/5.3.0.0.alpha0$Linux_X86_64
 
LibreOffice_project/139d3b3e8b157c1f365f888126269f0902acbaa2
+ 
+  
+   0
+   0
+   56495
+   12819
+   
+
+ view1
+ 
+  
+   0
+   1
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   75
+   60
+   true
+   false
+  
+  
+   0
+   0
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   75
+   60
+   true
+   false
+  
+  
+   0
+   1
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   75
+   60
+   true
+   false
+  
+  
+   2
+   8
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   75
+   60
+   true
+   false
+  
+  
+   1
+   5
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   75
+   60
+   true
+   false
+  
+ 
+ Sheet2
+ 1241
+ 0
+ 75
+ 60
+ false
+ true
+ true
+ true
+ 12632256
+ true
+ true
+ true
+ true
+ false
+ false
+ false
+ 1270
+ 1270
+ 1
+ 1
+ true
+ false
+
+   
+  
+  
+   7
+   false
+   false
+   true
+   true
+   false
+   false
+   false
+   1270
+   1270
+   true
+   true
+   true
+   true
+   true
+   false
+   12632256
+   false
+   Lexmark-E352dn
+   
+
+ cs
+ CZ
+ 
+ 
+ 
+
+
+ de
+ DE
+ 
+ 
+ 
+
+
+ en
+ US
+ 
+ 
+ 
+
+
+ nl
+ NL
+ 
+ 
+ 
+
+   
+   true
+   true
+   3
+   1
+   true
+   1
+   true
+   

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

2016-08-31 Thread Zdeněk Crhonek
 sc/qa/unit/data/functions/fods/confidence.t.fods | 3898 
 sc/qa/unit/data/functions/fods/countif.fods  | 4472 +++
 2 files changed, 8370 insertions(+)

New commits:
commit 575b8be566243288ae35263087ced2049c35bb0c
Author: Zdeněk Crhonek 
Date:   Wed Aug 31 20:42:26 2016 +0200

add CONFIDENCE.T test case

Change-Id: Ibd7b84360a27642dc9f9210876f514e9dc109c2d
Reviewed-on: https://gerrit.libreoffice.org/28562
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/qa/unit/data/functions/fods/confidence.t.fods 
b/sc/qa/unit/data/functions/fods/confidence.t.fods
new file mode 100644
index 000..b113185
--- /dev/null
+++ b/sc/qa/unit/data/functions/fods/confidence.t.fods
@@ -0,0 +1,3898 @@
+
+
+http://www.w3.org/1999/xlink; 
xmlns:dc="http://purl.org/dc/elements/1.1/; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:scr
 ipt="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office; 
xmlns:ooow="http://openoffice.org/2004/writer; 
xmlns:oooc="http://openoffice.org/2004/calc; 
xmlns:dom="http://www.w3.org/2001/xml-events; 
xmlns:xforms="http://www.w3.org/2002/xforms; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xmlns:rpt="http://openoffice.org/2005/report; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#; 
xmlns:tableooo="http://openoffice.org/2009/table; 
xmlns:drawooo="http://openoffice.org/2010/draw; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:form
 x="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
+ 
2016-08-31T20:41:18.009584134P0D1LibreOfficeDev/5.3.0.0.alpha0$Linux_X86_64
 
LibreOffice_project/139d3b3e8b157c1f365f888126269f0902acbaa2
+ 
+  
+   0
+   0
+   45150
+   7076
+   
+
+ view1
+ 
+  
+   2
+   8
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   75
+   60
+   true
+   false
+  
+  
+   4
+   1
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   75
+   60
+   true
+   false
+  
+ 
+ Sheet2
+ 1241
+ 0
+ 75
+ 60
+ false
+ true
+ true
+ true
+ 12632256
+ true
+ true
+ true
+ true
+ false
+ false
+ false
+ 1270
+ 1270
+ 1
+ 1
+ true
+ false
+
+   
+  
+  
+   7
+   false
+   false
+   true
+   true
+   false
+   false
+   false
+   1270
+   1270
+   true
+   true
+   true
+   true
+   true
+   false
+   12632256
+   false
+   Lexmark-E352dn
+   
+
+ cs
+ CZ
+ 
+ 
+ 
+
+
+ en
+ US
+ 
+ 
+ 
+
+
+ nl
+ NL
+ 
+ 
+ 
+
+   
+   true
+   true
+   3
+   1
+   true
+   1
+   true
+   kQH+/0xleG1hcmstRTM1MmRuQ1VQUzpMZXhtYXJrLUUzNTJkbgAWAAMAtwAIAFZUAAAkbQAASm9iRGF0YSAxCnByaW50ZXI9TGV4bWFyay1FMzUyZG4Kb3JpZW50YXRpb249UG9ydHJhaXQKY29waWVzPTEKY29sbGF0ZT1mYWxzZQptYXJnaW5kYWp1c3RtZW50PTAsMCwwLDAKY29sb3JkZXB0aD0yNApwc2xldmVsPTAKcGRmZGV2aWNlPTEKY29sb3JkZXZpY2U9MApQUERDb250ZXhEYXRhClBhZ2VTaXplOkxldHRlcgAAEgBDT01QQVRfRFVQTEVYX01PREUKAERVUExFWF9PRkY=
+   false
+   0
+  
+ 
+ 
+  
+   http://openoffice.org/2004/office; 
xmlns:xlink="http://www.w3.org/1999/xlink;>
+
+   
+  
+ 
+ 
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+ 
+ 
+  
+   
+   
+  
+  
+   
+  
+  
+   
+
+   Kč
+  
+  
+   
+   -
+   
+
+   Kč
+   
+  
+  
+
+   
+
+  
+  
+
+   (
+   
+   )
+  
+  
+
+   -
+   
+
+  
+  
+   
+
+   
+   
+   
+  
+  
+   
+  
+  
+   
+
+   Kč
+  
+  
+   -
+   
+
+   Kč
+   
+  
+  
+   
+
+   

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

2016-08-31 Thread Zdeněk Crhonek
 sc/qa/unit/data/functions/fods/covariance.p.fods | 3833 +++
 sc/qa/unit/data/functions/fods/erfc.precise.fods | 3766 ++
 2 files changed, 7599 insertions(+)

New commits:
commit 23753b79188a7056784a21d841b98b57dcf6d4b5
Author: Zdeněk Crhonek 
Date:   Wed Aug 31 06:52:14 2016 +0200

add COVARIANCE.P test case

Change-Id: I5e5fe6d302b46580048de69eeda3968981f322b5
Reviewed-on: https://gerrit.libreoffice.org/28527
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/qa/unit/data/functions/fods/covariance.p.fods 
b/sc/qa/unit/data/functions/fods/covariance.p.fods
new file mode 100644
index 000..7c94559
--- /dev/null
+++ b/sc/qa/unit/data/functions/fods/covariance.p.fods
@@ -0,0 +1,3833 @@
+
+
+http://www.w3.org/1999/xlink; 
xmlns:dc="http://purl.org/dc/elements/1.1/; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:scr
 ipt="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office; 
xmlns:ooow="http://openoffice.org/2004/writer; 
xmlns:oooc="http://openoffice.org/2004/calc; 
xmlns:dom="http://www.w3.org/2001/xml-events; 
xmlns:xforms="http://www.w3.org/2002/xforms; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xmlns:rpt="http://openoffice.org/2005/report; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#; 
xmlns:tableooo="http://openoffice.org/2009/table; 
xmlns:drawooo="http://openoffice.org/2010/draw; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:form
 x="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
+ 
2016-08-31T06:51:25.610915422P0D1LibreOfficeDev/5.3.0.0.alpha0$Linux_X86_64
 
LibreOffice_project/139d3b3e8b157c1f365f888126269f0902acbaa2
+ 
+  
+   0
+   0
+   53191
+   8487
+   
+
+ view1
+ 
+  
+   2
+   8
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   75
+   60
+   true
+   false
+  
+  
+   4
+   1
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   75
+   60
+   true
+   false
+  
+ 
+ Sheet2
+ 1241
+ 0
+ 75
+ 60
+ false
+ true
+ true
+ true
+ 12632256
+ true
+ true
+ true
+ true
+ false
+ false
+ false
+ 1270
+ 1270
+ 1
+ 1
+ true
+ false
+
+   
+  
+  
+   7
+   false
+   false
+   true
+   true
+   false
+   false
+   false
+   1270
+   1270
+   true
+   true
+   true
+   true
+   true
+   false
+   12632256
+   false
+   Lexmark-E352dn
+   
+
+ cs
+ CZ
+ 
+ 
+ 
+
+
+ de
+ DE
+ 
+ 
+ 
+
+
+ en
+ US
+ 
+ 
+ 
+
+
+ nl
+ NL
+ 
+ 
+ 
+
+   
+   true
+   true
+   3
+   1
+   true
+   1
+   true
+   kQH+/0xleG1hcmstRTM1MmRuQ1VQUzpMZXhtYXJrLUUzNTJkbgAWAAMAtwAIAFZUAAAkbQAASm9iRGF0YSAxCnByaW50ZXI9TGV4bWFyay1FMzUyZG4Kb3JpZW50YXRpb249UG9ydHJhaXQKY29waWVzPTEKY29sbGF0ZT1mYWxzZQptYXJnaW5kYWp1c3RtZW50PTAsMCwwLDAKY29sb3JkZXB0aD0yNApwc2xldmVsPTAKcGRmZGV2aWNlPTEKY29sb3JkZXZpY2U9MApQUERDb250ZXhEYXRhClBhZ2VTaXplOkxldHRlcgAAEgBDT01QQVRfRFVQTEVYX01PREUKAERVUExFWF9PRkY=
+   false
+   0
+  
+ 
+ 
+  
+   http://openoffice.org/2004/office; 
xmlns:xlink="http://www.w3.org/1999/xlink;>
+
+   
+  
+ 
+ 
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+ 
+ 
+  
+   
+   
+  
+  
+   
+  
+  
+   
+
+   Kč
+  
+  
+   
+   -
+   
+
+   Kč
+   
+  
+  
+
+   
+
+  
+  
+
+   (
+   
+   )
+  
+  
+
+   -
+   
+
+  
+  
+   
+
+   
+   
+   
+  
+  
+   
+  
+  
+   
+
+   Kč
+  
+  
+   -
+   
+

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

2016-08-31 Thread Zdeněk Crhonek
 sc/qa/unit/data/functions/fods/count.fods| 3464 
 sc/qa/unit/data/functions/fods/countifs.fods | 4567 +++
 2 files changed, 8031 insertions(+)

New commits:
commit 241c36cf29f4aa11fed8b2f908b12a55627b48b4
Author: Zdeněk Crhonek 
Date:   Wed Aug 31 07:07:55 2016 +0200

add COUNT test case

Change-Id: I0709224de2735c9a1a0ea3c92d091145910ced3e
Reviewed-on: https://gerrit.libreoffice.org/28531
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/qa/unit/data/functions/fods/count.fods 
b/sc/qa/unit/data/functions/fods/count.fods
new file mode 100644
index 000..c05bf4a
--- /dev/null
+++ b/sc/qa/unit/data/functions/fods/count.fods
@@ -0,0 +1,3464 @@
+
+
+http://www.w3.org/1999/xlink; 
xmlns:dc="http://purl.org/dc/elements/1.1/; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:scr
 ipt="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office; 
xmlns:ooow="http://openoffice.org/2004/writer; 
xmlns:oooc="http://openoffice.org/2004/calc; 
xmlns:dom="http://www.w3.org/2001/xml-events; 
xmlns:xforms="http://www.w3.org/2002/xforms; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xmlns:rpt="http://openoffice.org/2005/report; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#; 
xmlns:tableooo="http://openoffice.org/2009/table; 
xmlns:drawooo="http://openoffice.org/2010/draw; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:form
 x="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
+ 
2016-08-31T07:07:31.013068193P0D1LibreOfficeDev/5.3.0.0.alpha0$Linux_X86_64
 
LibreOffice_project/139d3b3e8b157c1f365f888126269f0902acbaa2
+ 
+  
+   0
+   0
+   70493
+   8657
+   
+
+ view1
+ 
+  
+   2
+   8
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   75
+   60
+   true
+   false
+  
+  
+   4
+   19
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   75
+   60
+   true
+   false
+  
+ 
+ Sheet2
+ 1241
+ 0
+ 75
+ 60
+ false
+ true
+ true
+ true
+ 12632256
+ true
+ true
+ true
+ true
+ false
+ false
+ false
+ 1270
+ 1270
+ 1
+ 1
+ true
+ false
+
+   
+  
+  
+   7
+   false
+   false
+   true
+   true
+   false
+   false
+   false
+   1270
+   1270
+   true
+   true
+   true
+   true
+   true
+   false
+   12632256
+   false
+   Lexmark-E352dn
+   
+
+ cs
+ CZ
+ 
+ 
+ 
+
+
+ en
+ US
+ 
+ 
+ 
+
+
+ nl
+ NL
+ 
+ 
+ 
+
+   
+   true
+   true
+   3
+   1
+   true
+   1
+   true
+   kQH+/0xleG1hcmstRTM1MmRuQ1VQUzpMZXhtYXJrLUUzNTJkbgAWAAMAtwAIAFZUAAAkbQAASm9iRGF0YSAxCnByaW50ZXI9TGV4bWFyay1FMzUyZG4Kb3JpZW50YXRpb249UG9ydHJhaXQKY29waWVzPTEKY29sbGF0ZT1mYWxzZQptYXJnaW5kYWp1c3RtZW50PTAsMCwwLDAKY29sb3JkZXB0aD0yNApwc2xldmVsPTAKcGRmZGV2aWNlPTEKY29sb3JkZXZpY2U9MApQUERDb250ZXhEYXRhClBhZ2VTaXplOkxldHRlcgAAEgBDT01QQVRfRFVQTEVYX01PREUKAERVUExFWF9PRkY=
+   false
+   0
+  
+ 
+ 
+  
+   http://openoffice.org/2004/office; 
xmlns:xlink="http://www.w3.org/1999/xlink;>
+
+   
+  
+ 
+ 
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+ 
+ 
+  
+   
+   
+  
+  
+   
+  
+  
+   
+
+   Kč
+  
+  
+   
+   -
+   
+
+   Kč
+   
+  
+  
+
+   
+
+  
+  
+
+   (
+   
+   )
+  
+  
+
+   -
+   
+
+  
+  
+   
+
+   
+   
+   
+  
+  
+   
+  
+  
+   
+
+   Kč
+  
+  
+   -
+   
+
+   Kč
+   
+  
+  
+   
+
+   Kč
+  
+  
+   -
+   
+
+   Kč
+   
+  
+ 

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

2016-08-29 Thread Zdeněk Crhonek
 sc/qa/unit/data/functions/fods/averageifs.fods | 4148 ++
 sc/qa/unit/data/functions/fods/error.type.fods | 7303 +
 2 files changed, 11451 insertions(+)

New commits:
commit 800b9de7b345962599d487c820014845a66da7d9
Author: Zdeněk Crhonek 
Date:   Mon Aug 15 16:04:39 2016 +0200

add AVERAGEIFS test case

Change-Id: Ie4c713f3724ffaa7100e40c469d1e117d0fa277d
Reviewed-on: https://gerrit.libreoffice.org/28146
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/qa/unit/data/functions/fods/averageifs.fods 
b/sc/qa/unit/data/functions/fods/averageifs.fods
new file mode 100644
index 000..0839cc8
--- /dev/null
+++ b/sc/qa/unit/data/functions/fods/averageifs.fods
@@ -0,0 +1,4148 @@
+
+
+http://www.w3.org/1999/xlink; 
xmlns:dc="http://purl.org/dc/elements/1.1/; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:scr
 ipt="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office; 
xmlns:ooow="http://openoffice.org/2004/writer; 
xmlns:oooc="http://openoffice.org/2004/calc; 
xmlns:dom="http://www.w3.org/2001/xml-events; 
xmlns:xforms="http://www.w3.org/2002/xforms; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xmlns:rpt="http://openoffice.org/2005/report; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#; 
xmlns:tableooo="http://openoffice.org/2009/table; 
xmlns:drawooo="http://openoffice.org/2010/draw; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:form
 x="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
+ 
2016-08-15T16:03:33.128100798P0D1LibreOfficeDev/5.3.0.0.alpha0$Linux_X86_64
 
LibreOffice_project/39e300612c97b7742c8d8417d4dc6c0022cfa040
+ 
+  
+   0
+   0
+   82345
+   13093
+   
+
+ view1
+ 
+  
+   2
+   8
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   75
+   60
+   true
+   false
+  
+  
+   2
+   17
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   75
+   60
+   true
+   false
+  
+ 
+ Sheet2
+ 1241
+ 0
+ 75
+ 60
+ false
+ true
+ true
+ true
+ 12632256
+ true
+ true
+ true
+ true
+ false
+ false
+ false
+ 1270
+ 1270
+ 1
+ 1
+ true
+ false
+
+   
+  
+  
+   7
+   false
+   false
+   true
+   true
+   false
+   false
+   false
+   1270
+   1270
+   true
+   true
+   true
+   true
+   true
+   false
+   12632256
+   false
+   Lexmark-E352dn
+   
+
+ cs
+ CZ
+ 
+ 
+ 
+
+
+ en
+ US
+ 
+ 
+ 
+
+
+ nl
+ NL
+ 
+ 
+ 
+
+   
+   true
+   true
+   3
+   1
+   true
+   1
+   true
+   kQH+/0xleG1hcmstRTM1MmRuQ1VQUzpMZXhtYXJrLUUzNTJkbgAWAAMAtwAIAFZUAAAkbQAASm9iRGF0YSAxCnByaW50ZXI9TGV4bWFyay1FMzUyZG4Kb3JpZW50YXRpb249UG9ydHJhaXQKY29waWVzPTEKY29sbGF0ZT1mYWxzZQptYXJnaW5kYWp1c3RtZW50PTAsMCwwLDAKY29sb3JkZXB0aD0yNApwc2xldmVsPTAKcGRmZGV2aWNlPTEKY29sb3JkZXZpY2U9MApQUERDb250ZXhEYXRhClBhZ2VTaXplOkxldHRlcgAAEgBDT01QQVRfRFVQTEVYX01PREUKAERVUExFWF9PRkY=
+   false
+   0
+  
+ 
+ 
+  
+   http://openoffice.org/2004/office; 
xmlns:xlink="http://www.w3.org/1999/xlink;>
+
+   
+  
+ 
+ 
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+ 
+ 
+  
+   
+   
+  
+  
+   
+  
+  
+   
+
+   Kč
+  
+  
+   
+   -
+   
+
+   Kč
+   
+  
+  
+
+   
+
+  
+  
+
+   (
+   
+   )
+  
+  
+
+   -
+   
+
+  
+  
+   
+
+   
+   
+   
+  
+  
+   
+
+   Kč
+  
+  
+   -
+   
+
+   Kč
+   
+  
+  
+   
+
+   Kč
+  
+  
+   -
+   
+   

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

2016-08-26 Thread Zdeněk Crhonek
 sc/qa/unit/data/functions/fods/columns.fods   | 7343 ++
 sc/qa/unit/data/functions/fods/errortype.fods | 7333 +
 2 files changed, 14676 insertions(+)

New commits:
commit a176045f928442e895c5b1ae2eaf71566d5ddc02
Author: Zdeněk Crhonek 
Date:   Thu Aug 25 16:45:10 2016 +0200

add COLUMNS  test case

Change-Id: I411f82576359ba7da9e9f9bda701b7438e542603
Reviewed-on: https://gerrit.libreoffice.org/28391
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/qa/unit/data/functions/fods/columns.fods 
b/sc/qa/unit/data/functions/fods/columns.fods
new file mode 100644
index 000..fa64ba0
--- /dev/null
+++ b/sc/qa/unit/data/functions/fods/columns.fods
@@ -0,0 +1,7343 @@
+
+
+http://www.w3.org/1999/xlink; 
xmlns:dc="http://purl.org/dc/elements/1.1/; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:scr
 ipt="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office; 
xmlns:ooow="http://openoffice.org/2004/writer; 
xmlns:oooc="http://openoffice.org/2004/calc; 
xmlns:dom="http://www.w3.org/2001/xml-events; 
xmlns:xforms="http://www.w3.org/2002/xforms; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xmlns:rpt="http://openoffice.org/2005/report; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#; 
xmlns:tableooo="http://openoffice.org/2009/table; 
xmlns:drawooo="http://openoffice.org/2010/draw; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:form
 x="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
+ 
2016-08-05T15:25:27.468003587P0D1LibreOfficeDev/5.3.0.0.alpha0$Linux_X86_64
 
LibreOffice_project/989e8bc0d792f0dc5778746fac45de129a22d7ac
+ 
+  
+   0
+   0
+   34974
+   13428
+   
+
+ view1
+ 
+  
+   2
+   8
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   80
+   60
+   true
+   false
+  
+  
+   4
+   28
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   80
+   60
+   true
+   false
+  
+ 
+ Sheet2
+ 1241
+ 0
+ 80
+ 60
+ false
+ true
+ true
+ true
+ 12632256
+ true
+ true
+ true
+ true
+ false
+ false
+ false
+ 1270
+ 1270
+ 1
+ 1
+ true
+ false
+
+   
+  
+  
+   7
+   false
+   false
+   true
+   true
+   false
+   false
+   false
+   1270
+   1270
+   true
+   true
+   true
+   true
+   true
+   false
+   12632256
+   false
+   Lexmark-E352dn
+   
+
+ de
+ DE
+ 
+ 
+ 
+
+
+ en
+ US
+ 
+ 
+ 
+
+
+ fr
+ FR
+ 
+ 
+ 
+
+
+ ru
+ RU
+ 
+ 
+ 
+
+   
+   true
+   true
+   3
+   1
+   true
+   1
+   true
+   qQH+/0xleG1hcmstRTM1MmRuQ1VQUzpMZXhtYXJrLUUzNTJkbgAWAAMAzwAEAAhSAAAEdAAASm9iRGF0YSAxCnByaW50ZXI9TGV4bWFyay1FMzUyZG4Kb3JpZW50YXRpb249UG9ydHJhaXQKY29waWVzPTEKY29sbGF0ZT1mYWxzZQptYXJnaW5kYWp1c3RtZW50PTAsMCwwLDAKY29sb3JkZXB0aD0yNApwc2xldmVsPTAKcGRmZGV2aWNlPTEKY29sb3JkZXZpY2U9MApQUERDb250ZXhEYXRhCkR1cGxleDpOb25lAElucHV0U2xvdDpUcmF5MQBQYWdlU2l6ZTpBNAAAEgBDT01QQVRfRFVQTEVYX01PREUKAERVUExFWF9PRkY=
+   false
+   0
+  
+ 
+ 
+  
+   http://openoffice.org/2004/office; 
xmlns:xlink="http://www.w3.org/1999/xlink;>
+
+   
+  
+ 
+ 
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+ 
+ 
+  
+   
+   
+  
+  
+   
+  
+  
+   
+  
+  
+   
+
+   Kč
+  
+  
+   
+   -
+   
+
+   Kč
+   
+  
+  
+$
+   
+
+  
+  
+$(
+   
+   )
+  
+  
+$-
+   
+
+  
+  
+   
+
+   
+   
+   
+  
+  
+   
+  
+  
+   
+  
+  
+   -
+  

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

2016-08-23 Thread Zdeněk Crhonek
 sc/qa/unit/data/functions/fods/chisq.dist.fods | 3751 +
 sc/qa/unit/data/functions/fods/transpose.fods  | 6956 +
 2 files changed, 10707 insertions(+)

New commits:
commit 82e956675743633bad292d74cc50b29c55a57303
Author: Zdeněk Crhonek 
Date:   Mon Aug 22 15:46:44 2016 +0200

add CHISQ.DIST test case

Change-Id: I3b0f04d884583ff2961a7ac8540a19d30fe420eb
Reviewed-on: https://gerrit.libreoffice.org/28321
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/qa/unit/data/functions/fods/chisq.dist.fods 
b/sc/qa/unit/data/functions/fods/chisq.dist.fods
new file mode 100644
index 000..b77e945
--- /dev/null
+++ b/sc/qa/unit/data/functions/fods/chisq.dist.fods
@@ -0,0 +1,3751 @@
+
+
+http://www.w3.org/1999/xlink; 
xmlns:dc="http://purl.org/dc/elements/1.1/; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:scr
 ipt="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office; 
xmlns:ooow="http://openoffice.org/2004/writer; 
xmlns:oooc="http://openoffice.org/2004/calc; 
xmlns:dom="http://www.w3.org/2001/xml-events; 
xmlns:xforms="http://www.w3.org/2002/xforms; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xmlns:rpt="http://openoffice.org/2005/report; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#; 
xmlns:tableooo="http://openoffice.org/2009/table; 
xmlns:drawooo="http://openoffice.org/2010/draw; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:form
 x="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
+ 
2016-08-22T15:45:46.516533253P0D1LibreOfficeDev/5.3.0.0.alpha0$Linux_X86_64
 
LibreOffice_project/989e8bc0d792f0dc5778746fac45de129a22d7ac
+ 
+  
+   0
+   0
+   28134
+   4586
+   
+
+ view1
+ 
+  
+   0
+   1
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   75
+   60
+   true
+   false
+  
+  
+   3
+   18
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   75
+   60
+   true
+   false
+  
+ 
+ Sheet2
+ 1241
+ 0
+ 75
+ 60
+ false
+ true
+ true
+ true
+ 12632256
+ true
+ true
+ true
+ true
+ false
+ false
+ false
+ 1270
+ 1270
+ 1
+ 1
+ true
+ false
+
+   
+  
+  
+   7
+   false
+   false
+   true
+   true
+   false
+   false
+   false
+   1270
+   1270
+   true
+   true
+   true
+   true
+   true
+   false
+   12632256
+   false
+   Lexmark-E352dn
+   
+
+ cs
+ CZ
+ 
+ 
+ 
+
+
+ en
+ US
+ 
+ 
+ 
+
+
+ nl
+ NL
+ 
+ 
+ 
+
+   
+   true
+   true
+   3
+   1
+   true
+   1
+   true
+   kQH+/0xleG1hcmstRTM1MmRuQ1VQUzpMZXhtYXJrLUUzNTJkbgAWAAMAtwAIAFZUAAAkbQAASm9iRGF0YSAxCnByaW50ZXI9TGV4bWFyay1FMzUyZG4Kb3JpZW50YXRpb249UG9ydHJhaXQKY29waWVzPTEKY29sbGF0ZT1mYWxzZQptYXJnaW5kYWp1c3RtZW50PTAsMCwwLDAKY29sb3JkZXB0aD0yNApwc2xldmVsPTAKcGRmZGV2aWNlPTEKY29sb3JkZXZpY2U9MApQUERDb250ZXhEYXRhClBhZ2VTaXplOkxldHRlcgAAEgBDT01QQVRfRFVQTEVYX01PREUKAERVUExFWF9PRkY=
+   false
+   0
+  
+ 
+ 
+  
+   http://openoffice.org/2004/office; 
xmlns:xlink="http://www.w3.org/1999/xlink;>
+
+   
+  
+ 
+ 
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+ 
+ 
+  
+   
+   
+  
+  
+   
+  
+  
+   
+
+   Kč
+  
+  
+   
+   -
+   
+
+   Kč
+   
+  
+  
+
+   
+
+  
+  
+
+   (
+   
+   )
+  
+  
+
+   -
+   
+
+  
+  
+   
+
+   
+   
+   
+  
+  
+   
+  
+  
+   
+
+   Kč
+  
+  
+   -
+   
+
+   Kč
+   
+  
+  
+   
+
+   Kč
+  
+  
+   

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

2016-08-23 Thread Zdeněk Crhonek
 sc/qa/unit/data/functions/fods/binom.dist.fods | 3853 +
 sc/qa/unit/data/functions/fods/binom.inv.fods  | 3840 
 2 files changed, 7693 insertions(+)

New commits:
commit 294a14b6febb95ed8d1136d2abab45833c9d6e1f
Author: Zdeněk Crhonek 
Date:   Tue Aug 16 20:28:19 2016 +0200

add BINOM.DIST test case

Change-Id: Ic17e3f9eddf964d766ba5e3027c8d4e3f38c9fe6
Reviewed-on: https://gerrit.libreoffice.org/28178
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/qa/unit/data/functions/fods/binom.dist.fods 
b/sc/qa/unit/data/functions/fods/binom.dist.fods
new file mode 100644
index 000..817a826
--- /dev/null
+++ b/sc/qa/unit/data/functions/fods/binom.dist.fods
@@ -0,0 +1,3853 @@
+
+
+http://www.w3.org/1999/xlink; 
xmlns:dc="http://purl.org/dc/elements/1.1/; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:scr
 ipt="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office; 
xmlns:ooow="http://openoffice.org/2004/writer; 
xmlns:oooc="http://openoffice.org/2004/calc; 
xmlns:dom="http://www.w3.org/2001/xml-events; 
xmlns:xforms="http://www.w3.org/2002/xforms; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xmlns:rpt="http://openoffice.org/2005/report; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#; 
xmlns:tableooo="http://openoffice.org/2009/table; 
xmlns:drawooo="http://openoffice.org/2010/draw; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:form
 x="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
+ 
2016-08-16T20:27:37.526381219P0D1LibreOfficeDev/5.3.0.0.alpha0$Linux_X86_64
 
LibreOffice_project/93eb0896bc30163dba47e20459dd0d14fb9770f9
+ 
+  
+   0
+   0
+   89632
+   7519
+   
+
+ view1
+ 
+  
+   2
+   8
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   75
+   60
+   true
+   false
+  
+  
+   3
+   17
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   75
+   60
+   true
+   false
+  
+ 
+ Sheet2
+ 1241
+ 0
+ 75
+ 60
+ false
+ true
+ true
+ true
+ 12632256
+ true
+ true
+ true
+ true
+ false
+ false
+ false
+ 1270
+ 1270
+ 1
+ 1
+ true
+ false
+
+   
+  
+  
+   7
+   false
+   false
+   true
+   true
+   false
+   false
+   false
+   1270
+   1270
+   true
+   true
+   true
+   true
+   true
+   false
+   12632256
+   false
+   Lexmark-E352dn
+   
+
+ cs
+ CZ
+ 
+ 
+ 
+
+
+ en
+ US
+ 
+ 
+ 
+
+
+ nl
+ NL
+ 
+ 
+ 
+
+   
+   true
+   true
+   3
+   1
+   true
+   1
+   true
+   kQH+/0xleG1hcmstRTM1MmRuQ1VQUzpMZXhtYXJrLUUzNTJkbgAWAAMAtwAIAFZUAAAkbQAASm9iRGF0YSAxCnByaW50ZXI9TGV4bWFyay1FMzUyZG4Kb3JpZW50YXRpb249UG9ydHJhaXQKY29waWVzPTEKY29sbGF0ZT1mYWxzZQptYXJnaW5kYWp1c3RtZW50PTAsMCwwLDAKY29sb3JkZXB0aD0yNApwc2xldmVsPTAKcGRmZGV2aWNlPTEKY29sb3JkZXZpY2U9MApQUERDb250ZXhEYXRhClBhZ2VTaXplOkxldHRlcgAAEgBDT01QQVRfRFVQTEVYX01PREUKAERVUExFWF9PRkY=
+   false
+   0
+  
+ 
+ 
+  
+   http://openoffice.org/2004/office; 
xmlns:xlink="http://www.w3.org/1999/xlink;>
+
+   
+  
+ 
+ 
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+ 
+ 
+  
+   
+   
+  
+  
+   
+  
+  
+   
+
+   Kč
+  
+  
+   
+   -
+   
+
+   Kč
+   
+  
+  
+
+   
+
+  
+  
+
+   (
+   
+   )
+  
+  
+
+   -
+   
+
+  
+  
+   
+
+   
+   
+   
+  
+  
+   
+  
+  
+   
+
+   Kč
+  
+  
+   -
+   
+
+   Kč
+   
+  
+  
+   
+
+   Kč
+  
+ 

[Libreoffice-commits] core.git: 2 commits - sc/qa sc/source solenv/gbuild solenv/sanitizers

2016-08-17 Thread Caolán McNamara
 sc/qa/unit/subsequent_export-test.cxx |   12 +---
 sc/source/core/tool/interpr1.cxx  |   12 ++--
 sc/source/core/tool/interpr2.cxx  |8 
 solenv/gbuild/CppunitTest.mk  |2 ++
 solenv/sanitizers/ubsan-suppressions  |1 +
 5 files changed, 14 insertions(+), 21 deletions(-)

New commits:
commit f2033c28f4ddb5984fc9b2374486f229f296d5f6
Author: Caolán McNamara 
Date:   Wed Aug 17 13:21:11 2016 +0100

enable password export tests under macosx

gerrit says they build with this cert folder
disable variable in place

Change-Id: Ibf711a01e6c055613c65dd94d85b523e7c8b5acd

diff --git a/sc/qa/unit/subsequent_export-test.cxx 
b/sc/qa/unit/subsequent_export-test.cxx
index 60131bc..8cbb1fa 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -84,14 +84,10 @@ public:
 virtual void setUp() override;
 virtual void tearDown() override;
 
-#if !defined MACOSX && !defined DRAGONFLY
 ScDocShellRef saveAndReloadPassword( ScDocShell*, const OUString&, const 
OUString&, const OUString&, SfxFilterFlags );
-#endif
 
 void test();
-#if !defined MACOSX && !defined DRAGONFLY
 void testPasswordExport();
-#endif
 void testConditionalFormatExportODS();
 void testConditionalFormatExportXLSX();
 void testColorScaleExportODS();
@@ -178,9 +174,7 @@ public:
 
 CPPUNIT_TEST_SUITE(ScExportTest);
 CPPUNIT_TEST(test);
-#if !defined(MACOSX) && !defined(DRAGONFLY)
 CPPUNIT_TEST(testPasswordExport);
-#endif
 CPPUNIT_TEST(testConditionalFormatExportODS);
 CPPUNIT_TEST(testConditionalFormatExportXLSX);
 CPPUNIT_TEST(testColorScaleExportODS);
@@ -294,7 +288,6 @@ void ScExportTest::registerNamespaces(xmlXPathContextPtr& 
pXmlXPathCtx)
 }
 }
 
-#if !defined MACOSX && !defined DRAGONFLY
 ScDocShellRef ScExportTest::saveAndReloadPassword(ScDocShell* pShell, const 
OUString ,
 const OUString , const OUString& rTypeName, SfxFilterFlags 
nFormatType)
 {
@@ -329,7 +322,6 @@ ScDocShellRef 
ScExportTest::saveAndReloadPassword(ScDocShell* pShell, const OUSt
 OUString aPass("test");
 return load(aTempFile.GetURL(), rFilter, rUserData, rTypeName, 
nFormatType, nFormat, SOFFICE_FILEFORMAT_CURRENT, );
 }
-#endif
 
 void ScExportTest::test()
 {
@@ -352,7 +344,6 @@ void ScExportTest::test()
 xDocSh->DoClose();
 }
 
-#if !defined MACOSX && !defined DRAGONFLY
 void ScExportTest::testPasswordExport()
 {
 ScDocShell* pShell = new ScDocShell(
@@ -363,7 +354,7 @@ void ScExportTest::testPasswordExport()
 
 ScDocument& rDoc = pShell->GetDocument();
 
-rDoc.SetValue(0,0,0, 1.0);
+rDoc.SetValue(0, 0, 0, 1.0);
 
 sal_Int32 nFormat = FORMAT_ODS;
 OUString aFilterName(getFileFormats()[nFormat].pFilterName, 
strlen(getFileFormats()[nFormat].pFilterName), RTL_TEXTENCODING_UTF8) ;
@@ -377,7 +368,6 @@ void ScExportTest::testPasswordExport()
 
 xDocSh->DoClose();
 }
-#endif
 
 void ScExportTest::testConditionalFormatExportODS()
 {
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index 5532192..f192b1e 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -21,6 +21,8 @@
 
 # Cap the number of threads unittests use.
 export MAX_CONCURRENCY=4
+# Disable searching for certificates by default
+export MOZILLA_CERTIFICATE_FOLDER=0
 
 gb_CppunitTest_UNITTESTFAILED ?= 
$(GBUILDDIR)/platform/unittest-failed-default.sh
 gb_CppunitTest_PYTHONDEPS ?= $(call gb_Library_get_target,pyuno_wrapper) $(if 
$(SYSTEM_PYTHON),,$(call gb_Package_get_target,python3))
commit 34d7a1d9bf0866b9dddb684e723d9f1e5e9a3697
Author: Caolán McNamara 
Date:   Wed Aug 17 15:10:59 2016 +0100

revert div by 0 ubsan hackarounds now

Change-Id: I6497a87d3071f91d5465033d2dc6ecafaa6461f4

Revert "use div() instead of /0 to content ubsan"

This reverts commit fa293f7d6792a2beab048461c8a067e9ca980bb8.

Revert "use div() instead of /0 to content ubsan"

This reverts commit e043cce9a48c1e4f4dd232a58de64f03d1d3919f.

Revert "use div() instead of /0 to content ubsan"

This reverts commit ebe04c075649c677b55941e3b4e57fbca150b5db.

Revert "use div() instead of /0 to content ubsan"

This reverts commit fb2c146752074b132d665e40343a08dcb2e6672e.

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index bec54db..52db341 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -1697,7 +1697,7 @@ void ScInterpreter::ScTan()
 
 void ScInterpreter::ScCot()
 {
-PushDouble(div(1.0, ::rtl::math::tan(GetDouble(;
+PushDouble(1.0 / ::rtl::math::tan(GetDouble()));
 }
 
 void ScInterpreter::ScArcSin()
@@ -1737,7 +1737,7 @@ void ScInterpreter::ScTanHyp()
 
 void ScInterpreter::ScCotHyp()
 {
-PushDouble(div(1.0, tanh(GetDouble(;
+PushDouble(1.0 / tanh(GetDouble()));
 }
 
 void 

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

2016-08-03 Thread Eike Rathke
 sc/qa/unit/ucalc_formula.cxx |4 
 sc/source/core/tool/interpr4.cxx |   18 +++---
 2 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit 1b6caaeb7a323e91b6f6e2f3612a3bdc0a09fb45
Author: Eike Rathke 
Date:   Wed Aug 3 21:50:20 2016 +0200

disable unit test for tdf#100637 until fixed again

Change-Id: I5f5b442534585bdb69878d8790fb887dd65f0ccd

diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index b2bfb37..f5f65bf 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -3926,6 +3926,9 @@ void Test::testFuncIF()
 m_pDoc->SetValue(ScAddress(1,0,0), 3.0);
 CPPUNIT_ASSERT_EQUAL(OUString("not two"), 
m_pDoc->GetString(ScAddress(0,0,0)));
 
+/* FIXME: temporarily disabled because e54cd3fbf40300416ef337981bd356b88ad44a41
+ * reverted; reactivate when fixed again. */
+#if 0
 // Test nested IF in array/matrix.
 ScMarkData aMark;
 aMark.SelectOneTable(0);
@@ -3933,6 +3936,7 @@ void Test::testFuncIF()
 // Results must be 23 and 42.
 CPPUNIT_ASSERT_EQUAL(23.0, m_pDoc->GetValue(ScAddress(0,2,0)));
 CPPUNIT_ASSERT_EQUAL(42.0, m_pDoc->GetValue(ScAddress(1,2,0)));
+#endif
 
 m_pDoc->DeleteTab(0);
 }
commit 3efcfc63eec7a75545e4f01fd15448744ad651fa
Author: Eike Rathke 
Date:   Wed Aug 3 21:41:38 2016 +0200

Revert "Resolves: tdf#100637 narrow down the JumpMatrix path finish 
condition"

This reverts commit e54cd3fbf40300416ef337981bd356b88ad44a41.

It breaks other nested array IF expressions.

diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 8c4dd5c..9f64ea0 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -4369,18 +4369,14 @@ StackVar ScInterpreter::Interpret()
 {
 if (nLevel == 1)
 aErrorFunctionStack.push( nErrorFunction);
-// Restrict nLevel==1 to not prematurely discard a path result.
-if (nLevel == 2 || (!aCode.HasStacked() || 
aCode.IsEndOfPath()))
+bGotResult = JumpMatrix( nLevel );
+if (aErrorFunctionStack.empty())
+assert(!"ScInterpreter::Interpret - aErrorFunctionStack 
empty in JumpMatrix context");
+else
 {
-bGotResult = JumpMatrix( nLevel );
-if (aErrorFunctionStack.empty())
-assert(!"ScInterpreter::Interpret - 
aErrorFunctionStack empty in JumpMatrix context");
-else
-{
-nErrorFunction = aErrorFunctionStack.top();
-if (bGotResult)
-aErrorFunctionStack.pop();
-}
+nErrorFunction = aErrorFunctionStack.top();
+if (bGotResult)
+aErrorFunctionStack.pop();
 }
 }
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-07-28 Thread Markus Mohrhard
 sc/qa/unit/subsequent_export-test.cxx  |5 +
 sc/source/filter/excel/xetable.cxx |   27 ---
 sc/source/filter/inc/xetable.hxx   |6 +-
 sc/source/filter/oox/worksheetfragment.cxx |5 +
 4 files changed, 39 insertions(+), 4 deletions(-)

New commits:
commit 4b3484b1fce510e53eb8ee587616b107ad477511
Author: Markus Mohrhard 
Date:   Thu Jul 28 16:57:10 2016 +0200

use n prefix for numeric variable

Change-Id: I70a7b10d46cdafc4dd59f8fc046587a6219a2218

diff --git a/sc/source/filter/excel/xetable.cxx 
b/sc/source/filter/excel/xetable.cxx
index d1b731e..69ef932 100644
--- a/sc/source/filter/excel/xetable.cxx
+++ b/sc/source/filter/excel/xetable.cxx
@@ -1670,7 +1670,7 @@ XclExpColinfoBuffer::XclExpColinfoBuffer( const 
XclExpRoot& rRoot ) :
 XclExpRoot( rRoot ),
 maDefcolwidth( rRoot ),
 maOutlineBfr( rRoot ),
-maHighestOutlineLevel( 0 )
+mnHighestOutlineLevel( 0 )
 {
 }
 
@@ -1680,9 +1680,9 @@ void XclExpColinfoBuffer::Initialize( SCROW nLastScRow )
 for( sal_uInt16 nScCol = 0, nLastScCol = GetMaxPos().Col(); nScCol <= 
nLastScCol; ++nScCol )
 {
 maColInfos.AppendNewRecord( new XclExpColinfo( GetRoot(), nScCol, 
nLastScRow, maOutlineBfr ) );
-if( maOutlineBfr.GetLevel() > maHighestOutlineLevel )
+if( maOutlineBfr.GetLevel() > mnHighestOutlineLevel )
 {
-   maHighestOutlineLevel = maOutlineBfr.GetLevel();
+   mnHighestOutlineLevel = maOutlineBfr.GetLevel();
 }
 }
 }
@@ -2102,7 +2102,7 @@ XclExpRowBuffer::XclExpRowBuffer( const XclExpRoot& rRoot 
) :
 XclExpRoot( rRoot ),
 maOutlineBfr( rRoot ),
 maDimensions( rRoot ),
-maHighestOutlineLevel( 0 )
+mnHighestOutlineLevel( 0 )
 {
 }
 
@@ -2351,9 +2351,9 @@ XclExpRow& XclExpRowBuffer::GetOrCreateRow( sal_uInt32 
nXclRow, bool bRowAlwaysE
  ( maOutlineBfr.GetLevel() != 0 ) ||
  ( rDoc.RowHidden(nFrom, nScTab) ) )
 {
-if( maOutlineBfr.GetLevel() > maHighestOutlineLevel )
+if( maOutlineBfr.GetLevel() > mnHighestOutlineLevel )
 {
-maHighestOutlineLevel = maOutlineBfr.GetLevel();
+mnHighestOutlineLevel = maOutlineBfr.GetLevel();
 }
 RowRef p(new XclExpRow(GetRoot(), nFrom, maOutlineBfr, 
bRowAlwaysEmpty));
 maRowMap.insert(RowMap::value_type(nFrom, p));
diff --git a/sc/source/filter/inc/xetable.hxx b/sc/source/filter/inc/xetable.hxx
index 25ad278..c932be2 100644
--- a/sc/source/filter/inc/xetable.hxx
+++ b/sc/source/filter/inc/xetable.hxx
@@ -770,7 +770,7 @@ public:
 /** Writes all COLINFO records of this buffer. */
 virtual voidSave( XclExpStream& rStrm ) override;
 virtual voidSaveXml( XclExpXmlStream& rStrm ) override;
-sal_uInt8   GetHighestOutlineLevel() { return 
maHighestOutlineLevel; }
+sal_uInt8   GetHighestOutlineLevel() { return 
mnHighestOutlineLevel; }
 
 private:
 typedef XclExpRecordList< XclExpColinfo >   XclExpColinfoList;
@@ -779,7 +779,7 @@ private:
 XclExpColinfoList   maColInfos; /// List of COLINFO records.
 XclExpDefcolwidth   maDefcolwidth;  /// The DEFCOLWIDTH record.
 XclExpColOutlineBuffer maOutlineBfr;/// Buffer for column outline 
groups.
-sal_uInt8   maHighestOutlineLevel; /// Highest number of outline 
levels for columns in sheet.
+sal_uInt8   mnHighestOutlineLevel; /// Highest number of outline 
levels for columns in sheet.
 };
 
 class XclExpRow;
@@ -931,7 +931,7 @@ public:
 virtual voidSaveXml( XclExpXmlStream& rStrm ) override;
 
 XclExpDimensions&   GetDimensions() { return maDimensions; }
-sal_uInt8   GetHighestOutlineLevel() { return 
maHighestOutlineLevel; }
+sal_uInt8   GetHighestOutlineLevel() { return 
mnHighestOutlineLevel; }
 
 private:
 /** Returns access to the specified ROW record. Inserts preceding missing 
ROW records.
@@ -946,7 +946,7 @@ private:
 RowMap  maRowMap;
 XclExpRowOutlineBuffer maOutlineBfr;/// Buffer for row outline groups.
 XclExpDimensionsmaDimensions;   /// DIMENSIONS record for used 
area.
-sal_uInt8   maHighestOutlineLevel; /// Highest number of outline 
levels for rows in sheet.
+sal_uInt8   mnHighestOutlineLevel; /// Highest number of outline 
levels for rows in sheet.
 };
 
 // Cell Table
commit ad121df71ad463bed8caf147d27f020b548f0862
Author: Bartosz Kosiorek 
Date:   Tue Jul 26 18:14:30 2016 +0200

tdf#101135 FILESAVE .xlsx Save XML_outlineLevelRow, XML_outlineLevelCol keys

In .xlsx, the XML_outlineLevelRow and XML_outlineLevelCol keys
are required for Microsoft Office365 application
to properly displaying Outline values.

Change-Id: 

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

2016-07-21 Thread Zdeněk Crhonek
 sc/qa/unit/data/functions/fods/cumipmt.fods   | 1644 +++
 sc/qa/unit/data/functions/fods/floor.xcl.fods | 2740 ++
 2 files changed, 4384 insertions(+)

New commits:
commit 2fda60fde16343b5ef72ec003cdfdffdc3f1a8ab
Author: Zdeněk Crhonek 
Date:   Thu Jul 21 19:32:16 2016 +0200

add CUMIPMT test case

Change-Id: I31facf9db659ded918377ef0ba28bcd1d715eb9f
Reviewed-on: https://gerrit.libreoffice.org/27404
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/qa/unit/data/functions/fods/cumipmt.fods 
b/sc/qa/unit/data/functions/fods/cumipmt.fods
new file mode 100644
index 000..22b0a02
--- /dev/null
+++ b/sc/qa/unit/data/functions/fods/cumipmt.fods
@@ -0,0 +1,1644 @@
+
+
+http://www.w3.org/1999/xlink; 
xmlns:dc="http://purl.org/dc/elements/1.1/; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:scr
 ipt="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office; 
xmlns:ooow="http://openoffice.org/2004/writer; 
xmlns:oooc="http://openoffice.org/2004/calc; 
xmlns:dom="http://www.w3.org/2001/xml-events; 
xmlns:xforms="http://www.w3.org/2002/xforms; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xmlns:rpt="http://openoffice.org/2005/report; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#; 
xmlns:tableooo="http://openoffice.org/2009/table; 
xmlns:drawooo="http://openoffice.org/2010/draw; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:form
 x="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
+ 
2016-06-22T20:50:52.93600P0D1LibreOfficeDev/5.3.0.0.alpha0$Linux_X86_64
 
LibreOffice_project/a2c557d80ac68c06ea59586245a7431e061938f0
+ 
+  
+   0
+   0
+   38833
+   13454
+   
+
+ view1
+ 
+  
+   1
+   8
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   90
+   60
+   true
+   false
+  
+  
+   4
+   18
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   1
+   0
+   90
+   60
+   true
+   false
+  
+ 
+ Sheet2
+ 1241
+ 0
+ 90
+ 60
+ false
+ true
+ true
+ true
+ 12632256
+ true
+ true
+ true
+ true
+ false
+ false
+ false
+ 1270
+ 1270
+ 1
+ 1
+ true
+ false
+
+   
+  
+  
+   7
+   false
+   false
+   true
+   true
+   false
+   false
+   false
+   1270
+   1270
+   true
+   true
+   true
+   true
+   true
+   false
+   12632256
+   false
+   Lexmark-E352dn
+   
+
+ cs
+ CZ
+ 
+ 
+ 
+
+
+ en
+ US
+ 
+ 
+ 
+
+
+ nl
+ NL
+ 
+ 
+ 
+
+   
+   true
+   true
+   3
+   1
+   true
+   1
+   true
+   qQH+/0xleG1hcmstRTM1MmRuQ1VQUzpMZXhtYXJrLUUzNTJkbgAWAAMAzwAEAAhSAAAEdAAASm9iRGF0YSAxCnByaW50ZXI9TGV4bWFyay1FMzUyZG4Kb3JpZW50YXRpb249UG9ydHJhaXQKY29waWVzPTEKY29sbGF0ZT1mYWxzZQptYXJnaW5kYWp1c3RtZW50PTAsMCwwLDAKY29sb3JkZXB0aD0yNApwc2xldmVsPTAKcGRmZGV2aWNlPTEKY29sb3JkZXZpY2U9MApQUERDb250ZXhEYXRhClBhZ2VTaXplOkE0AElucHV0U2xvdDpUcmF5MQBEdXBsZXg6Tm9uZQAAEgBDT01QQVRfRFVQTEVYX01PREUKAERVUExFWF9PRkY=
+   false
+   0
+  
+ 
+ 
+  
+   http://openoffice.org/2004/office; 
xmlns:xlink="http://www.w3.org/1999/xlink;>
+
+   
+  
+ 
+ 
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+ 
+ 
+  
+   
+   
+  
+  
+   
+  
+  
+   
+
+   Kč
+  
+  
+   
+   -
+   
+
+   Kč
+   
+  
+  
+
+
+   
+
+  
+  
+
+
+   (
+   
+   )
+  
+  
+
+
+   -
+   
+
+  
+  
+   
+
+   
+   
+   
+  
+  
+   £
+   
+  
+  
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+  

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

2016-06-23 Thread Zdeněk Crhonek
 sc/qa/unit/data/functions/fods/coupdaybs.fods | 1810 ++
 sc/qa/unit/data/functions/fods/ddb.fods   | 1724 
 2 files changed, 3534 insertions(+)

New commits:
commit e36a3a4ef429036b580a6ae53902d8426073d9b6
Author: Zdeněk Crhonek 
Date:   Wed Jun 22 22:40:54 2016 +0200

add COUPDAYBS test case

Change-Id: I12e3a7f8abe7b0c3ed5af1cdf512bbdcd4dc7f3f
Reviewed-on: https://gerrit.libreoffice.org/26579
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/qa/unit/data/functions/fods/coupdaybs.fods 
b/sc/qa/unit/data/functions/fods/coupdaybs.fods
new file mode 100644
index 000..e1efde7
--- /dev/null
+++ b/sc/qa/unit/data/functions/fods/coupdaybs.fods
@@ -0,0 +1,1810 @@
+
+
+http://www.w3.org/1999/xlink; 
xmlns:dc="http://purl.org/dc/elements/1.1/; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:scr
 ipt="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office; 
xmlns:ooow="http://openoffice.org/2004/writer; 
xmlns:oooc="http://openoffice.org/2004/calc; 
xmlns:dom="http://www.w3.org/2001/xml-events; 
xmlns:xforms="http://www.w3.org/2002/xforms; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xmlns:rpt="http://openoffice.org/2005/report; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#; 
xmlns:tableooo="http://openoffice.org/2009/table; 
xmlns:drawooo="http://openoffice.org/2010/draw; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:form
 x="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
+ 
2016-06-22T22:40:29.759980062P0D1LibreOfficeDev/5.2.0.0.alpha1$Linux_X86_64
 
LibreOffice_project/fa9416906e615f5f19ad8524176d2ed693662769
+ 
+  
+   0
+   0
+   34873
+   10810
+   
+
+ view1
+ 
+  
+   2
+   11
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   90
+   60
+   true
+  
+  
+   3
+   13
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   90
+   60
+   true
+  
+ 
+ Sheet2
+ 1241
+ 0
+ 90
+ 60
+ false
+ true
+ true
+ true
+ 12632256
+ true
+ true
+ true
+ true
+ false
+ false
+ false
+ 1270
+ 1270
+ 1
+ 1
+ true
+
+   
+  
+  
+   7
+   false
+   false
+   true
+   true
+   false
+   false
+   false
+   1270
+   1270
+   true
+   true
+   true
+   true
+   true
+   false
+   12632256
+   false
+   Lexmark-E352dn
+   
+
+ cs
+ CZ
+ 
+ 
+ 
+
+
+ en
+ US
+ 
+ 
+ 
+
+
+ nl
+ NL
+ 
+ 
+ 
+
+   
+   true
+   true
+   3
+   1
+   true
+   1
+   true
+   jQH+/0xleG1hcmstRTM1MmRuQ1VQUzpMZXhtYXJrLUUzNTJkbgAWAAMAswAEAAhSAAAEdAAASm9iRGF0YSAxCnByaW50ZXI9TGV4bWFyay1FMzUyZG4Kb3JpZW50YXRpb249UG9ydHJhaXQKY29waWVzPTEKY29sbGF0ZT1mYWxzZQptYXJnaW5kYWp1c3RtZW50PTAsMCwwLDAKY29sb3JkZXB0aD0yNApwc2xldmVsPTAKcGRmZGV2aWNlPTEKY29sb3JkZXZpY2U9MApQUERDb250ZXhEYXRhClBhZ2VTaXplOkE0AAASAENPTVBBVF9EVVBMRVhfTU9ERQoARFVQTEVYX09GRg==
+   false
+   0
+  
+ 
+ 
+  
+   http://openoffice.org/2004/office; 
xmlns:xlink="http://www.w3.org/1999/xlink;>
+
+   
+  
+ 
+ 
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+ 
+ 
+  
+   
+   
+  
+  
+   
+  
+  
+   
+
+   Kč
+  
+  
+   
+   -
+   
+
+   Kč
+   
+  
+  
+
+
+   
+
+  
+  
+
+
+   (
+   
+   )
+  
+  
+
+
+   -
+   
+
+  
+  
+   
+
+   
+   
+   
+  
+  
+   £
+   
+  
+  
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   
+   

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

2016-06-19 Thread Zdeněk Crhonek
 sc/qa/unit/data/functions/fods/type.fods| 2021 
 sc/qa/unit/data/functions/fods/workday.fods | 1066 ++
 2 files changed, 3087 insertions(+)

New commits:
commit dd9843b51aac32e2baca0c3b8d3896ad1d0f93ab
Author: Zdeněk Crhonek 
Date:   Sun Jun 19 15:20:09 2016 +0200

add TYPE test case

Change-Id: I1fec7355de2ab67251ae39dd5ba1d06f30779910
Reviewed-on: https://gerrit.libreoffice.org/26476
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/qa/unit/data/functions/fods/type.fods 
b/sc/qa/unit/data/functions/fods/type.fods
new file mode 100644
index 000..160ba33
--- /dev/null
+++ b/sc/qa/unit/data/functions/fods/type.fods
@@ -0,0 +1,2021 @@
+
+
+http://www.w3.org/1999/xlink; 
xmlns:dc="http://purl.org/dc/elements/1.1/; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:scr
 ipt="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office; 
xmlns:ooow="http://openoffice.org/2004/writer; 
xmlns:oooc="http://openoffice.org/2004/calc; 
xmlns:dom="http://www.w3.org/2001/xml-events; 
xmlns:xforms="http://www.w3.org/2002/xforms; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xmlns:rpt="http://openoffice.org/2005/report; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#; 
xmlns:tableooo="http://openoffice.org/2009/table; 
xmlns:drawooo="http://openoffice.org/2010/draw; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:form
 x="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
+ 
2016-06-10T20:02:06.652576343P0D1LibreOfficeDev/5.3.0.0.alpha0$Linux_X86_64
 
LibreOffice_project/131e604073f89e6c1dd54be88b94b7befd881f2e
+ 
+  
+   0
+   0
+   22009
+   4261
+   
+
+ view1
+ 
+  
+   2
+   8
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   100
+   60
+   true
+  
+  
+   0
+   15
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   100
+   60
+   true
+  
+ 
+ Sheet2
+ 1241
+ 0
+ 100
+ 60
+ false
+ true
+ true
+ true
+ 12632256
+ true
+ true
+ true
+ true
+ false
+ false
+ false
+ 1270
+ 1270
+ 1
+ 1
+ true
+
+   
+  
+  
+   7
+   false
+   false
+   true
+   true
+   false
+   false
+   false
+   1270
+   1270
+   true
+   true
+   true
+   true
+   true
+   false
+   12632256
+   false
+   Lexmark-E352dn
+   
+
+ en
+ US
+ 
+ 
+ 
+
+   
+   true
+   true
+   3
+   1
+   true
+   1
+   true
+   qQH+/0xleG1hcmstRTM1MmRuQ1VQUzpMZXhtYXJrLUUzNTJkbgAWAAMAzwAEAAhSAAAEdAAASm9iRGF0YSAxCnByaW50ZXI9TGV4bWFyay1FMzUyZG4Kb3JpZW50YXRpb249UG9ydHJhaXQKY29waWVzPTEKY29sbGF0ZT1mYWxzZQptYXJnaW5kYWp1c3RtZW50PTAsMCwwLDAKY29sb3JkZXB0aD0yNApwc2xldmVsPTAKcGRmZGV2aWNlPTEKY29sb3JkZXZpY2U9MApQUERDb250ZXhEYXRhCkR1cGxleDpOb25lAElucHV0U2xvdDpUcmF5MQBQYWdlU2l6ZTpBNAAAEgBDT01QQVRfRFVQTEVYX01PREUKAERVUExFWF9PRkY=
+   false
+   0
+  
+ 
+ 
+  
+   http://openoffice.org/2004/office; 
xmlns:xlink="http://www.w3.org/1999/xlink;>
+
+   
+  
+ 
+ 
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+ 
+ 
+  
+   
+   
+  
+  
+   
+  
+  
+   
+
+   Kč
+  
+  
+   
+   -
+   
+
+   Kč
+   
+  
+  
+   £
+   
+  
+  
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   
+   -
+   £
+   
+   
+  
+  
+   
+
+  
+  
+   (
+   
+   )
+   
+  
+  
+   
+
+  
+  
+   (
+   
+   )
+   
+  
+  
+   £

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

2016-06-19 Thread Zdeněk Crhonek
 sc/qa/unit/data/functions/fods/isblank.fods | 1961 
 sc/qa/unit/data/functions/fods/istext.fods  | 1907 +++
 2 files changed, 3868 insertions(+)

New commits:
commit 92726cafb610b73976e750195b380d665326b57a
Author: Zdeněk Crhonek 
Date:   Fri Jun 17 23:41:06 2016 +0200

add ISBLANK test case

Change-Id: I41d5e39d30fdf92fe2df86fc7f02b98f7ec7ef74
Reviewed-on: https://gerrit.libreoffice.org/26446
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/qa/unit/data/functions/fods/isblank.fods 
b/sc/qa/unit/data/functions/fods/isblank.fods
new file mode 100644
index 000..ea360d2
--- /dev/null
+++ b/sc/qa/unit/data/functions/fods/isblank.fods
@@ -0,0 +1,1961 @@
+
+
+http://www.w3.org/1999/xlink; 
xmlns:dc="http://purl.org/dc/elements/1.1/; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:scr
 ipt="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office; 
xmlns:ooow="http://openoffice.org/2004/writer; 
xmlns:oooc="http://openoffice.org/2004/calc; 
xmlns:dom="http://www.w3.org/2001/xml-events; 
xmlns:xforms="http://www.w3.org/2002/xforms; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xmlns:rpt="http://openoffice.org/2005/report; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#; 
xmlns:tableooo="http://openoffice.org/2009/table; 
xmlns:drawooo="http://openoffice.org/2010/draw; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:form
 x="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
+ 
2016-06-10T20:02:06.652576343P0D1LibreOfficeDev/5.3.0.0.alpha0$Linux_X86_64
 
LibreOffice_project/29e91d5eedd2bf20504ce9ada625d33fec19dc9e
+ 
+  
+   0
+   0
+   32333
+   7224
+   
+
+ view1
+ 
+  
+   2
+   8
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   100
+   60
+   true
+  
+  
+   4
+   16
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   100
+   60
+   true
+  
+ 
+ Sheet2
+ 1241
+ 0
+ 100
+ 60
+ false
+ true
+ true
+ true
+ 12632256
+ true
+ true
+ true
+ true
+ false
+ false
+ false
+ 1270
+ 1270
+ 1
+ 1
+ true
+
+   
+  
+  
+   7
+   false
+   false
+   true
+   true
+   false
+   false
+   false
+   1270
+   1270
+   true
+   true
+   true
+   true
+   true
+   false
+   12632256
+   false
+   Lexmark-E352dn
+   
+
+ en
+ US
+ 
+ 
+ 
+
+   
+   true
+   true
+   3
+   1
+   true
+   1
+   true
+   qQH+/0xleG1hcmstRTM1MmRuQ1VQUzpMZXhtYXJrLUUzNTJkbgAWAAMAzwAEAAhSAAAEdAAASm9iRGF0YSAxCnByaW50ZXI9TGV4bWFyay1FMzUyZG4Kb3JpZW50YXRpb249UG9ydHJhaXQKY29waWVzPTEKY29sbGF0ZT1mYWxzZQptYXJnaW5kYWp1c3RtZW50PTAsMCwwLDAKY29sb3JkZXB0aD0yNApwc2xldmVsPTAKcGRmZGV2aWNlPTEKY29sb3JkZXZpY2U9MApQUERDb250ZXhEYXRhClBhZ2VTaXplOkE0AElucHV0U2xvdDpUcmF5MQBEdXBsZXg6Tm9uZQAAEgBDT01QQVRfRFVQTEVYX01PREUKAERVUExFWF9PRkY=
+   false
+   0
+  
+ 
+ 
+  
+   http://openoffice.org/2004/office; 
xmlns:xlink="http://www.w3.org/1999/xlink;>
+
+   
+  
+ 
+ 
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+ 
+ 
+  
+   
+   
+  
+  
+   
+  
+  
+   
+
+   Kč
+  
+  
+   
+   -
+   
+
+   Kč
+   
+  
+  
+   £
+   
+  
+  
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   
+   -
+   £
+   
+   
+  
+  
+   
+
+  
+  
+   (
+   
+   )
+   
+  
+  
+   
+
+  
+  
+   (
+   
+ 

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

2016-06-19 Thread Zdeněk Crhonek
 sc/qa/unit/data/functions/fods/iserr.fods | 1974 +
 sc/qa/unit/data/functions/fods/isref.fods | 2001 ++
 2 files changed, 3975 insertions(+)

New commits:
commit b81a1f0aa7efa6c47d03afb7a68c7ad38d506b17
Author: Zdeněk Crhonek 
Date:   Sun Jun 19 12:31:14 2016 +0200

add ISREF test case

Change-Id: I615e248b0f1e4325bf4b52c42ee889995da44a0a
Reviewed-on: https://gerrit.libreoffice.org/26472
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/qa/unit/data/functions/fods/isref.fods 
b/sc/qa/unit/data/functions/fods/isref.fods
new file mode 100644
index 000..a81f1f0
--- /dev/null
+++ b/sc/qa/unit/data/functions/fods/isref.fods
@@ -0,0 +1,2001 @@
+
+
+http://www.w3.org/1999/xlink; 
xmlns:dc="http://purl.org/dc/elements/1.1/; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:scr
 ipt="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office; 
xmlns:ooow="http://openoffice.org/2004/writer; 
xmlns:oooc="http://openoffice.org/2004/calc; 
xmlns:dom="http://www.w3.org/2001/xml-events; 
xmlns:xforms="http://www.w3.org/2002/xforms; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xmlns:rpt="http://openoffice.org/2005/report; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#; 
xmlns:tableooo="http://openoffice.org/2009/table; 
xmlns:drawooo="http://openoffice.org/2010/draw; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:form
 x="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
+ 
2016-06-10T20:02:06.652576343P0D1LibreOfficeDev/5.3.0.0.alpha0$Linux_X86_64
 
LibreOffice_project/131e604073f89e6c1dd54be88b94b7befd881f2e
+ 
+  
+   0
+   0
+   32333
+   4967
+   
+
+ view1
+ 
+  
+   2
+   8
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   100
+   60
+   true
+  
+  
+   3
+   10
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   100
+   60
+   true
+  
+ 
+ Sheet2
+ 1241
+ 0
+ 100
+ 60
+ false
+ true
+ true
+ true
+ 12632256
+ true
+ true
+ true
+ true
+ false
+ false
+ false
+ 1270
+ 1270
+ 1
+ 1
+ true
+
+   
+  
+  
+   7
+   false
+   false
+   true
+   true
+   false
+   false
+   false
+   1270
+   1270
+   true
+   true
+   true
+   true
+   true
+   false
+   12632256
+   false
+   Lexmark-E352dn
+   
+
+ en
+ US
+ 
+ 
+ 
+
+   
+   true
+   true
+   3
+   1
+   true
+   1
+   true
+   qQH+/0xleG1hcmstRTM1MmRuQ1VQUzpMZXhtYXJrLUUzNTJkbgAWAAMAzwAEAAhSAAAEdAAASm9iRGF0YSAxCnByaW50ZXI9TGV4bWFyay1FMzUyZG4Kb3JpZW50YXRpb249UG9ydHJhaXQKY29waWVzPTEKY29sbGF0ZT1mYWxzZQptYXJnaW5kYWp1c3RtZW50PTAsMCwwLDAKY29sb3JkZXB0aD0yNApwc2xldmVsPTAKcGRmZGV2aWNlPTEKY29sb3JkZXZpY2U9MApQUERDb250ZXhEYXRhCkR1cGxleDpOb25lAElucHV0U2xvdDpUcmF5MQBQYWdlU2l6ZTpBNAAAEgBDT01QQVRfRFVQTEVYX01PREUKAERVUExFWF9PRkY=
+   false
+   0
+  
+ 
+ 
+  
+   http://openoffice.org/2004/office; 
xmlns:xlink="http://www.w3.org/1999/xlink;>
+
+   
+  
+ 
+ 
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+ 
+ 
+  
+   
+   
+  
+  
+   
+  
+  
+   
+
+   Kč
+  
+  
+   
+   -
+   
+
+   Kč
+   
+  
+  
+   £
+   
+  
+  
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   
+   -
+   £
+   
+   
+  
+  
+   
+
+  
+  
+   (
+   
+   )
+   
+  
+  
+   
+
+  
+  
+   (
+   
+   )
+   

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

2016-06-19 Thread Pranav Kant
 sc/qa/unit/tiledrendering/tiledrendering.cxx |   26 --
 1 file changed, 24 insertions(+), 2 deletions(-)

New commits:
commit 5bf9c67fa14e8b3c30e6ca7afc414414b4eb3ad6
Author: Pranav Kant 
Date:   Sun Jun 19 19:27:36 2016 +0530

sc lok: Unit test for empty column selection

Make sure newline characters are not copied, fixed in
82ed95b7554cfa3b5e98f67cc53c6219e3a09886

Change-Id: Ic8d45ba44c1092d733bed4afc049463e546d10d9

diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index 8389f16..9ae9f01 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -52,6 +52,7 @@ public:
 void testSortAscendingDescending();
 void testPartHash();
 void testDocumentSize();
+void testEmptyColumnSelection();
 #endif
 
 CPPUNIT_TEST_SUITE(ScTiledRenderingTest);
@@ -60,6 +61,7 @@ public:
 CPPUNIT_TEST(testSortAscendingDescending);
 CPPUNIT_TEST(testPartHash);
 CPPUNIT_TEST(testDocumentSize);
+CPPUNIT_TEST(testEmptyColumnSelection);
 #endif
 CPPUNIT_TEST_SUITE_END();
 
@@ -336,6 +338,28 @@ void ScTiledRenderingTest::testDocumentSize()
 comphelper::LibreOfficeKit::setActive(false);
 }
 
+void ScTiledRenderingTest::testEmptyColumnSelection()
+{
+comphelper::LibreOfficeKit::setActive();
+ScModelObj* pModelObj = createDoc("select-row-cols.ods");
+uno::Sequence aArgs(2);
+
+// Select empty column, 1000
+aArgs[0].Name = OUString::fromUtf8("Col");
+aArgs[0].Value <<= static_cast(1000 - 1);
+aArgs[1].Name = OUString::fromUtf8("Modifier");
+aArgs[1].Value <<= static_cast(0);
+comphelper::dispatchCommand(".uno:SelectColumn", aArgs);
+
+// Get plain selection
+OString aUsedMimeType;
+OString aResult = pModelObj->getTextSelection("text/plain;charset=utf-8", 
aUsedMimeType);
+// should be an empty string
+CPPUNIT_ASSERT_EQUAL(OString(), aResult);
+
+comphelper::LibreOfficeKit::setActive(false);
+}
+
 #endif
 
 CPPUNIT_TEST_SUITE_REGISTRATION(ScTiledRenderingTest);
commit 3960e15735a7defb19d921bb7b861b59e7b9548c
Author: Pranav Kant 
Date:   Sun Jun 19 19:11:59 2016 +0530

sc lok: Remove useless comment/code

Change-Id: I69a0c2b6810b38de5de94eb9789839a4d6de8d87

diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index 168987c..8389f16 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -163,8 +163,6 @@ void ScTiledRenderingTest::testRowColumnSelections()
 {
 comphelper::LibreOfficeKit::setActive();
 ScModelObj* pModelObj = createDoc("select-row-cols.ods");
-//ScDocument* pDoc = pModelObj->GetDocument();
-
 uno::Sequence aArgs(2);
 
 // Select the 5th row with no modifier
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-19 Thread Zdeněk Crhonek
 sc/qa/unit/data/functions/fods/isna.fods  | 1965 ++
 sc/qa/unit/data/functions/fods/isnontext.fods | 1899 +
 2 files changed, 3864 insertions(+)

New commits:
commit 2ae269e0845c8644a9b8333cc5f41cdd3d887cde
Author: Zdeněk Crhonek 
Date:   Sun Jun 19 09:44:36 2016 +0200

add ISNONTEXT test case

Change-Id: I752f159bb2b48062eb2b529aa651259d9be4ce08
Reviewed-on: https://gerrit.libreoffice.org/26468
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/qa/unit/data/functions/fods/isnontext.fods 
b/sc/qa/unit/data/functions/fods/isnontext.fods
new file mode 100644
index 000..cb8f7bf
--- /dev/null
+++ b/sc/qa/unit/data/functions/fods/isnontext.fods
@@ -0,0 +1,1899 @@
+
+
+http://www.w3.org/1999/xlink; 
xmlns:dc="http://purl.org/dc/elements/1.1/; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:scr
 ipt="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office; 
xmlns:ooow="http://openoffice.org/2004/writer; 
xmlns:oooc="http://openoffice.org/2004/calc; 
xmlns:dom="http://www.w3.org/2001/xml-events; 
xmlns:xforms="http://www.w3.org/2002/xforms; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xmlns:rpt="http://openoffice.org/2005/report; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#; 
xmlns:tableooo="http://openoffice.org/2009/table; 
xmlns:drawooo="http://openoffice.org/2010/draw; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:form
 x="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
+ 
2016-06-10T20:02:06.652576343P0D1LibreOfficeDev/5.3.0.0.alpha0$Linux_X86_64
 
LibreOffice_project/131e604073f89e6c1dd54be88b94b7befd881f2e
+ 
+  
+   0
+   0
+   26699
+   4967
+   
+
+ view1
+ 
+  
+   2
+   8
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   100
+   60
+   true
+  
+  
+   1
+   5
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   100
+   60
+   true
+  
+ 
+ Sheet2
+ 1241
+ 0
+ 100
+ 60
+ false
+ true
+ true
+ true
+ 12632256
+ true
+ true
+ true
+ true
+ false
+ false
+ false
+ 1270
+ 1270
+ 1
+ 1
+ true
+
+   
+  
+  
+   7
+   false
+   false
+   true
+   true
+   false
+   false
+   false
+   1270
+   1270
+   true
+   true
+   true
+   true
+   true
+   false
+   12632256
+   false
+   Lexmark-E352dn
+   
+
+ en
+ US
+ 
+ 
+ 
+
+   
+   true
+   true
+   3
+   1
+   true
+   1
+   true
+   qQH+/0xleG1hcmstRTM1MmRuQ1VQUzpMZXhtYXJrLUUzNTJkbgAWAAMAzwAEAAhSAAAEdAAASm9iRGF0YSAxCnByaW50ZXI9TGV4bWFyay1FMzUyZG4Kb3JpZW50YXRpb249UG9ydHJhaXQKY29waWVzPTEKY29sbGF0ZT1mYWxzZQptYXJnaW5kYWp1c3RtZW50PTAsMCwwLDAKY29sb3JkZXB0aD0yNApwc2xldmVsPTAKcGRmZGV2aWNlPTEKY29sb3JkZXZpY2U9MApQUERDb250ZXhEYXRhClBhZ2VTaXplOkE0AElucHV0U2xvdDpUcmF5MQBEdXBsZXg6Tm9uZQAAEgBDT01QQVRfRFVQTEVYX01PREUKAERVUExFWF9PRkY=
+   false
+   0
+  
+ 
+ 
+  
+   http://openoffice.org/2004/office; 
xmlns:xlink="http://www.w3.org/1999/xlink;>
+
+   
+  
+ 
+ 
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+ 
+ 
+  
+   
+   
+  
+  
+   
+  
+  
+   
+
+   Kč
+  
+  
+   
+   -
+   
+
+   Kč
+   
+  
+  
+   £
+   
+  
+  
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   
+   -
+   £
+   
+   
+  
+  
+   
+
+  
+  
+   (
+   
+   )
+   
+  
+  
+   
+
+  
+  
+   (

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

2016-06-19 Thread Zdeněk Crhonek
 sc/qa/unit/data/functions/fods/islogical.fods | 1917 ++
 sc/qa/unit/data/functions/fods/years.fods | 1293 +
 2 files changed, 3210 insertions(+)

New commits:
commit 5895da019fc452585bb4283e4e4dc2d1ec497642
Author: Zdeněk Crhonek 
Date:   Sun Jun 19 00:41:18 2016 +0200

add ISLOGICAL test case

Change-Id: I4edc8a4b3ee25fa8211bd54a1d2bbd211cb6e9a9
Reviewed-on: https://gerrit.libreoffice.org/26464
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/qa/unit/data/functions/fods/islogical.fods 
b/sc/qa/unit/data/functions/fods/islogical.fods
new file mode 100644
index 000..fcd692f
--- /dev/null
+++ b/sc/qa/unit/data/functions/fods/islogical.fods
@@ -0,0 +1,1917 @@
+
+
+http://www.w3.org/1999/xlink; 
xmlns:dc="http://purl.org/dc/elements/1.1/; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:scr
 ipt="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office; 
xmlns:ooow="http://openoffice.org/2004/writer; 
xmlns:oooc="http://openoffice.org/2004/calc; 
xmlns:dom="http://www.w3.org/2001/xml-events; 
xmlns:xforms="http://www.w3.org/2002/xforms; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xmlns:rpt="http://openoffice.org/2005/report; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#; 
xmlns:tableooo="http://openoffice.org/2009/table; 
xmlns:drawooo="http://openoffice.org/2010/draw; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:form
 x="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
+ 
2016-06-10T20:02:06.652576343P0D1LibreOfficeDev/5.3.0.0.alpha0$Linux_X86_64
 
LibreOffice_project/131e604073f89e6c1dd54be88b94b7befd881f2e
+ 
+  
+   0
+   0
+   26699
+   4515
+   
+
+ view1
+ 
+  
+   2
+   8
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   100
+   60
+   true
+  
+  
+   3
+   17
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   100
+   60
+   true
+  
+ 
+ Sheet2
+ 1241
+ 0
+ 100
+ 60
+ false
+ true
+ true
+ true
+ 12632256
+ true
+ true
+ true
+ true
+ false
+ false
+ false
+ 1270
+ 1270
+ 1
+ 1
+ true
+
+   
+  
+  
+   7
+   false
+   false
+   true
+   true
+   false
+   false
+   false
+   1270
+   1270
+   true
+   true
+   true
+   true
+   true
+   false
+   12632256
+   false
+   Lexmark-E352dn
+   
+
+ en
+ US
+ 
+ 
+ 
+
+   
+   true
+   true
+   3
+   1
+   true
+   1
+   true
+   qQH+/0xleG1hcmstRTM1MmRuQ1VQUzpMZXhtYXJrLUUzNTJkbgAWAAMAzwAEAAhSAAAEdAAASm9iRGF0YSAxCnByaW50ZXI9TGV4bWFyay1FMzUyZG4Kb3JpZW50YXRpb249UG9ydHJhaXQKY29waWVzPTEKY29sbGF0ZT1mYWxzZQptYXJnaW5kYWp1c3RtZW50PTAsMCwwLDAKY29sb3JkZXB0aD0yNApwc2xldmVsPTAKcGRmZGV2aWNlPTEKY29sb3JkZXZpY2U9MApQUERDb250ZXhEYXRhClBhZ2VTaXplOkE0AElucHV0U2xvdDpUcmF5MQBEdXBsZXg6Tm9uZQAAEgBDT01QQVRfRFVQTEVYX01PREUKAERVUExFWF9PRkY=
+   false
+   0
+  
+ 
+ 
+  
+   http://openoffice.org/2004/office; 
xmlns:xlink="http://www.w3.org/1999/xlink;>
+
+   
+  
+ 
+ 
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+ 
+ 
+  
+   
+   
+  
+  
+   
+  
+  
+   
+
+   Kč
+  
+  
+   
+   -
+   
+
+   Kč
+   
+  
+  
+   £
+   
+  
+  
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   
+   -
+   £
+   
+   
+  
+  
+   
+
+  
+  
+   (
+   
+   )
+   
+  
+  
+   
+
+  
+  
+   (
+   
+ 

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

2016-06-19 Thread Zdeněk Crhonek
 sc/qa/unit/data/functions/fods/months.fods  | 1071 ++
 sc/qa/unit/data/functions/fods/networkdays.fods | 1158 
 2 files changed, 2229 insertions(+)

New commits:
commit a27efff9fb590df6bc7a97aee4fbd194a1443c1a
Author: Zdeněk Crhonek 
Date:   Sat Jun 18 21:58:04 2016 +0200

add NETWORKDAYS test case

Change-Id: Ie6a473f8aa6b8b94e8c6956ff4ffb86b20cd11e6
Reviewed-on: https://gerrit.libreoffice.org/26460
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/qa/unit/data/functions/fods/networkdays.fods 
b/sc/qa/unit/data/functions/fods/networkdays.fods
new file mode 100644
index 000..e2170bf
--- /dev/null
+++ b/sc/qa/unit/data/functions/fods/networkdays.fods
@@ -0,0 +1,1158 @@
+
+
+http://www.w3.org/1999/xlink; 
xmlns:dc="http://purl.org/dc/elements/1.1/; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:scr
 ipt="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office; 
xmlns:ooow="http://openoffice.org/2004/writer; 
xmlns:oooc="http://openoffice.org/2004/calc; 
xmlns:dom="http://www.w3.org/2001/xml-events; 
xmlns:xforms="http://www.w3.org/2002/xforms; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xmlns:rpt="http://openoffice.org/2005/report; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#; 
xmlns:tableooo="http://openoffice.org/2009/table; 
xmlns:drawooo="http://openoffice.org/2010/draw; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:form
 x="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
+ 
2016-06-15T06:06:13.36500P0D1LibreOfficeDev/5.3.0.0.alpha0$Linux_X86_64
 
LibreOffice_project/131e604073f89e6c1dd54be88b94b7befd881f2e
+ 
+  
+   0
+   0
+   33007
+   12987
+   
+
+ view1
+ 
+  
+   2
+   7
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   100
+   60
+   true
+  
+  
+   1
+   9
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   100
+   60
+   true
+  
+ 
+ Sheet2
+ 1241
+ 0
+ 100
+ 60
+ false
+ true
+ true
+ true
+ 12632256
+ true
+ true
+ true
+ true
+ false
+ false
+ false
+ 1270
+ 1270
+ 1
+ 1
+ true
+
+   
+  
+  
+   7
+   false
+   false
+   true
+   true
+   false
+   false
+   false
+   1270
+   1270
+   true
+   true
+   true
+   true
+   true
+   false
+   12632256
+   false
+   Lexmark-E352dn
+   
+
+ cs
+ CZ
+ 
+ 
+ 
+
+
+ en
+ US
+ 
+ 
+ 
+
+
+ nl
+ NL
+ 
+ 
+ 
+
+   
+   true
+   true
+   3
+   1
+   true
+   1
+   true
+   qQH+/0xleG1hcmstRTM1MmRuQ1VQUzpMZXhtYXJrLUUzNTJkbgAWAAMAzwAEAAhSAAAEdAAASm9iRGF0YSAxCnByaW50ZXI9TGV4bWFyay1FMzUyZG4Kb3JpZW50YXRpb249UG9ydHJhaXQKY29waWVzPTEKY29sbGF0ZT1mYWxzZQptYXJnaW5kYWp1c3RtZW50PTAsMCwwLDAKY29sb3JkZXB0aD0yNApwc2xldmVsPTAKcGRmZGV2aWNlPTEKY29sb3JkZXZpY2U9MApQUERDb250ZXhEYXRhCkR1cGxleDpOb25lAElucHV0U2xvdDpUcmF5MQBQYWdlU2l6ZTpBNAAAEgBDT01QQVRfRFVQTEVYX01PREUKAERVUExFWF9PRkY=
+   false
+   0
+  
+ 
+ 
+  
+   http://openoffice.org/2004/office; 
xmlns:xlink="http://www.w3.org/1999/xlink;>
+
+   
+  
+ 
+ 
+  
+  
+  
+  
+  
+  
+  
+  
+  
+ 
+ 
+  
+   
+   
+  
+  
+   
+  
+  
+   
+
+   Kč
+  
+  
+   
+   -
+   
+
+   Kč
+   
+  
+  
+   £
+   
+  
+  
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   
+   -

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

2016-06-19 Thread Zdeněk Crhonek
 sc/qa/unit/data/functions/fods/isformula.fods | 1886 ++
 sc/qa/unit/data/functions/fods/weekday.fods   | 1079 ++
 2 files changed, 2965 insertions(+)

New commits:
commit 677aa732a2f79c14f7817f544333c49858178b59
Author: Zdeněk Crhonek 
Date:   Sat Jun 18 21:26:22 2016 +0200

add ISFORMULA test case

Change-Id: Iabbfbace60c371da8487d7c67866a937f96ed4ef
Reviewed-on: https://gerrit.libreoffice.org/26458
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/qa/unit/data/functions/fods/isformula.fods 
b/sc/qa/unit/data/functions/fods/isformula.fods
new file mode 100644
index 000..1bd043b
--- /dev/null
+++ b/sc/qa/unit/data/functions/fods/isformula.fods
@@ -0,0 +1,1886 @@
+
+
+http://www.w3.org/1999/xlink; 
xmlns:dc="http://purl.org/dc/elements/1.1/; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:scr
 ipt="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office; 
xmlns:ooow="http://openoffice.org/2004/writer; 
xmlns:oooc="http://openoffice.org/2004/calc; 
xmlns:dom="http://www.w3.org/2001/xml-events; 
xmlns:xforms="http://www.w3.org/2002/xforms; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xmlns:rpt="http://openoffice.org/2005/report; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#; 
xmlns:tableooo="http://openoffice.org/2009/table; 
xmlns:drawooo="http://openoffice.org/2010/draw; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:form
 x="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
+ 
2016-06-10T20:02:06.652576343P0D1LibreOfficeDev/5.3.0.0.alpha0$Linux_X86_64
 
LibreOffice_project/131e604073f89e6c1dd54be88b94b7befd881f2e
+ 
+  
+   0
+   0
+   26699
+   5418
+   
+
+ view1
+ 
+  
+   2
+   8
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   100
+   60
+   true
+  
+  
+   1
+   11
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   100
+   60
+   true
+  
+ 
+ Sheet2
+ 1241
+ 0
+ 100
+ 60
+ false
+ true
+ true
+ true
+ 12632256
+ true
+ true
+ true
+ true
+ false
+ false
+ false
+ 1270
+ 1270
+ 1
+ 1
+ true
+
+   
+  
+  
+   7
+   false
+   false
+   true
+   true
+   false
+   false
+   false
+   1270
+   1270
+   true
+   true
+   true
+   true
+   true
+   false
+   12632256
+   false
+   Lexmark-E352dn
+   
+
+ en
+ US
+ 
+ 
+ 
+
+   
+   true
+   true
+   3
+   1
+   true
+   1
+   true
+   qQH+/0xleG1hcmstRTM1MmRuQ1VQUzpMZXhtYXJrLUUzNTJkbgAWAAMAzwAEAAhSAAAEdAAASm9iRGF0YSAxCnByaW50ZXI9TGV4bWFyay1FMzUyZG4Kb3JpZW50YXRpb249UG9ydHJhaXQKY29waWVzPTEKY29sbGF0ZT1mYWxzZQptYXJnaW5kYWp1c3RtZW50PTAsMCwwLDAKY29sb3JkZXB0aD0yNApwc2xldmVsPTAKcGRmZGV2aWNlPTEKY29sb3JkZXZpY2U9MApQUERDb250ZXhEYXRhCkR1cGxleDpOb25lAElucHV0U2xvdDpUcmF5MQBQYWdlU2l6ZTpBNAAAEgBDT01QQVRfRFVQTEVYX01PREUKAERVUExFWF9PRkY=
+   false
+   0
+  
+ 
+ 
+  
+   http://openoffice.org/2004/office; 
xmlns:xlink="http://www.w3.org/1999/xlink;>
+
+   
+  
+ 
+ 
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+ 
+ 
+  
+   
+   
+  
+  
+   
+  
+  
+   
+
+   Kč
+  
+  
+   
+   -
+   
+
+   Kč
+   
+  
+  
+   £
+   
+  
+  
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   
+   -
+   £
+   
+   
+  
+  
+   
+
+  
+  
+   (
+   
+   )
+   
+  
+  
+   
+
+  
+  
+   (
+   
+   

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

2016-06-06 Thread Jan Holesovsky
 sc/qa/unit/copy_paste_test.cxx |  106 -
 1 file changed, 105 insertions(+), 1 deletion(-)

New commits:
commit 47d0e1be83810ccdb2d5350167c3713ea5d923ba
Author: Jan Holesovsky 
Date:   Mon Jun 6 10:29:42 2016 +0200

tdf#84411 unit test: Trivial follow-up updates.

Change-Id: Ia19fec237d3301297e4e1caa2338519264c4b724

diff --git a/sc/qa/unit/copy_paste_test.cxx b/sc/qa/unit/copy_paste_test.cxx
index 7db0bf9..0e9addf 100644
--- a/sc/qa/unit/copy_paste_test.cxx
+++ b/sc/qa/unit/copy_paste_test.cxx
@@ -123,6 +123,8 @@ void ScCopyPasteTest::testCopyPasteXLS()
 xComponent->dispose();
 }
 
+namespace {
+
 void lcl_copy( const OUString& rSrcRange, const OUString& rDstRange, 
ScDocument& rDoc, ScTabViewShell* pViewShell )
 {
 ScDocument aClipDoc(SCDOCMODE_CLIP);
@@ -142,6 +144,8 @@ void lcl_copy( const OUString& rSrcRange, const OUString& 
rDstRange, ScDocument&
 pViewShell->GetViewData().GetView()->PasteFromClip(InsertDeleteFlags::ALL, 
);
 }
 
+} // anonymous namespace
+
 void ScCopyPasteTest::testTdf84411()
 {
 uno::Reference< frame::XDesktop2 > xDesktop = 
frame::Desktop::create(::comphelper::getProcessComponentContext());
@@ -202,6 +206,7 @@ void ScCopyPasteTest::testTdf84411()
 // 3. Disable OpenCL
 ScModelObj* pModel = 
ScModelObj::getImplementation(pFoundShell->GetModel());
 CPPUNIT_ASSERT(pModel != nullptr);
+bool bOpenCLState = ScCalcConfig::isOpenCLEnabled();
 pModel->enableOpenCL(false);
 CPPUNIT_ASSERT(ScCalcConfig::isOpenCLEnabled() == false);
 pModel->enableAutomaticCalculation(true);
@@ -217,6 +222,7 @@ void ScCopyPasteTest::testTdf84411()
 
 
 // 5. Close the document (Ctrl-W)
+pModel->enableOpenCL(bOpenCLState);
 xComponent->dispose();
 }
 
@@ -246,5 +252,4 @@ CPPUNIT_TEST_SUITE_REGISTRATION(ScCopyPasteTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
 
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 770493f3cf4c724e115b51a4280b00fe00b7f42e
Author: Marco Cecchetti 
Date:   Sun Jun 5 21:31:15 2016 +0200

tdf#84411 - unit test

Change-Id: I0be17c6e9e7f14d73597410a52539240f22a9b68

diff --git a/sc/qa/unit/copy_paste_test.cxx b/sc/qa/unit/copy_paste_test.cxx
index cf1ea0e..7db0bf9 100644
--- a/sc/qa/unit/copy_paste_test.cxx
+++ b/sc/qa/unit/copy_paste_test.cxx
@@ -32,9 +32,11 @@ public:
 virtual void tearDown() override;
 
 void testCopyPasteXLS();
+void testTdf84411();
 
 CPPUNIT_TEST_SUITE(ScCopyPasteTest);
 CPPUNIT_TEST(testCopyPasteXLS);
+CPPUNIT_TEST(testTdf84411);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -121,6 +123,103 @@ void ScCopyPasteTest::testCopyPasteXLS()
 xComponent->dispose();
 }
 
+void lcl_copy( const OUString& rSrcRange, const OUString& rDstRange, 
ScDocument& rDoc, ScTabViewShell* pViewShell )
+{
+ScDocument aClipDoc(SCDOCMODE_CLIP);
+
+// 1. Copy
+ScRange aSrcRange;
+ScRefFlags nRes = aSrcRange.Parse(rSrcRange, , 
rDoc.GetAddressConvention());
+CPPUNIT_ASSERT_MESSAGE("Failed to parse.", (nRes & ScRefFlags::VALID));
+pViewShell->GetViewData().GetMarkData().SetMarkArea(aSrcRange);
+pViewShell->GetViewData().GetView()->CopyToClip(, false, false, 
false, false);
+
+// 2. Paste
+ScRange aDstRange;
+nRes = aDstRange.Parse(rDstRange, , rDoc.GetAddressConvention());
+CPPUNIT_ASSERT_MESSAGE("Failed to parse.", (nRes & ScRefFlags::VALID));
+pViewShell->GetViewData().GetMarkData().SetMarkArea(aDstRange);
+pViewShell->GetViewData().GetView()->PasteFromClip(InsertDeleteFlags::ALL, 
);
+}
+
+void ScCopyPasteTest::testTdf84411()
+{
+uno::Reference< frame::XDesktop2 > xDesktop = 
frame::Desktop::create(::comphelper::getProcessComponentContext());
+CPPUNIT_ASSERT( xDesktop.is() );
+
+// create a frame
+Reference< frame::XFrame > xTargetFrame = xDesktop->findFrame( "_blank", 0 
);
+CPPUNIT_ASSERT( xTargetFrame.is() );
+
+// 1. Create spreadsheet
+uno::Sequence< beans::PropertyValue > aEmptyArgList;
+uno::Reference< lang::XComponent > xComponent = 
xDesktop->loadComponentFromURL(
+"private:factory/scalc",
+"_blank",
+0,
+aEmptyArgList );
+CPPUNIT_ASSERT( xComponent.is() );
+
+// Get the document model
+SfxObjectShell* pFoundShell = 
SfxObjectShell::GetShellFromComponent(xComponent);
+CPPUNIT_ASSERT_MESSAGE("Failed to access document shell", pFoundShell);
+
+ScDocShellRef xDocSh = dynamic_cast(pFoundShell);
+CPPUNIT_ASSERT(xDocSh != nullptr);
+
+uno::Reference< frame::XModel2 > xModel2 ( xDocSh->GetModel(), UNO_QUERY );
+CPPUNIT_ASSERT( xModel2.is() );
+
+Reference< frame::XController2 > xController ( 
xModel2->createDefaultViewController( xTargetFrame ), UNO_QUERY );
+CPPUNIT_ASSERT( xController.is() );
+
+// introduce model/view/controller to each other
+xController->attachModel( xModel2.get() );
+

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

2016-05-21 Thread Zdeněk Crhonek
 sc/qa/unit/data/functions/fods/dget.fods | 1633 +++
 sc/qa/unit/data/functions/fods/dmax.fods | 1602 ++
 2 files changed, 3235 insertions(+)

New commits:
commit 29428a5979ecf37eca7eb690a6acbc2897122753
Author: Zdeněk Crhonek 
Date:   Sat May 21 08:52:45 2016 +0200

add DMAX test case

Change-Id: I954b556df5f3423bd3219d4b09d7548b320077fe
Reviewed-on: https://gerrit.libreoffice.org/25248
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/qa/unit/data/functions/fods/dmax.fods 
b/sc/qa/unit/data/functions/fods/dmax.fods
new file mode 100644
index 000..f89e975
--- /dev/null
+++ b/sc/qa/unit/data/functions/fods/dmax.fods
@@ -0,0 +1,1602 @@
+
+
+http://www.w3.org/1999/xlink; 
xmlns:dc="http://purl.org/dc/elements/1.1/; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:scr
 ipt="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office; 
xmlns:ooow="http://openoffice.org/2004/writer; 
xmlns:oooc="http://openoffice.org/2004/calc; 
xmlns:dom="http://www.w3.org/2001/xml-events; 
xmlns:xforms="http://www.w3.org/2002/xforms; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xmlns:rpt="http://openoffice.org/2005/report; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#; 
xmlns:tableooo="http://openoffice.org/2009/table; 
xmlns:drawooo="http://openoffice.org/2010/draw; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:form
 x="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
+ 
2016-05-21T08:52:16.664848729P0D1LibreOfficeDev/5.2.0.0.alpha1$Linux_X86_64
 
LibreOffice_project/eb7593daa4bac21bd68182c8bbbd3ee3bd7b64dd
+ 
+  
+   0
+   0
+   31628
+   27629
+   
+
+ view1
+ 
+  
+   2
+   8
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   100
+   60
+   true
+  
+  
+   3
+   7
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   100
+   60
+   true
+  
+ 
+ Sheet1
+ 939
+ 0
+ 100
+ 60
+ false
+ true
+ true
+ true
+ 12632256
+ true
+ true
+ true
+ true
+ false
+ false
+ false
+ 1270
+ 1270
+ 1
+ 1
+ true
+
+   
+  
+  
+   7
+   false
+   false
+   true
+   true
+   false
+   false
+   false
+   1270
+   1270
+   true
+   true
+   true
+   true
+   true
+   false
+   12632256
+   false
+   Lexmark-E352dn
+   
+
+ en
+ US
+ 
+ 
+ 
+
+   
+   true
+   true
+   3
+   1
+   true
+   1
+   true
+   qQH+/0xleG1hcmstRTM1MmRuQ1VQUzpMZXhtYXJrLUUzNTJkbgAWAAMAzwAEAAhSAAAEdAAASm9iRGF0YSAxCnByaW50ZXI9TGV4bWFyay1FMzUyZG4Kb3JpZW50YXRpb249UG9ydHJhaXQKY29waWVzPTEKY29sbGF0ZT1mYWxzZQptYXJnaW5kYWp1c3RtZW50PTAsMCwwLDAKY29sb3JkZXB0aD0yNApwc2xldmVsPTAKcGRmZGV2aWNlPTEKY29sb3JkZXZpY2U9MApQUERDb250ZXhEYXRhCkR1cGxleDpOb25lAElucHV0U2xvdDpUcmF5MQBQYWdlU2l6ZTpBNAAAEgBDT01QQVRfRFVQTEVYX01PREUKAERVUExFWF9PRkY=
+   false
+   0
+  
+ 
+ 
+  
+   http://openoffice.org/2004/office; 
xmlns:xlink="http://www.w3.org/1999/xlink;>
+
+   
+  
+ 
+ 
+  
+  
+  
+  
+  
+  
+  
+ 
+ 
+  
+   
+   
+  
+  
+   
+  
+  
+   
+
+   Kč
+  
+  
+   
+   -
+   
+
+   Kč
+   
+  
+  
+   £
+   
+  
+  
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   
+   -
+   £
+   
+   
+  
+  
+   
+
+  
+  
+   (
+   
+   )
+   
+  
+  
+   
+
+  
+  
+   (
+   
+   )
+   
+  
+  
+   £
+
+  

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

2016-04-15 Thread Markus Mohrhard
 sc/qa/perf/scperfobj.cxx |   32 +++-
 1 file changed, 31 insertions(+), 1 deletion(-)

New commits:
commit e3e9e0ae125cef1cdce149ce632c21c481be8654
Author: Markus Mohrhard 
Date:   Fri Apr 15 19:14:32 2016 +0200

add test for tdf#88849

Change-Id: Id72d94799e20f0b290d5d5b05fb2b351d0750178

diff --git a/sc/qa/perf/scperfobj.cxx b/sc/qa/perf/scperfobj.cxx
index decce7f..12202f6 100644
--- a/sc/qa/perf/scperfobj.cxx
+++ b/sc/qa/perf/scperfobj.cxx
@@ -74,6 +74,7 @@ public:
 CPPUNIT_TEST(testLoadingFileWithSingleBigSheet);
 CPPUNIT_TEST(testFixedSum);
 CPPUNIT_TEST(testVariableSum);
+CPPUNIT_TEST(testMatConcat);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -98,6 +99,7 @@ private:
 void testLoadingFileWithSingleBigSheet();
 void testFixedSum();
 void testVariableSum();
+void testMatConcat();
 };
 
 sal_Int32 ScPerfObj::nTest = 0;
@@ -628,6 +630,34 @@ void ScPerfObj::testVariableSum()
 callgrindDump("sc:sum_with_variable_array_formula");
 }
 
+void ScPerfObj::testMatConcat()
+{
+uno::Reference< sheet::XSpreadsheetDocument > xDoc(init("empty.ods"), 
UNO_QUERY_THROW);
+
+CPPUNIT_ASSERT(xDoc.is());
+uno::Reference< sheet::XCalculatable > xCalculatable(xDoc, 
UNO_QUERY_THROW);
+
+// get getSheets
+uno::Reference< sheet::XSpreadsheets > xSheets (xDoc->getSheets(), 
UNO_QUERY_THROW);
+
+uno::Any rSheet = xSheets->getByName("Sheet1");
+
+// query for the XSpreadsheet interface
+uno::Reference< sheet::XSpreadsheet > xSheet (rSheet, UNO_QUERY);
+
+// query for the XCellRange interface
+uno::Reference< table::XCellRange > rCellRange(rSheet, UNO_QUERY);
+// query the cell range
+uno::Reference< table::XCellRange > xCellRange = 
rCellRange->getCellRangeByName("C1");
+
+uno::Reference< sheet::XArrayFormulaRange > xArrayFormulaRange(xCellRange, 
UNO_QUERY_THROW);
+
+callgrindStart();
+xArrayFormulaRange->setArrayFormula("=A:A:B");
+xCalculatable->calculate();
+callgrindDump("sc:mat_concat");
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(ScPerfObj);
 
 }
commit 3d9f86e96874b238b4b960b65f1f10a1dc6ef881
Author: Markus Mohrhard 
Date:   Fri Apr 15 19:14:11 2016 +0200

fix calc perfcheck build

Change-Id: Ied1ca0c9c3e2c7cd34c4d21e27a95df21ab80bf9

diff --git a/sc/qa/perf/scperfobj.cxx b/sc/qa/perf/scperfobj.cxx
index 74b2c6a..decce7f 100644
--- a/sc/qa/perf/scperfobj.cxx
+++ b/sc/qa/perf/scperfobj.cxx
@@ -596,7 +596,7 @@ void ScPerfObj::testFixedSum()
 for( sal_Int32 i = 0; i < 1000; ++i )
 {
 uno::Reference< table::XCell > xCell = xSheet->getCellByPosition(1, i);
-ASSERT_DOUBLES_EQUAL(50206.0, xCell->getValue());
+CPPUNIT_ASSERT_DOUBLES_EQUAL(50206.0, xCell->getValue(), 1e-12);
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-04-15 Thread Markus Mohrhard
 sc/qa/unit/mark_test.cxx |   43 +++
 sc/source/core/data/markdata.cxx |   27 
 2 files changed, 61 insertions(+), 9 deletions(-)

New commits:
commit 4a2be39af5697356f2f4c0ae773f4b2530b2d9df
Author: Markus Mohrhard 
Date:   Fri Apr 15 13:08:49 2016 +0200

add test for tdf#72240

Change-Id: Ia27b84094e21758286422921e2bd017f9874dc06
Reviewed-on: https://gerrit.libreoffice.org/24104
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/qa/unit/mark_test.cxx b/sc/qa/unit/mark_test.cxx
index 41e0903..957d5fe 100644
--- a/sc/qa/unit/mark_test.cxx
+++ b/sc/qa/unit/mark_test.cxx
@@ -92,12 +92,21 @@ public:
 void testMultiMark_FourRanges();
 void testMultiMark_NegativeMarking();
 
+void testInsertTabBeforeSelected();
+void testInsertTabAfterSelected();
+void testDeleteTabBeforeSelected();
+void testDeleteTabAfterSelected();
+
 CPPUNIT_TEST_SUITE(Test);
 CPPUNIT_TEST(testSimpleMark_Simple);
 CPPUNIT_TEST(testSimpleMark_Column);
 CPPUNIT_TEST(testSimpleMark_Row);
 CPPUNIT_TEST(testMultiMark_FourRanges);
 CPPUNIT_TEST(testMultiMark_NegativeMarking);
+CPPUNIT_TEST(testInsertTabBeforeSelected);
+CPPUNIT_TEST(testInsertTabAfterSelected);
+CPPUNIT_TEST(testDeleteTabBeforeSelected);
+CPPUNIT_TEST(testDeleteTabAfterSelected);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -801,7 +810,41 @@ void Test::testMultiMark_NegativeMarking()
 testMultiMark( aData );
 }
 
+void Test::testInsertTabBeforeSelected()
+{
+ScMarkData aMark;
+aMark.SelectOneTable(0);
+aMark.InsertTab(0);
+CPPUNIT_ASSERT_EQUAL(SCTAB(1), aMark.GetSelectCount());
+CPPUNIT_ASSERT_EQUAL(SCTAB(1), aMark.GetFirstSelected());
+}
+
+void Test::testInsertTabAfterSelected()
+{
+ScMarkData aMark;
+aMark.SelectOneTable(0);
+aMark.InsertTab(1);
+CPPUNIT_ASSERT_EQUAL(SCTAB(1), aMark.GetSelectCount());
+CPPUNIT_ASSERT_EQUAL(SCTAB(0), aMark.GetFirstSelected());
+}
 
+void Test::testDeleteTabBeforeSelected()
+{
+ScMarkData aMark;
+aMark.SelectOneTable(1);
+aMark.DeleteTab(0);
+CPPUNIT_ASSERT_EQUAL(SCTAB(1), aMark.GetSelectCount());
+CPPUNIT_ASSERT_EQUAL(SCTAB(0), aMark.GetFirstSelected());
+}
+
+void Test::testDeleteTabAfterSelected()
+{
+ScMarkData aMark;
+aMark.SelectOneTable(0);
+aMark.DeleteTab(1);
+CPPUNIT_ASSERT_EQUAL(SCTAB(1), aMark.GetSelectCount());
+CPPUNIT_ASSERT_EQUAL(SCTAB(0), aMark.GetFirstSelected());
+}
 
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
 
commit 67abc250e5f30844797996e09e66e61c2ef214db
Author: Markus Mohrhard 
Date:   Fri Apr 15 13:07:54 2016 +0200

fix InsertTab and DeleteTab in ScMarkData, tdf#72240

Change-Id: Id3168e4cac6c52b36833b454518cce55b51e36b4
Reviewed-on: https://gerrit.libreoffice.org/24103
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/source/core/data/markdata.cxx b/sc/source/core/data/markdata.cxx
index 154a693..53a5023 100644
--- a/sc/source/core/data/markdata.cxx
+++ b/sc/source/core/data/markdata.cxx
@@ -512,20 +512,29 @@ bool ScMarkData::HasAnyMultiMarks() const
 
 void ScMarkData::InsertTab( SCTAB nTab )
 {
-std::set tabMarked(maTabMarked.begin(), 
maTabMarked.upper_bound(nTab));
-std::set::iterator it = maTabMarked.upper_bound(nTab);
-for (; it != maTabMarked.end(); ++it)
-tabMarked.insert(*it + 1);
+std::set tabMarked;
+for (auto itr = maTabMarked.begin(), itrEnd = maTabMarked.end();
+itr != itrEnd; ++itr)
+{
+if (*itr < nTab)
+tabMarked.insert(*itr);
+else if (*itr >= nTab)
+tabMarked.insert(*itr + 1);
+}
 maTabMarked.swap(tabMarked);
 }
 
 void ScMarkData::DeleteTab( SCTAB nTab )
 {
-std::set tabMarked(maTabMarked.begin(), maTabMarked.find(nTab));
-tabMarked.erase( nTab );
-std::set::iterator it = maTabMarked.find(nTab);
-for (; it != maTabMarked.end(); ++it)
-tabMarked.insert(*it + 1);
+std::set tabMarked;
+for (auto itr = maTabMarked.begin(), itrEnd = maTabMarked.end();
+itr != itrEnd; ++itr)
+{
+if (*itr < nTab)
+tabMarked.insert(*itr);
+else if (*itr > nTab)
+tabMarked.insert(*itr - 1);
+}
 maTabMarked.swap(tabMarked);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-25 Thread Eike Rathke
 sc/qa/unit/ucalc_formula.cxx|   33 +
 sc/source/core/data/formulacell.cxx |5 +++--
 2 files changed, 36 insertions(+), 2 deletions(-)

New commits:
commit 19567deb49cdb4a49f251b1aacb305f68aee3c4a
Author: Eike Rathke 
Date:   Fri Mar 25 22:13:13 2016 +0100

unit test for copying sheet-local names before original position

Change-Id: I3a70539480b5b1d85b717fd6638359aa9ce5075a

diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index 8e8d092..6c1ac90 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -3183,6 +3183,39 @@ void Test::testFormulaRefUpdateNameCopySheet()
 m_pDoc->DeleteTab(2);
 m_pDoc->DeleteTab(1);
 m_pDoc->DeleteTab(0);
+
+m_pDoc->InsertTab(0, "Test2");
+// Local name referencing sheet Test2.
+bInserted = m_pDoc->GetRangeName(0)->insert( new ScRangeData( m_pDoc, 
"localname", "$Test2.$A$1"));
+CPPUNIT_ASSERT(bInserted);
+m_pDoc->SetString(ScAddress(0,0,0), "=SHEET()");
+m_pDoc->SetString(ScAddress(1,0,0), "=localname");
+nVal = m_pDoc->GetValue(1,0,0);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Localname sheet number should be 1", 1.0, 
nVal);
+
+// Insert sheet before and shift sheet with local name.
+m_pDoc->InsertTab(0, "Test1");
+pName = m_pDoc->GetRangeName(1)->findByUpperName("LOCALNAME");
+CPPUNIT_ASSERT_MESSAGE("Org sheet-local name should exist", pName);
+nVal = m_pDoc->GetValue(1,0,1);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Localname sheet number should be 2", 2.0, 
nVal);
+
+// Copy sheet before, shifting following now two sheets.
+m_pDoc->CopyTab(1, 0);
+pName = m_pDoc->GetRangeName(0)->findByUpperName("LOCALNAME");
+CPPUNIT_ASSERT_MESSAGE("New sheet-local name should exist", pName);
+nVal = m_pDoc->GetValue(1,0,0);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("New sheet number should be 1", 1.0, nVal);
+pName = m_pDoc->GetRangeName(1)->findByUpperName("LOCALNAME");
+CPPUNIT_ASSERT_MESSAGE("Old sheet-local name should not exist", !pName);
+pName = m_pDoc->GetRangeName(2)->findByUpperName("LOCALNAME");
+CPPUNIT_ASSERT_MESSAGE("Org sheet-local name should exist", pName);
+nVal = m_pDoc->GetValue(1,0,2);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("New sheet number should be 3", 3.0, nVal);
+
+m_pDoc->DeleteTab(2);
+m_pDoc->DeleteTab(1);
+m_pDoc->DeleteTab(0);
 }
 
 void Test::testFormulaRefUpdateNameDelete()
commit 0189bfe9828c3f52cd72cf2f9da22d110e08c327
Author: Eike Rathke 
Date:   Fri Mar 25 21:36:00 2016 +0100

sheet-local names' references of original sheet are updated later

... in contrast to global names that are already updated before content
is copied. So don't modify the token's original sheet number before
adjusting the copied sheet-local names' references.

Change-Id: I3edfb53370a5e8811d7301af95238a865ff38f0c

diff --git a/sc/source/core/data/formulacell.cxx 
b/sc/source/core/data/formulacell.cxx
index 1939f21..a8f8291 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -485,12 +485,13 @@ void adjustRangeName(formula::FormulaToken* pToken, 
ScDocument& rNewDoc, const S
 // Search the name of the RangeName.
 if (nOldSheet >= 0)
 {
+SCTAB nOldTab = nOldSheet;
 // XXX bGlobalNamesToLocal is also a synonym for copied sheet.
 if (bGlobalNamesToLocal && bSameDoc && rNewPos.Tab() <= rOldPos.Tab())
 // Sheet was already inserted before old position.
-++nOldSheet;
+++nOldTab;
 
-const ScRangeName* pRangeName = pOldDoc->GetRangeName(nOldSheet);
+const ScRangeName* pRangeName = pOldDoc->GetRangeName(nOldTab);
 pOldRangeData = pRangeName ? pRangeName->findByIndex(nOldIndex) : 
nullptr;
 if (!pOldRangeData)
 return; // might be an error in the formula array
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-20 Thread Tor Lillqvist
 sc/qa/extras/check_data_pilot_field.cxx |   11 ++-
 sc/qa/extras/check_data_pilot_table.cxx |   10 +-
 2 files changed, 11 insertions(+), 10 deletions(-)

New commits:
commit 1c553c98c28ed7b69a779b5ec608ccdb74ed8d34
Author: Tor Lillqvist 
Date:   Sun Mar 20 20:03:55 2016 +0200

loplugin:stringconstant

Change-Id: I94db03d7aa812df584cc13e75c132c09ce4b33aa

diff --git a/sc/qa/extras/check_data_pilot_field.cxx 
b/sc/qa/extras/check_data_pilot_field.cxx
index b0e7181..3ff8c65 100644
--- a/sc/qa/extras/check_data_pilot_field.cxx
+++ b/sc/qa/extras/check_data_pilot_field.cxx
@@ -120,10 +120,10 @@ uno::Reference< uno::XInterface > 
CheckDataPilotField::init()
 //Filling a table
 for (int i = 1; i < mMaxFieldIndex; i++)
 {
-oSheet->getCellByPosition(i, 0)->setFormula(OUString("Col") + 
OUString::number(i));
-oSheet->getCellByPosition(0, i)->setFormula(OUString("Row") + 
OUString::number(i));
-oSheet2->getCellByPosition(i, 0)->setFormula(OUString("Col") + 
OUString::number(i));
-oSheet2->getCellByPosition(0, i)->setFormula(OUString("Row") + 
OUString::number(i));
+oSheet->getCellByPosition(i, 0)->setFormula("Col" + 
OUString::number(i));
+oSheet->getCellByPosition(0, i)->setFormula("Row" + 
OUString::number(i));
+oSheet2->getCellByPosition(i, 0)->setFormula("Col" + 
OUString::number(i));
+oSheet2->getCellByPosition(0, i)->setFormula("Row" + 
OUString::number(i));
 }
 
 for (int i = 1; i < mMaxFieldIndex; i++)
diff --git a/sc/qa/extras/check_data_pilot_table.cxx 
b/sc/qa/extras/check_data_pilot_table.cxx
index e870699..b5e786b 100644
--- a/sc/qa/extras/check_data_pilot_table.cxx
+++ b/sc/qa/extras/check_data_pilot_table.cxx
@@ -119,10 +119,10 @@ uno::Reference< uno::XInterface > 
CheckDataPilotTable::init()
 //Filling a table
 for (int i = 1; i < mMaxFieldIndex; i++)
 {
-oSheet->getCellByPosition(i, 0)->setFormula(OUString("Col") + 
OUString::number(i));
-oSheet->getCellByPosition(0, i)->setFormula(OUString("Row") + 
OUString::number(i));
-oSheet2->getCellByPosition(i, 0)->setFormula(OUString("Col") + 
OUString::number(i));
-oSheet2->getCellByPosition(0, i)->setFormula(OUString("Row") + 
OUString::number(i));
+oSheet->getCellByPosition(i, 0)->setFormula("Col" + 
OUString::number(i));
+oSheet->getCellByPosition(0, i)->setFormula("Row" + 
OUString::number(i));
+oSheet2->getCellByPosition(i, 0)->setFormula("Col" + 
OUString::number(i));
+oSheet2->getCellByPosition(0, i)->setFormula("Row" + 
OUString::number(i));
 }
 
 for (int i = 1; i < mMaxFieldIndex; i++)
commit 1ed0091c91d17f3f3cf28d41e15225bc1cb33a92
Author: Tor Lillqvist 
Date:   Sun Mar 20 20:01:20 2016 +0200

-Werror,-Winconsistent-missing-override

Change-Id: Ic197ab65be361ae3e642da2e20da4aba5cb93a74

diff --git a/sc/qa/extras/check_data_pilot_field.cxx 
b/sc/qa/extras/check_data_pilot_field.cxx
index eb0b12a..b0e7181 100644
--- a/sc/qa/extras/check_data_pilot_field.cxx
+++ b/sc/qa/extras/check_data_pilot_field.cxx
@@ -41,7 +41,8 @@ class CheckDataPilotField : public CalcUnoApiTest, public 
apitest::XNamed, publi
 virtual void setUp() override;
 virtual void tearDown() override;
 
-uno::Reference< uno::XInterface > init();
+uno::Reference< uno::XInterface > init() override;
+
 CPPUNIT_TEST_SUITE(CheckDataPilotField);
 
 // _XNamed
diff --git a/sc/qa/extras/check_data_pilot_table.cxx 
b/sc/qa/extras/check_data_pilot_table.cxx
index 70dbbbe..e870699 100644
--- a/sc/qa/extras/check_data_pilot_table.cxx
+++ b/sc/qa/extras/check_data_pilot_table.cxx
@@ -43,7 +43,7 @@ public:
 virtual void setUp() override;
 virtual void tearDown() override;
 
-uno::Reference< uno::XInterface > init();
+uno::Reference< uno::XInterface > init() override;
 
 CPPUNIT_TEST_SUITE(CheckDataPilotTable);
 // _XNamed
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-19 Thread Pranav Kant
 sc/qa/unit/tiledrendering/data/select-row-cols.ods |binary
 sc/qa/unit/tiledrendering/tiledrendering.cxx   |   69 +
 sc/source/ui/unoobj/docuno.cxx |2 
 3 files changed, 70 insertions(+), 1 deletion(-)

New commits:
commit 91904157beb804e78570dedf3b57fc8407d399a8
Author: Pranav Kant 
Date:   Wed Mar 16 22:13:08 2016 +0530

sc tiled rendering: Unit test for extended .uno:SelectRow/Column

Change-Id: I0ab89598af28e12bebc271f7bce1e6166cb83b1d

diff --git a/sc/qa/unit/tiledrendering/data/select-row-cols.ods 
b/sc/qa/unit/tiledrendering/data/select-row-cols.ods
new file mode 100644
index 000..83cb8f1
Binary files /dev/null and b/sc/qa/unit/tiledrendering/data/select-row-cols.ods 
differ
diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index ecfd605..539fe18 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -46,11 +46,13 @@ public:
 virtual void tearDown() SAL_OVERRIDE;
 
 #if !defined(WNT) && !defined(MACOSX)
+void testRowColumnSelections();
 void testSortAscendingDescending();
 #endif
 
 CPPUNIT_TEST_SUITE(ScTiledRenderingTest);
 #if !defined(WNT) && !defined(MACOSX)
+CPPUNIT_TEST(testRowColumnSelections);
 CPPUNIT_TEST(testSortAscendingDescending);
 #endif
 CPPUNIT_TEST_SUITE_END();
@@ -150,6 +152,73 @@ void ScTiledRenderingTest::callbackImpl(int /*nType*/, 
const char* /*pPayload*/)
 }
 #endif
 
+void ScTiledRenderingTest::testRowColumnSelections()
+{
+comphelper::LibreOfficeKit::setActive();
+ScModelObj* pModelObj = createDoc("select-row-cols.ods");
+//ScDocument* pDoc = pModelObj->GetDocument();
+
+uno::Sequence aArgs(2);
+
+// Select the 5th row with no modifier
+aArgs[0].Name = OUString::fromUtf8("Row");
+aArgs[0].Value <<= static_cast(5 - 1);
+aArgs[1].Name = OUString::fromUtf8("Modifier");
+aArgs[1].Value <<= static_cast(0);
+comphelper::dispatchCommand(".uno:SelectRow", aArgs);
+
+// Check if it is selected
+OString aUsedMimeType;
+OString aResult = pModelObj->getTextSelection("text/plain;charset=utf-8", 
aUsedMimeType);
+OString 
aExpected("1\t2\t3\t4\t5\t6\t7\t8\t9\t10\t11\t12\t13\t14\t15\t16\t17\t18\t19\t20\t21\n");
+CPPUNIT_ASSERT_EQUAL(aExpected, aResult);
+
+// Select the 10th row with shift modifier
+aArgs[0].Name = OUString::fromUtf8("Row");
+aArgs[0].Value <<= static_cast(10 - 1);
+aArgs[1].Name = OUString::fromUtf8("Modifier");
+aArgs[1].Value <<= static_cast(KEY_SHIFT);
+comphelper::dispatchCommand(".uno:SelectRow", aArgs);
+
+// Check if all the rows from 5th to 10th get selected
+aResult = pModelObj->getTextSelection("text/plain;charset=utf-8", 
aUsedMimeType);
+aExpected = 
"1\t2\t3\t4\t5\t6\t7\t8\t9\t10\t11\t12\t13\t14\t15\t16\t17\t18\t19\t20\t21\n2\t3\t4\t5\t6\t7\t8\t9\t10\t11\t12\t13\t14\t15\t16\t17\t18\t19\t20\t21\t22\n3\t4\t5\t6\t7\t8\t9\t10\t11\t12\t13\t14\t15\t16\t17\t18\t19\t20\t21\t22\t23\n4\t5\t6\t7\t8\t9\t10\t11\t12\t13\t14\t15\t16\t17\t18\t19\t20\t21\t22\t23\t24\n5\t6\t7\t8\t9\t10\t11\t12\t13\t14\t15\t16\t17\t18\t19\t20\t21\t22\t23\t24\t25\n6\t7\t8\t9\t10\t11\t12\t13\t14\t15\t16\t17\t18\t19\t20\t21\t22\t23\t24\t25\t26\n";
+CPPUNIT_ASSERT_EQUAL(aExpected, aResult);
+
+// Select the 10th row with ctrl modifier
+aArgs[0].Name = OUString::fromUtf8("Row");
+aArgs[0].Value <<= static_cast(13 - 1);
+aArgs[1].Name = OUString::fromUtf8("Modifier");
+aArgs[1].Value <<= static_cast(KEY_MOD1);
+comphelper::dispatchCommand(".uno:SelectRow", aArgs);
+
+// When we copy this, we don't get anything useful, but we must not crash
+// (used to happen)
+aResult = pModelObj->getTextSelection("text/plain;charset=utf-8", 
aUsedMimeType);
+CPPUNIT_ASSERT_EQUAL(OString(), aResult);
+
+// TODO check that we really selected what we wanted here
+
+// Select Column 5 with ctrl modifier
+aArgs[0].Name = OUString::fromUtf8("Col");
+aArgs[0].Value <<= static_cast(5 - 1);
+aArgs[1].Name = OUString::fromUtf8("Modifier");
+aArgs[1].Value <<= static_cast(KEY_MOD1);
+comphelper::dispatchCommand(".uno:SelectColumn", aArgs);
+
+// When we copy this, we don't get anything useful, but we must not crash
+// (used to happen)
+aResult = pModelObj->getTextSelection("text/plain;charset=utf-8", 
aUsedMimeType);
+CPPUNIT_ASSERT_EQUAL(OString(), aResult);
+
+// TODO check that we really selected what we wanted here
+
+// TODO: Add test for negative selection: .uno:SelectRow/Column on already
+// selected row/column should deselect it.
+
+comphelper::LibreOfficeKit::setActive(false);
+}
+
 void ScTiledRenderingTest::testSortAscendingDescending()
 {
 comphelper::LibreOfficeKit::setActive();
commit 1592f030f8cab535b7ad0516abca0e309f84d4a3
Author: Jan Holesovsky 
Date:   Fri 

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

2016-03-10 Thread Tor Lillqvist
 sc/qa/unit/helper/qahelper.cxx|2 +-
 starmath/qa/extras/mmlimport-test.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit c914b6ccf1e2f7d4f7edc2ac6c502e5327dfe0ca
Author: Tor Lillqvist 
Date:   Fri Mar 11 09:29:09 2016 +0200

loplugin:redundantcast

Change-Id: I08d68a1ff4e798d1cace56fa18c7f70a48eb6231

diff --git a/starmath/qa/extras/mmlimport-test.cxx 
b/starmath/qa/extras/mmlimport-test.cxx
index 19f9f27..6a81acf 100644
--- a/starmath/qa/extras/mmlimport-test.cxx
+++ b/starmath/qa/extras/mmlimport-test.cxx
@@ -53,7 +53,7 @@ private:
OUString(),
OUString(),
"private:factory/smath*"));
-
const_cast(pFilter.get())->SetVersion(SOFFICE_FILEFORMAT_60);
+pFilter.get()->SetVersion(SOFFICE_FILEFORMAT_60);
 
 mxDocShell = new SmDocShell(SfxModelFlags::EMBEDDED_OBJECT |
 SfxModelFlags::DISABLE_EMBEDDED_SCRIPTS |
commit 53e8f648654a8d7404bbc3049328baa65473fb80
Author: Tor Lillqvist 
Date:   Fri Mar 11 09:27:42 2016 +0200

loplugin:redundantcast

Change-Id: Ia31f94cd55f16769d8354812619a5faac4623f7a

diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx
index e94adc5..ad32a20 100644
--- a/sc/qa/unit/helper/qahelper.cxx
+++ b/sc/qa/unit/helper/qahelper.cxx
@@ -681,7 +681,7 @@ std::shared_ptr 
ScBootstrapFixture::exportTo( ScDocShell* pShell,
 aFilterName,
 OUString(), nFormatType, nExportFormat, aFilterType, 0, OUString(),
 OUString(), OUString("private:factory/scalc*") ));
-
const_cast(pExportFilter.get())->SetVersion(SOFFICE_FILEFORMAT_CURRENT);
+pExportFilter.get()->SetVersion(SOFFICE_FILEFORMAT_CURRENT);
 aStoreMedium.SetFilter(pExportFilter);
 pShell->DoSaveAs( aStoreMedium );
 pShell->DoClose();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-05 Thread Aleksas Pantechovskis
 sc/qa/unit/rangelst_test.cxx |4 ++--
 sc/qa/unit/ucalc_sort.cxx|   20 ++--
 2 files changed, 12 insertions(+), 12 deletions(-)

New commits:
commit 2406edd37d425a7f710667b68fa285d1df70763d
Author: Aleksas Pantechovskis 
Date:   Fri Mar 4 16:07:57 2016 +0200

tdf#98264, replace CPPUNIT_ASSERT with CPPUNIT_ASSERT_EQUAL

Change-Id: Id17cf3a1001af950fdbc09239d023bf52790710f
Reviewed-on: https://gerrit.libreoffice.org/22909
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/qa/unit/rangelst_test.cxx b/sc/qa/unit/rangelst_test.cxx
index 7b13b0d..b1b1712 100644
--- a/sc/qa/unit/rangelst_test.cxx
+++ b/sc/qa/unit/rangelst_test.cxx
@@ -406,7 +406,7 @@ void Test::testJoin_Case1()
 aList.Join(ScRange(4,1,0,6,3,0));
 
 CPPUNIT_ASSERT_EQUAL(static_cast(1), aList.size());
-CPPUNIT_ASSERT( ScRange(1,1,0,6,3,0) == *aList[0]);
+CPPUNIT_ASSERT_EQUAL( ScRange(1,1,0,6,3,0), *aList[0]);
 }
 
 void Test::testJoin_Case2()
@@ -419,7 +419,7 @@ void Test::testJoin_Case2()
 aList.Join(*aList[2], true);
 
 CPPUNIT_ASSERT_EQUAL(static_cast(1), aList.size());
-CPPUNIT_ASSERT(ScRange(1,1,0,9,3,0) == *aList[0]);
+CPPUNIT_ASSERT_EQUAL(ScRange(1,1,0,9,3,0), *aList[0]);
 }
 
 void Test::testUpdateReference_DeleteRow()
commit 0355b6b5d252e10193171e86cc5edbf0ab1e9503
Author: Aleksas Pantechovskis 
Date:   Fri Mar 4 16:03:17 2016 +0200

tdf#98264, replace CPPUNIT_ASSERT with CPPUNIT_ASSERT_EQUAL

Change-Id: Ic02ed30b7135d648c8aac97f65e286c163597f86
Reviewed-on: https://gerrit.libreoffice.org/22908
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/qa/unit/ucalc_sort.cxx b/sc/qa/unit/ucalc_sort.cxx
index bb8151d..e692ec8 100644
--- a/sc/qa/unit/ucalc_sort.cxx
+++ b/sc/qa/unit/ucalc_sort.cxx
@@ -43,7 +43,7 @@ void Test::testSort()
 
 clearRange(m_pDoc, ScRange(0, 0, 0, 1, SAL_N_ELEMENTS(aData), 0));
 aDataRange = insertRangeData(m_pDoc, aPos, aData, 
SAL_N_ELEMENTS(aData));
-CPPUNIT_ASSERT_MESSAGE("failed to insert range data at correct 
position", aDataRange.aStart == aPos);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("failed to insert range data at correct 
position", aPos, aDataRange.aStart);
 }
 
 // Insert note in cell B2.
@@ -85,7 +85,7 @@ void Test::testSort()
 };
 
 aDataRange = insertRangeData(m_pDoc, aPos, aData, 
SAL_N_ELEMENTS(aData));
-CPPUNIT_ASSERT_MESSAGE("failed to insert range data at correct 
position", aDataRange.aStart == aPos);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("failed to insert range data at correct 
position", aPos, aDataRange.aStart);
 }
 
 aSortData.nCol1 = aDataRange.aStart.Col();
@@ -1062,7 +1062,7 @@ void Test::testSortRefUpdate4_Impl()
 ScAddress aPos(0,0,nTab);
 clearRange(m_pDoc, ScRange(0, 0, nTab, 1, SAL_N_ELEMENTS(aData), 
nTab));
 aLesson1Range = insertRangeData(m_pDoc, aPos, aData, 
SAL_N_ELEMENTS(aData));
-CPPUNIT_ASSERT_MESSAGE("failed to insert range data at correct 
position", aLesson1Range.aStart == aPos);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("failed to insert range data at correct 
position", aPos, aLesson1Range.aStart);
 }
 
 ScRange aLesson2Range;
@@ -1080,7 +1080,7 @@ void Test::testSortRefUpdate4_Impl()
 ScAddress aPos(0,0,nTab);
 clearRange(m_pDoc, ScRange(0, 0, nTab, 1, SAL_N_ELEMENTS(aData), 
nTab));
 aLesson2Range = insertRangeData(m_pDoc, aPos, aData, 
SAL_N_ELEMENTS(aData));
-CPPUNIT_ASSERT_MESSAGE("failed to insert range data at correct 
position", aLesson2Range.aStart == aPos);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("failed to insert range data at correct 
position", aPos, aLesson2Range.aStart);
 }
 
 ScRange aSortRange;
@@ -1098,7 +1098,7 @@ void Test::testSortRefUpdate4_Impl()
 ScAddress aPos(0,0,nTab);
 clearRange(m_pDoc, ScRange(0, 0, nTab, 1, SAL_N_ELEMENTS(aData), 
nTab));
 aSortRange = insertRangeData(m_pDoc, aPos, aData, 
SAL_N_ELEMENTS(aData));
-CPPUNIT_ASSERT_MESSAGE("failed to insert range data at correct 
position", aSortRange.aStart == aPos);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("failed to insert range data at correct 
position", aPos, aSortRange.aStart);
 }
 
 ScDBDocFunc aFunc(getDocShell());
@@ -1265,7 +1265,7 @@ void Test::testSortRefUpdate5()
 ScAddress aPos(0,0,nTab);
 clearRange(m_pDoc, ScRange(0, 0, nTab, 2, SAL_N_ELEMENTS(aData), 
nTab));
 aSortRange = insertRangeData(m_pDoc, aPos, aData, 
SAL_N_ELEMENTS(aData));
-CPPUNIT_ASSERT_MESSAGE("failed to insert range data at correct 
position", aSortRange.aStart == aPos);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("failed to insert range data at correct 
position", aPos, aSortRange.aStart);
 
 // Actual results and expected 

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

2016-03-05 Thread Aleksas Pantechovskis
 sc/qa/unit/ucalc.cxx   |   22 +--
 sc/qa/unit/ucalc_sharedformula.cxx |   70 ++---
 2 files changed, 46 insertions(+), 46 deletions(-)

New commits:
commit 4ccd0d99f00b11f1615a50f5eabaf261cc218c76
Author: Aleksas Pantechovskis 
Date:   Fri Mar 4 15:50:37 2016 +0200

tdf#98264, replace CPPUNIT_ASSERT with CPPUNIT_ASSERT_EQUAL

Change-Id: I682eba5e733fdd3f93781d48c0cfcb3452ba7da0
Reviewed-on: https://gerrit.libreoffice.org/22907
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/qa/unit/ucalc_sharedformula.cxx 
b/sc/qa/unit/ucalc_sharedformula.cxx
index ba4d8dd..d543deb 100644
--- a/sc/qa/unit/ucalc_sharedformula.cxx
+++ b/sc/qa/unit/ucalc_sharedformula.cxx
@@ -43,7 +43,7 @@ void Test::testSharedFormulas()
 CPPUNIT_ASSERT_MESSAGE("This cell is expected to be a shared formula 
cell.", pFC && pFC->IsShared());
 CPPUNIT_ASSERT_EQUAL(static_cast(9), pFC->GetSharedTopRow());
 CPPUNIT_ASSERT_EQUAL(static_cast(2), pFC->GetSharedLength());
-CPPUNIT_ASSERT_MESSAGE("The token is expected to be shared.", 
pFC->GetCode() == pFC->GetSharedCode());
+CPPUNIT_ASSERT_EQUAL_MESSAGE("The token is expected to be shared.", 
pFC->GetCode(), pFC->GetSharedCode());
 
 aPos.SetRow(8); // B9
 m_pDoc->SetString(aPos, "=A9*2");
@@ -51,7 +51,7 @@ void Test::testSharedFormulas()
 CPPUNIT_ASSERT_MESSAGE("This cell is expected to be a shared formula 
cell.", pFC && pFC->IsShared());
 CPPUNIT_ASSERT_EQUAL(static_cast(8), pFC->GetSharedTopRow());
 CPPUNIT_ASSERT_EQUAL(static_cast(3), pFC->GetSharedLength());
-CPPUNIT_ASSERT_MESSAGE("The token is expected to be shared.", 
pFC->GetCode() == pFC->GetSharedCode());
+CPPUNIT_ASSERT_EQUAL_MESSAGE("The token is expected to be shared.", 
pFC->GetCode(), pFC->GetSharedCode());
 
 aPos.SetRow(12); // B13
 m_pDoc->SetString(aPos, "=A13*2");
@@ -65,7 +65,7 @@ void Test::testSharedFormulas()
 CPPUNIT_ASSERT_MESSAGE("This cell is expected to be a shared formula 
cell.", pFC && pFC->IsShared());
 CPPUNIT_ASSERT_EQUAL(static_cast(8), pFC->GetSharedTopRow());
 CPPUNIT_ASSERT_EQUAL(static_cast(5), pFC->GetSharedLength());
-CPPUNIT_ASSERT_MESSAGE("The token is expected to be shared.", 
pFC->GetCode() == pFC->GetSharedCode());
+CPPUNIT_ASSERT_EQUAL_MESSAGE("The token is expected to be shared.", 
pFC->GetCode(), pFC->GetSharedCode());
 
 // Insert formulas to B15:B16.
 aPos.SetRow(14); // B15
@@ -76,7 +76,7 @@ void Test::testSharedFormulas()
 CPPUNIT_ASSERT_MESSAGE("This cell is expected to be a shared formula 
cell.", pFC && pFC->IsShared());
 CPPUNIT_ASSERT_EQUAL(static_cast(14), pFC->GetSharedTopRow());
 CPPUNIT_ASSERT_EQUAL(static_cast(2), pFC->GetSharedLength());
-CPPUNIT_ASSERT_MESSAGE("The token is expected to be shared.", 
pFC->GetCode() == pFC->GetSharedCode());
+CPPUNIT_ASSERT_EQUAL_MESSAGE("The token is expected to be shared.", 
pFC->GetCode(), pFC->GetSharedCode());
 
 // Insert a formula to B14, and B9:B16 should be shared.
 aPos.SetRow(13); // B14
@@ -85,7 +85,7 @@ void Test::testSharedFormulas()
 CPPUNIT_ASSERT_MESSAGE("This cell is expected to be a shared formula 
cell.", pFC && pFC->IsShared());
 CPPUNIT_ASSERT_EQUAL(static_cast(8), pFC->GetSharedTopRow());
 CPPUNIT_ASSERT_EQUAL(static_cast(8), pFC->GetSharedLength());
-CPPUNIT_ASSERT_MESSAGE("The token is expected to be shared.", 
pFC->GetCode() == pFC->GetSharedCode());
+CPPUNIT_ASSERT_EQUAL_MESSAGE("The token is expected to be shared.", 
pFC->GetCode(), pFC->GetSharedCode());
 
 // Insert an incompatible formula to B12, to split the shared range to 
B9:B11 and B13:B16.
 aPos.SetRow(11); // B12
@@ -98,14 +98,14 @@ void Test::testSharedFormulas()
 CPPUNIT_ASSERT_MESSAGE("This cell is expected to be a shared formula 
cell.", pFC && pFC->IsShared());
 CPPUNIT_ASSERT_EQUAL(static_cast(8), pFC->GetSharedTopRow());
 CPPUNIT_ASSERT_EQUAL(static_cast(3), pFC->GetSharedLength());
-CPPUNIT_ASSERT_MESSAGE("The token is expected to be shared.", 
pFC->GetCode() == pFC->GetSharedCode());
+CPPUNIT_ASSERT_EQUAL_MESSAGE("The token is expected to be shared.", 
pFC->GetCode(), pFC->GetSharedCode());
 
 aPos.SetRow(12); // B13
 pFC = m_pDoc->GetFormulaCell(aPos);
 CPPUNIT_ASSERT_MESSAGE("This cell is expected to be a shared formula 
cell.", pFC && pFC->IsShared());
 CPPUNIT_ASSERT_EQUAL(static_cast(12), pFC->GetSharedTopRow());
 CPPUNIT_ASSERT_EQUAL(static_cast(4), pFC->GetSharedLength());
-CPPUNIT_ASSERT_MESSAGE("The token is expected to be shared.", 
pFC->GetCode() == pFC->GetSharedCode());
+CPPUNIT_ASSERT_EQUAL_MESSAGE("The token is expected to be shared.", 
pFC->GetCode(), pFC->GetSharedCode());
 
 // Extend B13:B16 to B13:B20.
 aPos.SetRow(16); // B17
@@ -121,19 +121,19 @@ void 

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

2016-01-27 Thread Markus Mohrhard
 sc/qa/unit/data/xlsx/preserve_space.xlsx |binary
 sc/qa/unit/subsequent_export-test.cxx|   16 
 sc/source/filter/excel/xestring.cxx  |2 +-
 3 files changed, 17 insertions(+), 1 deletion(-)

New commits:
commit 4c61179b747e6309b9693cc1e2e79b2589aa807d
Author: Markus Mohrhard 
Date:   Wed Jan 27 16:27:06 2016 +0100

add test for tdf#96912

Change-Id: I6d3f7f86cffef8e91cf108c3aecdf5278e4b8658

diff --git a/sc/qa/unit/data/xlsx/preserve_space.xlsx 
b/sc/qa/unit/data/xlsx/preserve_space.xlsx
new file mode 100644
index 000..401a908
Binary files /dev/null and b/sc/qa/unit/data/xlsx/preserve_space.xlsx differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx 
b/sc/qa/unit/subsequent_export-test.cxx
index 761a34a..e1f89b4 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -155,6 +155,7 @@ public:
 void testMoveCellAnchoredShapes();
 void testMatrixMultiplication();
 void testPreserveTextWhitespaceXLSX();
+void testPreserveTextWhitespace2XLSX();
 void testTextDirection();
 
 void testRefStringXLSX();
@@ -211,6 +212,7 @@ public:
 CPPUNIT_TEST(testLinkedGraphicRT);
 CPPUNIT_TEST(testImageWithSpecialID);
 CPPUNIT_TEST(testPreserveTextWhitespaceXLSX);
+CPPUNIT_TEST(testPreserveTextWhitespace2XLSX);
 CPPUNIT_TEST(testSheetLocalRangeNameXLS);
 CPPUNIT_TEST(testSheetTextBoxHyperlink);
 CPPUNIT_TEST(testFontSize);
@@ -2782,6 +2784,20 @@ void ScExportTest::testPreserveTextWhitespaceXLSX()
 xDocSh->DoClose();
 }
 
+void ScExportTest::testPreserveTextWhitespace2XLSX()
+{
+ScDocShellRef xShell = loadDoc("preserve_space.", FORMAT_XLSX);
+ScDocShellRef xDocSh = saveAndReload(&(*xShell), FORMAT_XLSX);
+CPPUNIT_ASSERT(xDocSh.Is());
+
+xmlDocPtr pDoc = XPathHelper::parseExport(&(*xDocSh), m_xSFactory, 
"xl/sharedStrings.xml", FORMAT_XLSX);
+CPPUNIT_ASSERT(pDoc);
+assertXPath(pDoc, "/x:sst/x:si[1]/x:t", "space", "preserve");
+assertXPath(pDoc, "/x:sst/x:si[2]/x:r[1]/x:t", "space", "preserve");
+assertXPath(pDoc, "/x:sst/x:si[2]/x:r[2]/x:t", "space", "preserve");
+xDocSh->DoClose();
+}
+
 void ScExportTest::testHiddenShape()
 {
 ScDocShellRef xDocSh = loadDoc("hiddenShape.", FORMAT_XLSX);
commit 8aa853b2365430558693a32aa23825e199543cf9
Author: Markus Mohrhard 
Date:   Wed Jan 27 16:25:50 2016 +0100

we need the space="preserve" also for formatted strings, tdf#96912

Change-Id: I6e245de697c1c42acd916beb75d4d157b2962a9a

diff --git a/sc/source/filter/excel/xestring.cxx 
b/sc/source/filter/excel/xestring.cxx
index 58d1acef..d30b2f7 100644
--- a/sc/source/filter/excel/xestring.cxx
+++ b/sc/source/filter/excel/xestring.cxx
@@ -401,7 +401,7 @@ static sal_uInt16 lcl_WriteRun( XclExpXmlStream& rStrm, 
const ScfUInt16Vec& rBuf
 rWorksheet->endElement( XML_rPr );
 }
 rWorksheet->startElement( XML_t,
-FSEND );
+FSNS(XML_xml, XML_space), "preserve", FSEND );
 rWorksheet->writeEscaped( XclXmlUtils::ToOUString( rBuffer, nStart, 
nLength ) );
 rWorksheet->endElement( XML_t );
 rWorksheet->endElement( XML_r );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-01-03 Thread Markus Mohrhard
 sc/qa/unit/ucalc.hxx  |2 +-
 sc/source/core/tool/token.cxx |   13 +++--
 2 files changed, 4 insertions(+), 11 deletions(-)

New commits:
commit f4dc8a869ac49f19c20fc5fa606448e9103726bd
Author: Markus Mohrhard 
Date:   Sun Jan 3 16:29:50 2016 +0100

the idea behind the test can't work right now

The Test currently tries to test the OpenCL and the SW interpreter and
assumes that it will show different results. However if we succeed in
generating an OpenCL interpreter we will never generate a SW interpreter.

There are a number of problems with the approach taken in this test.

1.) Assuming that we are able to execute OpenCL is an invalid
assumption.

2.) Changing the configuration inside of a test needs to be exeption
save as we are otherwise left with a strange config for the remaining
test cases.

3.) Changing the configuration does not change the formula group
interpreter. This needs to be done explicitly.

Change-Id: I679985ee7551b21aaa52038e107324980e7e1bb6

diff --git a/sc/qa/unit/ucalc.hxx b/sc/qa/unit/ucalc.hxx
index fc90f81..b3e5bf3 100644
--- a/sc/qa/unit/ucalc.hxx
+++ b/sc/qa/unit/ucalc.hxx
@@ -474,7 +474,7 @@ public:
 CPPUNIT_TEST(testFormulaCreateStringFromTokens);
 CPPUNIT_TEST(testFormulaParseReference);
 CPPUNIT_TEST(testFetchVectorRefArray);
-CPPUNIT_TEST(testFormulaHashAndTag);
+// CPPUNIT_TEST(testFormulaHashAndTag);
 CPPUNIT_TEST(testFormulaTokenEquality);
 CPPUNIT_TEST(testFormulaRefData);
 CPPUNIT_TEST(testFormulaCompiler);
commit c4a90354df1009cd24a3ac4d1c72624759e7fe16
Author: Markus Mohrhard 
Date:   Sun Jan 3 16:18:46 2016 +0100

let us use the standard way to implement an if .. else if

Change-Id: Ie0b3efdbe23a163aab1e8d128217ee1f1c7fd287

diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 05221e7..8e62a26 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -1514,10 +1514,8 @@ void ScTokenArray::CheckToken( const FormulaToken& r )
 default:
 meVectorState = FormulaVectorDisabled;
 }
-return;
 }
-
-if (eOp == ocPush)
+else if (eOp == ocPush)
 {
 // This is a stack variable.  See if this is a reference.
 
@@ -1557,28 +1555,23 @@ void ScTokenArray::CheckToken( const FormulaToken& r )
 default:
 ;
 }
-return;
 }
-
-if (eOp >= SC_OPCODE_START_BIN_OP &&
+else if (eOp >= SC_OPCODE_START_BIN_OP &&
 eOp <= SC_OPCODE_STOP_UN_OP &&
 ScInterpreter::GetGlobalConfig().mbOpenCLSubsetOnly &&
 ScInterpreter::GetGlobalConfig().mpOpenCLSubsetOpCodes->find(eOp) == 
ScInterpreter::GetGlobalConfig().mpOpenCLSubsetOpCodes->end())
 {
 meVectorState = FormulaVectorDisabled;
-return;
 }
-
 // only when openCL interpreter is not enabled - the assumption is that
 // the S/W interpreter blacklist is more strict
-if (eOp >= SC_OPCODE_START_BIN_OP &&
+else if (eOp >= SC_OPCODE_START_BIN_OP &&
 eOp <= SC_OPCODE_STOP_UN_OP &&
 ScCalcConfig::isSwInterpreterEnabled() &&
 
(dynamic_cast(sc::FormulaGroupInterpreter::getStatic())
 != nullptr) &&
 
ScInterpreter::GetGlobalConfig().mpSwInterpreterSubsetOpCodes->find(eOp) == 
ScInterpreter::GetGlobalConfig().mpSwInterpreterSubsetOpCodes->end())
 {
 meVectorState = FormulaVectorDisabled;
-return;
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-11-25 Thread Michael Meeks
 sc/qa/extras/macros-test.cxx  |2 +-
 sw/source/core/unocore/unotbl.cxx |   24 +++-
 2 files changed, 24 insertions(+), 2 deletions(-)

New commits:
commit be6108a861891b2e7060c6e16c47450d0b8b86e6
Author: Michael Meeks 
Date:   Wed Nov 25 14:22:29 2015 +

sw: SwXTextTableCursor needs to take the SolarMutex in release.

Change-Id: I1fb5baabd869c4abe8ccf9eeae131efcc697bbee

diff --git a/sw/source/core/unocore/unotbl.cxx 
b/sw/source/core/unocore/unotbl.cxx
index 6f93d12..044a514 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -795,6 +795,8 @@ void SAL_CALL SwXCell::acquire(  ) throw()
 
 void SAL_CALL SwXCell::release(  ) throw()
 {
+SolarMutexGuard aGuard;
+
 SwXCellBaseClass::release();
 }
 
@@ -1430,7 +1432,27 @@ OUString SwXTextTableCursor::getImplementationName() 
throw( uno::RuntimeExceptio
 sal_Bool SwXTextTableCursor::supportsService(const OUString& rServiceName) 
throw( uno::RuntimeException, std::exception )
 { return cppu::supportsService(this, rServiceName); }
 
-IMPLEMENT_FORWARD_XINTERFACE2(SwXTextTableCursor,SwXTextTableCursor_Base,OTextCursorHelper)
+void SwXTextTableCursor::acquire() throw()
+{
+SwXTextTableCursor_Base::release();
+}
+
+void SwXTextTableCursor::release() throw()
+{
+SolarMutexGuard aGuard;
+SwXTextTableCursor_Base::release();
+}
+
+css::uno::Any SAL_CALL
+SwXTextTableCursor::queryInterface( const css::uno::Type& _rType )
+throw (css::uno::RuntimeException, std::exception)
+{
+css::uno::Any aReturn = SwXTextTableCursor_Base::queryInterface( _rType );
+if ( !aReturn.hasValue() )
+aReturn = OTextCursorHelper::queryInterface( _rType );
+return aReturn;
+}
+
 const SwPaM*SwXTextTableCursor::GetPaM() const  { return (); 
}
 SwPaM*  SwXTextTableCursor::GetPaM(){ return (); 
}
 const SwDoc*SwXTextTableCursor::GetDoc() const  { return 
GetFrameFormat()->GetDoc(); }
commit e63938cad10f15d50f27b3e3575069ace7358d07
Author: Michael Meeks 
Date:   Wed Nov 25 14:19:15 2015 +

sc: improve vba macro debugging output.

Change-Id: I8c8cd6255b6722d4d46d6e652e9d9d9722fe112e

diff --git a/sc/qa/extras/macros-test.cxx b/sc/qa/extras/macros-test.cxx
index e2a6f32..9243250 100644
--- a/sc/qa/extras/macros-test.cxx
+++ b/sc/qa/extras/macros-test.cxx
@@ -326,7 +326,7 @@ void ScMacrosTest::testVba()
 SfxObjectShell* pFoundShell = 
SfxObjectShell::GetShellFromComponent(xComponent);
 
 CPPUNIT_ASSERT_MESSAGE("Failed to access document shell", pFoundShell);
-SAL_INFO("sc.qa", "about to invoke vba test in " << aFileName);
+SAL_INFO("sc.qa", "about to invoke vba test in " << aFileName << " 
with url " << testInfo[i].sMacroUrl);
 
 SfxObjectShell::CallXScript(
 xComponent, testInfo[i].sMacroUrl, aParams, aRet, aOutParamIndex,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


  1   2   3   >