[Libreoffice-commits] .: 3 commits - officecfg/registry sc/qa
Markus Mohrhard
mmohrhard at kemper.freedesktop.org
Tue Apr 24 03:08:59 PDT 2012
officecfg/registry/data/org/openoffice/TypeDetection/UISort.xcu | 6 -
sc/qa/unit/ucalc.cxx | 45 +++++++++-
2 files changed, 47 insertions(+), 4 deletions(-)
New commits:
commit f3d7d6ece96d74e55dc92babfd12812dfe1a4793
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Tue Apr 24 12:06:43 2012 +0200
default to Office 2007/2010 filter for ooxml export, fdo#48941
diff --git a/officecfg/registry/data/org/openoffice/TypeDetection/UISort.xcu b/officecfg/registry/data/org/openoffice/TypeDetection/UISort.xcu
index 4593983..e0d569d 100644
--- a/officecfg/registry/data/org/openoffice/TypeDetection/UISort.xcu
+++ b/officecfg/registry/data/org/openoffice/TypeDetection/UISort.xcu
@@ -30,7 +30,7 @@
<node oor:name="ModuleDependendFilterOrder">
<node oor:name="com.sun.star.sheet.SpreadsheetDocument" oor:op="replace" install:module="calc">
<prop oor:name="SortedFilterList">
- <value oor:separator=";">calc8;calc8_template;StarOffice XML (Calc);calc_StarOffice_XML_Calc_Template;Calc Office Open XML;Calc Office Open XML Template;OpenDocument Spreadsheet Flat XML;UOF spreadsheet;Calc MS Excel 2007 XML;Calc MS Excel 2007 XML Template;Calc MS Excel 2007 Binary;MS Excel 2003 XML;MS Excel 97;MS Excel 97 Vorlage/Template;MS Excel 95;MS Excel 95 Vorlage/Template;MS Excel 5.0/95;MS Excel 5.0/95 Vorlage/Template;MS Excel 4.0;MS Excel 4.0 Vorlage/Template;StarCalc 5.0;StarCalc 5.0 Vorlage/Template;StarCalc 4.0;StarCalc 4.0 Vorlage/Template;StarCalc 3.0;StarCalc 3.0 Vorlage/Template;StarCalc 1.0;DIF;dBase;HTML (StarCalc);Lotus;Pocket Excel;Quattro Pro 6.0;Rich Text Format (StarCalc);SYLK;Text - txt - csv (StarCalc);calc_HTML_WebQuery</value>
+ <value oor:separator=";">calc8;calc8_template;StarOffice XML (Calc);calc_StarOffice_XML_Calc_Template;OpenDocument Spreadsheet Flat XML;UOF spreadsheet;Calc MS Excel 2007 XML;Calc MS Excel 2007 XML Template;Calc MS Excel 2007 Binary;MS Excel 2003 XML;MS Excel 97;MS Excel 97 Vorlage/Template;MS Excel 95;MS Excel 95 Vorlage/Template;MS Excel 5.0/95;MS Excel 5.0/95 Vorlage/Template;MS Excel 4.0;MS Excel 4.0 Vorlage/Template;StarCalc 5.0;StarCalc 5.0 Vorlage/Template;StarCalc 4.0;StarCalc 4.0 Vorlage/Template;StarCalc 3.0;StarCalc 3.0 Vorlage/Template;StarCalc 1.0;DIF;dBase;HTML (StarCalc);Lotus;Pocket Excel;Quattro Pro 6.0;Rich Text Format (StarCalc);SYLK;Text - txt - csv (StarCalc);calc_HTML_WebQuery;Calc Office Open XML;Calc Office Open XML Template</value>
</prop>
</node>
<node oor:name="com.sun.star.drawing.DrawingDocument" oor:op="replace" install:module="draw" >
@@ -40,7 +40,7 @@
</node>
<node oor:name="com.sun.star.presentation.PresentationDocument" oor:op="replace" install:module="impress">
<prop oor:name="SortedFilterList">
- <value oor:separator=";">impress8;impress8_template;impress8_draw;StarOffice XML (Impress);impress_StarOffice_XML_Impress_Template;impress_StarOffice_XML_Draw;Impress Office Open XML;Impress Office Open XML AutoPlay;Impress Office Open XML Template;OpenDocument Presentation Flat XML;UOF presentation;Impress MS PowerPoint 2007 XML;Impress MS PowerPoint 2007 XML AutoPlay;Impress MS PowerPoint 2007 XML Template;MS PowerPoint 97;MS PowerPoint 97 AutoPlay;MS PowerPoint 97 Vorlage;StarDraw 5.0 (StarImpress);StarDraw 3.0 (StarImpress);StarImpress 5.0;StarImpress 5.0 Vorlage;StarImpress 5.0 (packed);StarImpress 4.0;StarImpress 4.0 Vorlage;CGM - Computer Graphics Metafile</value>
+ <value oor:separator=";">impress8;impress8_template;impress8_draw;StarOffice XML (Impress);impress_StarOffice_XML_Impress_Template;impress_StarOffice_XML_Draw;OpenDocument Presentation Flat XML;UOF presentation;Impress MS PowerPoint 2007 XML;Impress MS PowerPoint 2007 XML AutoPlay;Impress MS PowerPoint 2007 XML Template;MS PowerPoint 97;MS PowerPoint 97 AutoPlay;MS PowerPoint 97 Vorlage;StarDraw 5.0 (StarImpress);StarDraw 3.0 (StarImpress);StarImpress 5.0;StarImpress 5.0 Vorlage;StarImpress 5.0 (packed);StarImpress 4.0;StarImpress 4.0 Vorlage;CGM - Computer Graphics Metafile;Impress Office Open XML;Impress Office Open XML AutoPlay;Impress Office Open XML Template</value>
</prop>
</node>
<node oor:name="com.sun.star.formula.FormulaProperties" oor:op="replace" install:module="math">
@@ -55,7 +55,7 @@
</node>
<node oor:name="com.sun.star.text.TextDocument" oor:op="replace" install:module="writer">
<prop oor:name="SortedFilterList">
- <value oor:separator=";">writer8;writer8_template;StarOffice XML (Writer);writer_StarOffice_XML_Writer_Template;Office Open XML Text;Office Open XML Text Template;OpenDocument Text Flat XML;UOF text;MS Word 2007 XML;MS Word 2007 XML Template;MS Word 2003 XML;MS Word 97;MS Word 97 Vorlage;MS Word 95;MS Word 95 Vorlage;MS WinWord 6.0;MS WinWord 5;MS_Works;AportisDoc Palm DB;DocBook File;writer_MIZI_Hwp_97;HTML (StarWriter);LotusWordPro;PocketWord File;Rich Text Format;StarWriter 5.0;StarWriter 5.0 Vorlage/Template;StarWriter 4.0;StarWriter 4.0 Vorlage/Template;StarWriter 3.0;StarWriter 3.0 Vorlage/Template;T602Document;Text;Text (encoded);WordPerfect</value>
+ <value oor:separator=";">writer8;writer8_template;StarOffice XML (Writer);writer_StarOffice_XML_Writer_Template;OpenDocument Text Flat XML;UOF text;MS Word 2007 XML;MS Word 2007 XML Template;MS Word 2003 XML;MS Word 97;MS Word 97 Vorlage;MS Word 95;MS Word 95 Vorlage;MS WinWord 6.0;MS WinWord 5;MS_Works;AportisDoc Palm DB;DocBook File;writer_MIZI_Hwp_97;HTML (StarWriter);LotusWordPro;PocketWord File;Rich Text Format;StarWriter 5.0;StarWriter 5.0 Vorlage/Template;StarWriter 4.0;StarWriter 4.0 Vorlage/Template;StarWriter 3.0;StarWriter 3.0 Vorlage/Template;T602Document;Text;Text (encoded);WordPerfect;Office Open XML Text;Office Open XML Text Template</value>
</prop>
</node>
<node oor:name="com.sun.star.text.WebDocument" oor:op="replace" install:module="writer">
commit 270096698d96f2654d4699c90ed0df20b7d15fbe
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Mon Apr 23 21:02:31 2012 +0200
first try for copy/paste formulas between docs test case
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 4f6a642..8585a10 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -210,6 +210,7 @@ public:
void testAutoFill();
void testCopyPasteFormulas();
+ void testCopyPasteFormulasExternalDoc();
CPPUNIT_TEST_SUITE(Test);
CPPUNIT_TEST(testCollator);
@@ -251,6 +252,7 @@ public:
CPPUNIT_TEST(testRenameTable);
CPPUNIT_TEST(testAutoFill);
CPPUNIT_TEST(testCopyPasteFormulas);
+ CPPUNIT_TEST(testCopyPasteFormulasExternalDoc);
CPPUNIT_TEST_SUITE_END();
private:
@@ -4258,6 +4260,31 @@ void Test::testCopyPasteFormulas()
CPPUNIT_ASSERT_EQUAL(aFormula, rtl::OUString("=$Sheet2.K$1"));
}
+void Test::testCopyPasteFormulasExternalDoc()
+{
+ ScDocShellRef xExtDocSh = new ScDocShell;
+ OUString aExtDocName(RTL_CONSTASCII_USTRINGPARAM("file:///extdata.fake"));
+ OUString aExtSh1Name(RTL_CONSTASCII_USTRINGPARAM("ExtSheet1"));
+ OUString aExtSh2Name(RTL_CONSTASCII_USTRINGPARAM("ExtSheet2"));
+ OUString aExtSh3Name(RTL_CONSTASCII_USTRINGPARAM("ExtSheet3"));
+ SfxMedium* pMed = new SfxMedium(aExtDocName, STREAM_STD_READWRITE);
+ xExtDocSh->DoInitNew(pMed);
+ CPPUNIT_ASSERT_MESSAGE("external document instance not loaded.",
+ findLoadedDocShellByName(aExtDocName) != NULL);
+
+ ScDocument* pExtDoc = xExtDocSh->GetDocument();
+
+ m_pDoc->InsertTab(0, "Sheet1");
+ m_pDoc->InsertTab(1, "Sheet2");
+
+ m_pDoc->SetString(0,0,0, "=COLUMN($A$1)");
+ m_pDoc->SetString(0,1,0, "=$A$1+B2" );
+ m_pDoc->SetString(0,2,0, "=$Sheet2.A1");
+ m_pDoc->SetString(0,3,0, "=$Sheet2.$A$1");
+ m_pDoc->SetString(0,4,0, "=$Sheet2.A$1");
+
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
}
commit 043c4bf56f716761c240fe253d16fce2ae4089f7
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Mon Apr 23 11:48:18 2012 +0200
add some more test cases for copying formulas
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 9542320..4f6a642 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -4229,17 +4229,33 @@ void Test::testCopyPasteFormulas()
m_pDoc->InsertTab(1, "Sheet2");
m_pDoc->SetString(0,0,0, "=COLUMN($A$1)");
+ m_pDoc->SetString(0,1,0, "=$A$1+B2" );
+ m_pDoc->SetString(0,2,0, "=$Sheet2.A1");
+ m_pDoc->SetString(0,3,0, "=$Sheet2.$A$1");
+ m_pDoc->SetString(0,4,0, "=$Sheet2.A$1");
+
+ // to prevent ScEditableTester in ScDocFunc::MoveBlock
m_pDoc->SetInTest();
CPPUNIT_ASSERT_DOUBLES_EQUAL(m_pDoc->GetValue(0,0,0), 1.0, 1e-08);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(m_pDoc->GetValue(0,1,0), 1.0, 1e-08);
ScDocFunc& rDocFunc = m_xDocShRef->GetDocFunc();
- bool bMoveDone = rDocFunc.MoveBlock(ScRange(0,0,0), ScAddress( 10, 10, 0), false, false, false, true);
+ bool bMoveDone = rDocFunc.MoveBlock(ScRange(0,0,0,0,4,0), ScAddress( 10, 10, 0), false, false, false, true);
// check that moving was succesful, mainly for editable tester
CPPUNIT_ASSERT(bMoveDone);
CPPUNIT_ASSERT_DOUBLES_EQUAL(m_pDoc->GetValue(10,10,0), 1.0, 1e-8);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(m_pDoc->GetValue(10,11,0), 1.0, 1e-8);
rtl::OUString aFormula;
m_pDoc->GetFormula(10,10,0, aFormula);
CPPUNIT_ASSERT_EQUAL(aFormula, rtl::OUString("=COLUMN($A$1)"));
+ m_pDoc->GetFormula(10,11,0, aFormula);
+ CPPUNIT_ASSERT_EQUAL(aFormula, rtl::OUString("=$A$1+L12"));
+ m_pDoc->GetFormula(10,12,0, aFormula);
+ CPPUNIT_ASSERT_EQUAL(aFormula, rtl::OUString("=$Sheet2.K11"));
+ m_pDoc->GetFormula(10,13,0, aFormula);
+ CPPUNIT_ASSERT_EQUAL(aFormula, rtl::OUString("=$Sheet2.$A$1"));
+ m_pDoc->GetFormula(10,14,0, aFormula);
+ CPPUNIT_ASSERT_EQUAL(aFormula, rtl::OUString("=$Sheet2.K$1"));
}
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
More information about the Libreoffice-commits
mailing list