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

2016-05-26 Thread Miklos Vajna
 sd/qa/unit/import-tests.cxx |   32 
 1 file changed, 16 insertions(+), 16 deletions(-)

New commits:
commit 5b16390e5eacb87ff455c5a9f78b7639b0098d74
Author: Miklos Vajna 
Date:   Thu May 26 07:42:12 2016 +0200

CppunitTest_sd_import_tests: fix loplugin:cppunitassertequals warnings

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

diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 93dca4c..b599496 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -248,7 +248,7 @@ void SdImportTest::testSmoketest()
 
 // cf. SdrModel svx/svdmodel.hxx ...
 
-CPPUNIT_ASSERT_MESSAGE( "wrong page count", pDoc->GetPageCount() == 3);
+CPPUNIT_ASSERT_EQUAL_MESSAGE( "wrong page count", 
static_cast(3), pDoc->GetPageCount());
 
 const SdrPage *pPage = pDoc->GetPage (1);
 CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
@@ -284,7 +284,7 @@ void SdImportTest::testN759180()
 const EditTextObject& aEdit = 
pTxtObj->GetOutlinerParaObject()->GetTextObject();
 const SvxULSpaceItem *pULSpace = dynamic_cast(aEdit.GetParaAttribs(0).GetItem(EE_PARA_ULSPACE));
 CPPUNIT_ASSERT(pULSpace);
-CPPUNIT_ASSERT_MESSAGE( "Para bottom spacing is wrong!", 
pULSpace->GetLower() == 0 );
+CPPUNIT_ASSERT_EQUAL_MESSAGE( "Para bottom spacing is wrong!", 
static_cast(0), pULSpace->GetLower());
 aEdit.GetCharAttribs(1, rLst);
 for( std::vector::reverse_iterator it = rLst.rbegin(); 
it!=rLst.rend(); ++it)
 {
@@ -293,7 +293,7 @@ void SdImportTest::testN759180()
 {
 // nStart == 9
 // font height = 5 => 5*2540/72
-CPPUNIT_ASSERT_MESSAGE( "Font height is wrong", 
pFontHeight->GetHeight() == 176 );
+CPPUNIT_ASSERT_EQUAL_MESSAGE( "Font height is wrong", 
static_cast(176), pFontHeight->GetHeight() );
 break;
 }
 }
@@ -334,7 +334,7 @@ void SdImportTest::testN862510_2()
 CPPUNIT_ASSERT( pGrpObj );
 SdrObjCustomShape *pObj = dynamic_cast( 
pGrpObj->GetSubList()->GetObj( 0 ) );
 CPPUNIT_ASSERT( pObj );
-CPPUNIT_ASSERT_MESSAGE( "Wrong Text Rotation!", 
pObj->GetExtraTextRotation( true ) == 90 );
+CPPUNIT_ASSERT_EQUAL_MESSAGE( "Wrong Text Rotation!", 90.0, 
pObj->GetExtraTextRotation( true ) );
 }
 
 xDocShRef->DoClose();
@@ -371,8 +371,8 @@ void SdImportTest::testN828390_2()
 SdrTextObj *pTxtObj = dynamic_cast( pObj );
 CPPUNIT_ASSERT( pTxtObj );
 const EditTextObject& aEdit = 
pTxtObj->GetOutlinerParaObject()->GetTextObject();
-CPPUNIT_ASSERT(aEdit.GetText(0) == "Linux  ");
-CPPUNIT_ASSERT(aEdit.GetText(1) == "Standard Platform");
+CPPUNIT_ASSERT_EQUAL(OUString("Linux  "), aEdit.GetText(0));
+CPPUNIT_ASSERT_EQUAL(OUString("Standard Platform"), aEdit.GetText(1));
 
 xDocShRef->DoClose();
 }
@@ -527,7 +527,7 @@ void SdImportTest::testFdo68594()
 const SvxColorItem *pC = dynamic_cast(>GetMergedItem(EE_CHAR_COLOR));
 CPPUNIT_ASSERT_MESSAGE( "no color item", pC != nullptr);
 // Color should be black
-CPPUNIT_ASSERT_MESSAGE( "Placeholder color mismatch", 
pC->GetValue().GetColor() == 0);
+CPPUNIT_ASSERT_EQUAL_MESSAGE( "Placeholder color mismatch", 
static_cast(0), pC->GetValue().GetColor());
 
 xDocShRef->DoClose();
 }
@@ -627,11 +627,11 @@ void SdImportTest::testFdo64512()
 
 uno::Reference< drawing::XDrawPagesSupplier > xDoc(
 xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY_THROW );
-CPPUNIT_ASSERT_MESSAGE( "not exactly one page", 
xDoc->getDrawPages()->getCount() == 1 );
+CPPUNIT_ASSERT_EQUAL_MESSAGE( "not exactly one page", 
static_cast(1), xDoc->getDrawPages()->getCount() );
 
 uno::Reference< drawing::XDrawPage > xPage(
 xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY_THROW );
-CPPUNIT_ASSERT_MESSAGE( "no exactly three shapes", xPage->getCount() == 3 
);
+CPPUNIT_ASSERT_EQUAL_MESSAGE( "no exactly three shapes", 
static_cast(3), xPage->getCount() );
 
 uno::Reference< beans::XPropertySet > xConnectorShape(
 xPage->getByIndex(2), uno::UNO_QUERY );
@@ -651,7 +651,7 @@ void SdImportTest::testFdo64512()
 xAnimNodeSupplier->getAnimationNode() );
 std::vector< uno::Reference< animations::XAnimationNode > > aAnimVector;
 anim::create_deep_vector(xRootNode, aAnimVector);
-CPPUNIT_ASSERT_MESSAGE( "not 8 animation nodes", aAnimVector.size() == 8 );
+CPPUNIT_ASSERT_EQUAL_MESSAGE( "not 8 animation nodes", 
static_cast(8), aAnimVector.size() );
 
 uno::Reference< animations::XAnimate > xNode(
 aAnimVector[7], uno::UNO_QUERY_THROW );
@@ -687,16 +687,16 @@ void SdImportTest::testFdo71075()
 uno::Reference< 

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

2016-05-19 Thread Miklos Vajna
 sd/qa/unit/uimpress.cxx |   16 
 1 file changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 71b74f8fd1fc84cf92dddeab02647b8b765d0d4a
Author: Miklos Vajna 
Date:   Thu May 19 08:54:06 2016 +0200

CppunitTest_sd_uimpress: fix loplugin:cppunitassertequals warnings

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

diff --git a/sd/qa/unit/uimpress.cxx b/sd/qa/unit/uimpress.cxx
index af06d8c..10f6aa7 100644
--- a/sd/qa/unit/uimpress.cxx
+++ b/sd/qa/unit/uimpress.cxx
@@ -85,19 +85,19 @@ void Test::testAddPage()
 {
 SdrPage* pPage = m_pDoc->AllocPage(false);
 m_pDoc->InsertPage(pPage);
-CPPUNIT_ASSERT_MESSAGE("added one page to model",
-   m_pDoc->GetPageCount()==1);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("added one page to model",
+ static_cast(1), 
m_pDoc->GetPageCount());
 m_pDoc->DeletePage(0);
-CPPUNIT_ASSERT_MESSAGE("removed one page to model",
-   m_pDoc->GetPageCount()==0);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("removed one page to model",
+ static_cast(0), 
m_pDoc->GetPageCount());
 
 SdrPage* pMasterPage = m_pDoc->AllocPage(true);
 m_pDoc->InsertMasterPage(pMasterPage);
-CPPUNIT_ASSERT_MESSAGE("added one master page to model",
-   m_pDoc->GetMasterPageCount()==1);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("added one master page to model",
+ static_cast(1), 
m_pDoc->GetMasterPageCount());
 m_pDoc->DeleteMasterPage(0);
-CPPUNIT_ASSERT_MESSAGE("removed one master page to model",
-   m_pDoc->GetMasterPageCount()==0);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("removed one master page to model",
+ static_cast(0), 
m_pDoc->GetMasterPageCount());
 }
 
 void Test::testCustomShow()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-05-18 Thread Matus Uzak
 sd/qa/unit/data/ppt/tdf49561.ppt |binary
 sd/qa/unit/import-tests.cxx  |   28 
 sd/source/filter/ppt/pptin.cxx   |3 ++-
 3 files changed, 30 insertions(+), 1 deletion(-)

New commits:
commit bd3ed061de068a03a7c75f093c9a9bd7b6f3ba57
Author: Matus Uzak 
Date:   Wed May 4 19:09:00 2016 +0200

tdf#49561: PPT import: Avoid to override formatting from StyleTextPropAtom

Change-Id: Id874cb369b08eb7f8226413c6541fe6cd18eceaa
Reviewed-on: https://gerrit.libreoffice.org/24662
Tested-by: Jenkins 
Reviewed-by: Thorsten Behrens 

diff --git a/sd/qa/unit/data/ppt/tdf49561.ppt b/sd/qa/unit/data/ppt/tdf49561.ppt
new file mode 100644
index 000..c80bf12
Binary files /dev/null and b/sd/qa/unit/data/ppt/tdf49561.ppt differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index e95cfec..93dca4c 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -121,6 +121,7 @@ public:
 void testTdf93868();
 void testTdf95932();
 void testTdf99030();
+void testTdf49561();
 
 CPPUNIT_TEST_SUITE(SdImportTest);
 
@@ -170,6 +171,7 @@ public:
 CPPUNIT_TEST(testTdf93868);
 CPPUNIT_TEST(testTdf95932);
 CPPUNIT_TEST(testTdf99030);
+CPPUNIT_TEST(testTdf49561);
 
 CPPUNIT_TEST_SUITE_END();
 };
@@ -1378,6 +1380,32 @@ void SdImportTest::testTdf99030()
 xDocShRef->DoClose();
 }
 
+void SdImportTest::testTdf49561()
+{
+sd::DrawDocShellRef xDocShRef = 
loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/ppt/tdf49561.ppt"), PPT);
+
+uno::Reference< drawing::XMasterPagesSupplier > xDoc(
+xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY_THROW );
+uno::Reference< drawing::XDrawPage > xPage(
+xDoc->getMasterPages()->getByIndex( 0 ), uno::UNO_QUERY_THROW );
+CPPUNIT_ASSERT_EQUAL( sal_Int32(5), xPage->getCount() );
+
+uno::Reference< beans::XPropertySet > xShape( getShape( 3, xPage ) );
+uno::Reference xParagraph( getParagraphFromShape( 0, 
xShape ) );
+uno::Reference xRun( getRunFromParagraph (0, xParagraph 
) );
+uno::Reference< beans::XPropertySet > xPropSet(xRun , uno::UNO_QUERY_THROW 
);
+
+float fCharHeight = 0;
+CPPUNIT_ASSERT(xPropSet->getPropertyValue("CharHeight") >>= fCharHeight);
+CPPUNIT_ASSERT_EQUAL(12.f, fCharHeight);
+
+OUString aCharFontName;
+CPPUNIT_ASSERT(xPropSet->getPropertyValue("CharFontName") >>= 
aCharFontName);
+CPPUNIT_ASSERT_EQUAL(OUString("Stencil"), aCharFontName);
+
+xDocShRef->DoClose();
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 2d77024..8eac912 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -2287,7 +2287,9 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* 
pTextObj, SdrTextObj* pObj
 break;
 default: break;
 }
+
 pText = static_cast(SdrPowerPointImport::ApplyTextObj( 
pTextObj, pText, pPageCapsule, pSheet, ppStyleSheetAry ));
+
 if ( pPlaceHolder && pPlaceHolder->nPlaceholderId != PptPlaceholder::NONE )
 {
 if ( eAktPageKind == PPT_MASTERPAGE )
@@ -2330,7 +2332,6 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* 
pTextObj, SdrTextObj* pObj
 rItemSet.Put( pText->GetMergedItemSet() );
 }
 }
-pText->NbcSetStyleSheet( pSheet2, false );
 }
 
 SfxItemSet aTempAttr( mpDoc->GetPool() );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-04-19 Thread Miklos Vajna
 sd/qa/unit/data/tdf99396.odp |binary
 sd/qa/unit/misc-tests.cxx|   29 +
 svx/source/table/tablecontroller.cxx |   18 +-
 3 files changed, 46 insertions(+), 1 deletion(-)

New commits:
commit 6819992113947e7a6272bf750fee712c2df41905
Author: Miklos Vajna 
Date:   Tue Apr 19 17:56:24 2016 +0200

tdf#99396 SvxTableController::SetVertical: implement undo support

All the table and cell objects know how to undo this change, what was
missing is the begin/end undo calls and the broadcast of the cell
format change.

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

diff --git a/sd/qa/unit/data/tdf99396.odp b/sd/qa/unit/data/tdf99396.odp
new file mode 100644
index 000..6362600
Binary files /dev/null and b/sd/qa/unit/data/tdf99396.odp differ
diff --git a/sd/qa/unit/misc-tests.cxx b/sd/qa/unit/misc-tests.cxx
index 4747cf3..105c071 100644
--- a/sd/qa/unit/misc-tests.cxx
+++ b/sd/qa/unit/misc-tests.cxx
@@ -24,12 +24,16 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
 #include 
 
 using namespace ::com::sun::star;
@@ -40,10 +44,12 @@ class SdMiscTest : public SdModelTestBase
 public:
 void testTdf96206();
 void testTdf96708();
+void testTdf99396();
 
 CPPUNIT_TEST_SUITE(SdMiscTest);
 CPPUNIT_TEST(testTdf96206);
 CPPUNIT_TEST(testTdf96708);
+CPPUNIT_TEST(testTdf99396);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -135,6 +141,29 @@ void SdMiscTest::testTdf96708()
 xDocSh->DoClose();
 }
 
+void SdMiscTest::testTdf99396()
+{
+// Load the document and select the table.
+sd::DrawDocShellRef xDocSh = 
Load(m_directories.getURLFromSrc("/sd/qa/unit/data/tdf99396.odp"), ODP);
+sd::ViewShell *pViewShell = xDocSh->GetViewShell();
+SdPage* pPage = pViewShell->GetActualPage();
+SdrObject* pObject = pPage->GetObj(0);
+SdrView* pView = pViewShell->GetView();
+pView->MarkObj(pObject, pView->GetSdrPageView());
+
+// Make sure that the undo stack is empty.
+CPPUNIT_ASSERT_EQUAL(static_cast(0), 
xDocSh->GetDoc()->GetUndoManager()->GetUndoActionCount());
+
+// Set the vertical alignment of the cells to bottom.
+sdr::table::SvxTableController* pTableController = 
dynamic_cast(pView->getSelectionController().get());
+SfxRequest aRequest(pViewShell->GetViewFrame(), SID_TABLE_VERT_BOTTOM);
+pTableController->Execute(aRequest);
+// This was 0, it wasn't possible to undo a vertical alignment change.
+CPPUNIT_ASSERT_EQUAL(static_cast(1), 
xDocSh->GetDoc()->GetUndoManager()->GetUndoActionCount());
+
+xDocSh->DoClose();
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SdMiscTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/svx/source/table/tablecontroller.cxx 
b/svx/source/table/tablecontroller.cxx
index b98feb2..aba6ded 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -1172,6 +1172,13 @@ void SvxTableController::SetVertical( sal_uInt16 nSId )
 {
 TableModelNotifyGuard aGuard( mxTable.get() );
 
+bool bUndo = mpModel && mpModel->IsUndoEnabled();
+if (bUndo)
+{
+mpModel->BegUndo(ImpGetResStr(STR_TABLE_NUMFORMAT));
+
mpModel->AddUndo(mpModel->GetSdrUndoFactory().CreateUndoAttrObject(*pTableObj));
+}
+
 CellPos aStart, aEnd;
 getSelectedCells( aStart, aEnd );
 
@@ -1198,11 +1205,20 @@ void SvxTableController::SetVertical( sal_uInt16 nSId )
 {
 CellRef xCell( dynamic_cast< Cell* >( 
mxTable->getCellByPosition( nCol, nRow ).get() ) );
 if( xCell.is() )
-xCell->SetMergedItem(aItem);
+{
+if (bUndo)
+xCell->AddUndo();
+SfxItemSet aSet(xCell->GetItemSet());
+aSet.Put(aItem);
+xCell->SetMergedItemSetAndBroadcast(aSet, 
/*bClearAllItems=*/false);
+}
 }
 }
 
 UpdateTableShape();
+
+if (bUndo)
+mpModel->EndUndo();
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-04-12 Thread Miklos Vajna
 sd/qa/unit/data/odp/tdf99224.odp |binary
 sd/qa/unit/export-tests.cxx  |   12 
 sd/source/filter/eppt/pptx-epptooxml.cxx |4 +++-
 3 files changed, 15 insertions(+), 1 deletion(-)

New commits:
commit fc70e4c4e192372f77511bc6ce2bc77b9c9539be
Author: Miklos Vajna 
Date:   Tue Apr 12 10:30:11 2016 +0200

tdf#99224 PPTX export: implement support for images with text

In case an image had text, then ShapeExport::WriteGraphicObjectShapePart()
wanted to write "only the text", but PowerPointShapeExport::WriteTextShape()
had no idea how to write an image, so at the end nothing was exported.

Change-Id: I6c1ad0b41d4c5dc260b952322fb8a59e7f175603

diff --git a/sd/qa/unit/data/odp/tdf99224.odp b/sd/qa/unit/data/odp/tdf99224.odp
new file mode 100644
index 000..e52a000
Binary files /dev/null and b/sd/qa/unit/data/odp/tdf99224.odp differ
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index 59e49d2..624d290 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -154,6 +154,7 @@ public:
 void testMathObjectPPT2010();
 void testTdf80224();
 void testTdf92527();
+void testTdf99224();
 
 CPPUNIT_TEST_SUITE(SdExportTest);
 CPPUNIT_TEST(testFdo90607);
@@ -207,6 +208,7 @@ public:
 CPPUNIT_TEST(testSlideNameField);
 CPPUNIT_TEST(testExtFileField);
 CPPUNIT_TEST(testAuthorField);
+CPPUNIT_TEST(testTdf99224);
 
 CPPUNIT_TEST_SUITE_END();
 
@@ -1690,6 +1692,16 @@ void SdExportTest::testAuthorField()
 xDocShRef->DoClose();
 }
 
+void SdExportTest::testTdf99224()
+{
+sd::DrawDocShellRef xShell = 
loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/tdf99224.odp"), ODP);
+xShell = saveAndReload(xShell, PPTX);
+uno::Reference xPage = getPage(0, xShell);
+// This was 0: the image with text was lost on export.
+CPPUNIT_ASSERT_EQUAL(static_cast(1), xPage->getCount());
+xShell->DoClose();
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SdExportTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx 
b/sd/source/filter/eppt/pptx-epptooxml.cxx
index e968e33..fdd1d4e 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -245,7 +245,7 @@ ShapeExport& PowerPointShapeExport::WriteTextShape( const 
Reference< XShape >& x
 
 DBG(printf( "shape(text): %s\n", USS(sShapeType) ));
 
-if ( sShapeType == "com.sun.star.drawing.TextShape" )
+if ( sShapeType == "com.sun.star.drawing.TextShape" || sShapeType == 
"com.sun.star.drawing.GraphicObjectShape" )
 {
 ShapeExport::WriteTextShape( xShape );
 }
@@ -286,6 +286,8 @@ ShapeExport& PowerPointShapeExport::WriteTextShape( const 
Reference< XShape >& x
 if( !WritePlaceholder( xShape, Title, mbMaster ) )
 ShapeExport::WriteTextShape( xShape );
 }
+else
+SAL_WARN("sd.filter", "PowerPointShapeExport::WriteTextShape: shape of 
type '" << sShapeType << "' is ignored");
 
 return *this;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-04-06 Thread Miklos Vajna
 sd/qa/unit/tiledrendering/tiledrendering.cxx |8 
 sw/inc/expfld.hxx|   12 ++--
 2 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit b1ee1925ff1bbe502d9a708a98e025bb50a17c90
Author: Miklos Vajna 
Date:   Wed Apr 6 13:53:11 2016 +0200

Indentation fixes

Change-Id: Ieba9dfed344e04067278300365172162d6d44aae

diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx 
b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 3d1b0b5..d50d01e 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -636,10 +636,10 @@ void SdTiledRenderingTest::testInsertTable()
 SdXImpressDocument* pXImpressDocument = createDoc("dummy.odp");
 
 uno::Sequence aArgs(comphelper::InitPropertySequence(
-{
-{ "Rows", uno::makeAny(sal_Int32(3)) },
-{ "Columns", uno::makeAny(sal_Int32(5)) }
-}
+{
+{ "Rows", uno::makeAny(sal_Int32(3)) },
+{ "Columns", uno::makeAny(sal_Int32(5)) }
+}
 ));
 
 comphelper::dispatchCommand(".uno:InsertTable", aArgs);
diff --git a/sw/inc/expfld.hxx b/sw/inc/expfld.hxx
index 5263bac..c51f1bd 100644
--- a/sw/inc/expfld.hxx
+++ b/sw/inc/expfld.hxx
@@ -73,13 +73,13 @@ public:
 class SwGetExpFieldType : public SwValueFieldType
 {
 public:
-SwGetExpFieldType(SwDoc* pDoc);
-virtual SwFieldType*Copy() const override;
+SwGetExpFieldType(SwDoc* pDoc);
+virtual SwFieldType*Copy() const override;
 
-/** Overlay, because get-field cannot be changed and therefore
- does not need to be updated. Update at changing of set-values! */
+/** Overlay, because get-field cannot be changed and therefore
+ does not need to be updated. Update at changing of set-values! */
 protected:
-   virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) 
override;
+virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) 
override;
 };
 
 class SW_DLLPUBLIC SwGetExpField : public SwFormulaField
@@ -155,7 +155,7 @@ class SW_DLLPUBLIC SwSetExpFieldType : public 
SwValueFieldType
 boolbDeleted;
 
 protected:
-   virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) 
override;
+virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) 
override;
 
 public:
 SwSetExpFieldType( SwDoc* pDoc, const OUString& rName,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-31 Thread Tor Lillqvist
 sd/qa/unit/tiledrendering/tiledrendering.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit a88837470d7a01e63c28ac3930c1f10d84dc218d
Author: Tor Lillqvist 
Date:   Thu Mar 31 19:31:18 2016 +0300

loplugin:unreffun

Presumably the use of testSearchAllFollowedBySearch was removed by accident.

Change-Id: I074426cd644fb64d0a8d3682b361e1aa8c20be0f

diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx 
b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index ae85a4b..585c3f9 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -75,6 +75,7 @@ public:
 CPPUNIT_TEST(testSearchAll);
 CPPUNIT_TEST(testSearchAllSelections);
 CPPUNIT_TEST(testSearchAllNotifications);
+CPPUNIT_TEST(testSearchAllFollowedBySearch);
 CPPUNIT_TEST(testInsertDeletePage);
 CPPUNIT_TEST(testInsertTable);
 #endif
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-31 Thread Michael Stahl
 sd/qa/unit/tiledrendering/tiledrendering.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit eaced256be7e5c2ebcea01d14b2f521629e22848
Author: Michael Stahl 
Date:   Thu Mar 31 18:02:59 2016 +0200

sd: overloading in C++ fail episode 6315

Change-Id: I334037739f00bbb318fa780fcca898e099bc8fb8

diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx 
b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index f62fa5e..ae85a4b 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -636,8 +636,8 @@ void SdTiledRenderingTest::testInsertTable()
 
 uno::Sequence aArgs(comphelper::InitPropertySequence(
 {
-{"Rows", uno::makeAny(3)},
-{"Columns", uno::makeAny(5)}
+{ "Rows", uno::makeAny(sal_Int32(3)) },
+{ "Columns", uno::makeAny(sal_Int32(5)) }
 }
 ));
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-19 Thread Aleksas Pantechovskis
 sd/qa/unit/export-tests.cxx |   14 ++
 sd/qa/unit/import-tests.cxx |   10 ++
 2 files changed, 24 insertions(+)

New commits:
commit 080f355f11ee3422e9512815efd9f8d7eb896d32
Author: Aleksas Pantechovskis 
Date:   Mon Mar 7 16:09:06 2016 +0200

tdf#65219 Fix temp files clean up in sd unit tests

Change-Id: I99037b01c1d644b1803b315cc5e3d8fa5a19bcfb
Reviewed-on: https://gerrit.libreoffice.org/22986
Tested-by: Jenkins 
Reviewed-by: jan iversen 

diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index 222c7f0..a81d32f 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -431,6 +431,8 @@ void SdExportTest::testTransparentBackground()
 
 const SdrTextObj *pObj2 = dynamic_cast( pPage->GetObj( 1 ) );
 checkFontAttributes( pObj2, 
Color(COL_YELLOW));
+
+xDocShRef->DoClose();
 }
 
 void SdExportTest::testMediaEmbedding()
@@ -474,6 +476,8 @@ void SdExportTest::testFdo84043()
 const SdrPage *pPage = GetPage( 1, xDocShRef );
 SdrObject const* pShape = pPage->GetObj(1);
 CPPUNIT_ASSERT_MESSAGE("no shape", pShape != nullptr);
+
+xDocShRef->DoClose();
 }
 
 void SdExportTest::testFdo71961()
@@ -743,6 +747,8 @@ void SdExportTest::testTdf80020()
 uno::Reference 
xStyleFamily(xStyleFamilies->getByName("graphics"), uno::UNO_QUERY);
 uno::Reference xStyle(xStyleFamily->getByName("Test 
Style"), uno::UNO_QUERY);
 CPPUNIT_ASSERT_EQUAL(OUString("text"), xStyle->getParentStyle());
+
+xDocShRef->DoClose();
 }
 
 void SdExportTest::testLinkedGraphicRT()
@@ -1009,6 +1015,8 @@ void SdExportTest::testBulletColor()
 const SvxNumBulletItem *pNumFmt = dynamic_cast(aEdit.GetParaAttribs(0).GetItem(EE_PARA_NUMBULLET));
 CPPUNIT_ASSERT(pNumFmt);
 CPPUNIT_ASSERT_EQUAL_MESSAGE( "Bullet's color is wrong!", 
sal_uInt32(0xff),pNumFmt->GetNumRule()->GetLevel(0).GetBulletColor().GetColor());
+
+xDocShRef->DoClose();
 }
 
 void SdExportTest::testTdf62176()
@@ -1052,6 +1060,8 @@ void SdExportTest::testTdf62176()
 //Checking the *Text* in TextBox
 uno::Reference xParagraph2( getParagraphFromShape( 0, 
xShape2 ) );
 CPPUNIT_ASSERT_EQUAL(OUString("Hello World"), xParagraph2->getString());
+
+xDocShRef->DoClose();
 }
 
 void SdExportTest::testBulletCharAndFont()
@@ -1262,6 +1272,8 @@ void SdExportTest::testBulletMarginAndIndentation()
 
 CPPUNIT_ASSERT_EQUAL_MESSAGE( "Bullet's left margin is wrong!", 
sal_uInt32(1000),sal_uInt32(pNumFmt->GetNumRule()->GetLevel(0).GetAbsLSpace()) 
); // left margin is 0.79 cm
 CPPUNIT_ASSERT_EQUAL_MESSAGE( "Bullet's indentation is wrong!", 
sal_Int32(-998),sal_Int32(pNumFmt->GetNumRule()->GetLevel(0). 
GetFirstLineOffset()));
+
+xDocShRef->DoClose();
 }
 
 void SdExportTest::testParaMarginAndindentation()
@@ -1464,6 +1476,8 @@ void SdExportTest::testExportTransitionsPPTX()
 
 // NEWSFLASH
 CPPUNIT_ASSERT(checkTransitionOnPage(xDoc, 74, TransitionType::ZOOM, 
TransitionSubType::ROTATEIN));
+
+xDocShRef->DoClose();
 }
 
 void SdExportTest::testTdf92527()
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 89b47ab..b102396 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -478,6 +478,8 @@ void SdImportTest::testGradientAngle()
 
 CPPUNIT_ASSERT(xTranspGradients->getByName("Transparency 4") >>= gradient);
 CPPUNIT_ASSERT_EQUAL(sal_Int16(1800), gradient.Angle); // 1000grad
+
+xDocShRef->DoClose();
 }
 
 void SdImportTest::testN778859()
@@ -597,6 +599,8 @@ void SdImportTest::testTdf97808()
 CPPUNIT_ASSERT_EQUAL(xStyle, xParent);
 CPPUNIT_ASSERT(xLine->getPropertyValue("LineEndName") >>= lineend);
 CPPUNIT_ASSERT_EQUAL(OUString(), lineend);
+
+xDocShRef->DoClose();
 }
 
 void SdImportTest::testFdo64512()
@@ -1124,6 +1128,8 @@ void SdImportTest::testBnc910045()
 xCell.set(xTable->getCellByPosition(0, 0), uno::UNO_QUERY_THROW);
 xCell->getPropertyValue("FillColor") >>= nColor;
 CPPUNIT_ASSERT_EQUAL(sal_Int32(5210557), nColor);
+
+xDocShRef->DoClose();
 }
 
 void SdImportTest::testRowHeight()
@@ -1141,6 +1147,8 @@ void SdImportTest::testRowHeight()
 uno::Reference< beans::XPropertySet > xRefRow( xRows->getByIndex(0), 
uno::UNO_QUERY_THROW );
 xRefRow->getPropertyValue( sHeight ) >>= nHeight;
 CPPUNIT_ASSERT_EQUAL( sal_Int32(507), nHeight);
+
+xDocShRef->DoClose();
 }
 void SdImportTest::testTdf93830()
 {
@@ -1192,6 +1200,8 @@ void SdImportTest::testTdf62255()
 aAny >>= aFillStyle;
 CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, aFillStyle);
 }
+
+xDocShRef->DoClose();
 }
 
 void SdImportTest::testTdf89927()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-10 Thread Stephan Bergmann
 sd/qa/unit/import-tests.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 22d6c786ef60f2db7d9f255b2ee1c35a0590e6a5
Author: Stephan Bergmann 
Date:   Thu Mar 10 11:47:45 2016 +0100

Adapt to "Extract Directories from BootstrapFixtureBase"

(60b1c95cc47831246f097ee13dda8bcd71c57eb4)

Change-Id: I7d2319624b7a4ae38b1673c5a0053626f7f58c1c

diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index b5e7431..89b47ab 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -1196,7 +1196,7 @@ void SdImportTest::testTdf62255()
 
 void SdImportTest::testTdf89927()
 {
-sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc("/sd/qa/unit/data/pptx/tdf89927.pptx"), PPTX);
+sd::DrawDocShellRef xDocShRef = 
loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf89927.pptx"), 
PPTX);
 uno::Reference< beans::XPropertySet > xShape( getShapeFromPage( 0, 0, 
xDocShRef ) );
 uno::Reference< text::XTextRange > xParagraph( getParagraphFromShape( 0, 
xShape ) );
 uno::Reference< text::XTextRange > xRun( getRunFromParagraph( 0, 
xParagraph ) );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-10 Thread Oliver Specht
 sd/qa/unit/tiledrendering/tiledrendering.cxx |2 +-
 sot/source/base/exchange.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 36bf13247b01075b533b127c7e5ffc760f9642f8
Author: Oliver Specht 
Date:   Wed Mar 9 16:19:51 2016 +0100

tdf#97591: mark RTF clipboard format as text/rtf

text/rtf replaces text/richtext which is not RTF

Change-Id: I2be750b595ba23ed75698b68c0d4ffd8f3a12870
Reviewed-on: https://gerrit.libreoffice.org/23086
Reviewed-by: Oliver Specht 
Tested-by: Oliver Specht 

diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx 
b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 0bc9ad8..f1c9901 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -354,7 +354,7 @@ void SdTiledRenderingTest::testGetTextSelection()
 CPPUNIT_ASSERT_EQUAL(OString("Shape"), 
pXImpressDocument->getTextSelection("text/plain;charset=utf-8", aUsedFormat));
 
 // Make sure returned RTF is not empty.
-
CPPUNIT_ASSERT(!OString(pXImpressDocument->getTextSelection("text/richtext", 
aUsedFormat)).isEmpty());
+CPPUNIT_ASSERT(!OString(pXImpressDocument->getTextSelection("text/rtf", 
aUsedFormat)).isEmpty());
 }
 
 void SdTiledRenderingTest::testSetGraphicSelection()
diff --git a/sot/source/base/exchange.cxx b/sot/source/base/exchange.cxx
index 36c5a50..80cebd0 100644
--- a/sot/source/base/exchange.cxx
+++ b/sot/source/base/exchange.cxx
@@ -68,7 +68,7 @@ namespace
 /*  7 EMPTY*/   { "", "", 
::UnoType::get() },
 /*  8 EMPTY*/   { "", "", 
::UnoType::get() },
 /*  9 EMPTY*/   { "", "", 
::UnoType::get() },
-/* 10 SotClipboardFormatId::RTF*/  { 
"text/richtext", "Rich Text Format", ::UnoType::get() 
},
+/* 10 SotClipboardFormatId::RTF*/  { 
"text/rtf", "Rich Text Format", ::UnoType::get() },
 /* 11 SotClipboardFormatId::DRAWING*/{ 
"application/x-openoffice-drawing;windows_formatname=\"Drawing Format\"", 
"Drawing Format", ::UnoType::get() },
 /* 12 SotClipboardFormatId::SVXB*/   { 
"application/x-openoffice-svxb;windows_formatname=\"SVXB (StarView 
Bitmap/Animation)\"", "SVXB (StarView Bitmap/Animation)", 
::UnoType::get() },
 /* 13 SotClipboardFormatId::SVIM*/   { 
"application/x-openoffice-svim;windows_formatname=\"SVIM (StarView 
ImageMap)\"", "SVIM (StarView ImageMap)", 
::UnoType::get() },
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-02-29 Thread Caolán McNamara
 sd/qa/unit/data/odp/pass/ooo72169-1.odp  |binary
 svx/inc/sdr/properties/pageproperties.hxx|3 +++
 svx/source/sdr/properties/pageproperties.cxx |5 +
 3 files changed, 8 insertions(+)

New commits:
commit 836cd17fcd62677e3be2ccb1b7e633f8d12c313e
Author: Caolán McNamara 
Date:   Mon Feb 29 10:01:40 2016 +

crashtesting: sync PageProperties::SetStyleSheet with GetStyleSheet

PageProperties::GetStyleSheet returns 0 so PageProperties::SetStyleSheet
should do nothing

Change-Id: If627ba3e31b14ff5178f45125f0ce6e4dbf93ec0

diff --git a/sd/qa/unit/data/odp/pass/ooo72169-1.odp 
b/sd/qa/unit/data/odp/pass/ooo72169-1.odp
new file mode 100644
index 000..7a024b8
Binary files /dev/null and b/sd/qa/unit/data/odp/pass/ooo72169-1.odp differ
diff --git a/svx/inc/sdr/properties/pageproperties.hxx 
b/svx/inc/sdr/properties/pageproperties.hxx
index c6e9d30..5df093a 100644
--- a/svx/inc/sdr/properties/pageproperties.hxx
+++ b/svx/inc/sdr/properties/pageproperties.hxx
@@ -59,6 +59,9 @@ namespace sdr
 // get the installed StyleSheet
 virtual SfxStyleSheet* GetStyleSheet() const override;
 
+// set the installed StyleSheet
+virtual void SetStyleSheet(SfxStyleSheet* pStyleSheet, bool 
bDontRemoveHardAttr) override;
+
 // clear single item
 virtual void ClearObjectItem(const sal_uInt16 nWhich = 0) override;
 };
diff --git a/svx/source/sdr/properties/pageproperties.cxx 
b/svx/source/sdr/properties/pageproperties.cxx
index 20758b0..2250aa2 100644
--- a/svx/source/sdr/properties/pageproperties.cxx
+++ b/svx/source/sdr/properties/pageproperties.cxx
@@ -79,6 +79,11 @@ namespace sdr
 return nullptr;
 }
 
+void PageProperties::SetStyleSheet(SfxStyleSheet* /*pStyleSheet*/, 
bool /*bDontRemoveHardAttr*/)
+{
+// override to legally ignore the StyleSheet here
+}
+
 void PageProperties::PostItemChange(const sal_uInt16 nWhich )
 {
 if( (nWhich == XATTR_FILLSTYLE) && (mpEmptyItemSet != nullptr) )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-02-27 Thread Julien Nabet
 sd/qa/unit/import-tests.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3b70cd7e5196438d7880789f8512f8b1f07f40da
Author: Julien Nabet 
Date:   Sat Feb 27 11:52:21 2016 +0100

Replace include  by ostream

Change-Id: I7cf84a1f1deaaa5ab575333ba6b99d31d2307f45

diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index dd32469..67c181c 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -8,7 +8,7 @@
  */
 
 #include 
-#include 
+#include 
 
 #include "sdmodeltestbase.hxx"
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-02-27 Thread Julien Nabet
 sd/qa/unit/import-tests.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit efde35042111b425871a6ff79922785ed7e8b41e
Author: Julien Nabet 
Date:   Sat Feb 27 11:13:31 2016 +0100

Blind fix for failing TBs

Change-Id: I2556417d5924ef4ae91dd888befc2ff6461ea2d0

diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index cdfd7f6..dd32469 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -8,6 +8,7 @@
  */
 
 #include 
+#include 
 
 #include "sdmodeltestbase.hxx"
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-02-26 Thread Michael Stahl
 sd/qa/unit/data/tdf97808.fodp   |   30 ++
 sd/qa/unit/import-tests.cxx |   38 
 sd/qa/unit/sdmodeltestbase.hxx  |3 ++
 xmloff/source/draw/XMLShapeStyleContext.cxx |6 +++-
 4 files changed, 76 insertions(+), 1 deletion(-)

New commits:
commit af57a81d0c28944b424649f024c28f444a1ab2d9
Author: Michael Stahl 
Date:   Fri Feb 26 22:35:26 2016 +0100

xmloff: tdf#97808: allow empty draw:marker-start/marker-end/stroke-dash

Apparently these are allowed to be empty, which means "nothing".

(regression from db1d278dcc308c73eb5edebc20481c96e7f479d8)

Change-Id: I13f7998e0986b26c34929afd40b1b4f0fc9efdff

diff --git a/sd/qa/unit/data/tdf97808.fodp b/sd/qa/unit/data/tdf97808.fodp
new file mode 100644
index 000..ac2d3e2
--- /dev/null
+++ b/sd/qa/unit/data/tdf97808.fodp
@@ -0,0 +1,30 @@
+
+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: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:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oas
 is: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:officeooo="http://openoffice.org/2009/office; 
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:formx="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.presentation">
+  
+
+
+
+
+  
+
+
+  
+  
+
+
+  
+
+
+  
+  
+
+
+  
+
+  
+
+  
+
+
+  
+
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 9f4c2e3..cdfd7f6 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -57,6 +57,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -73,6 +74,7 @@ public:
 void testN778859();
 void testMasterPageStyleParent();
 void testGradientAngle();
+void testTdf97808();
 void testFdo64512();
 void testFdo71075();
 void testN828390_2();
@@ -114,6 +116,7 @@ public:
 CPPUNIT_TEST(testN778859);
 CPPUNIT_TEST(testMasterPageStyleParent);
 CPPUNIT_TEST(testGradientAngle);
+CPPUNIT_TEST(testTdf97808);
 CPPUNIT_TEST(testFdo64512);
 CPPUNIT_TEST(testFdo71075);
 CPPUNIT_TEST(testN828390_2);
@@ -552,6 +555,41 @@ void SdImportTest::testFdo77027()
 xDocShRef->DoClose();
 }
 
+template
+std::ostream& operator<<(std::ostream& rStrm, const uno::Reference& xRef)
+{
+rStrm << xRef.get();
+return rStrm;
+}
+
+void SdImportTest::testTdf97808()
+{
+sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc("/sd/qa/unit/data/tdf97808.fodp"), FODP);
+
+uno::Reference xStyleFamiliesSupplier(
+xDocShRef->GetModel(), uno::UNO_QUERY);
+uno::Reference 
xStyleFamilies(xStyleFamiliesSupplier->getStyleFamilies(), uno::UNO_QUERY);
+uno::Reference 
xStyleFamily(xStyleFamilies->getByName("graphics"), uno::UNO_QUERY);
+uno::Reference 
xStyle(xStyleFamily->getByName("objectwithoutfill"), uno::UNO_QUERY);
+OUString lineend;
+CPPUNIT_ASSERT(xStyle->getPropertyValue("LineEndName") >>= lineend);
+CPPUNIT_ASSERT_EQUAL(OUString("Arrow"), lineend);
+
+// the draw:marker-end="" did not override the style
+uno::Reference xDoc(
+xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY_THROW);
+uno::Reference xPage(
+xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY_THROW);
+uno::Reference xLine(
+xPage->getByIndex(0), uno::UNO_QUERY_THROW);
+//uno::Reference xParent;
+uno::Reference xParent;
+CPPUNIT_ASSERT(xLine->getPropertyValue("Style") >>= xParent);
+

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

2016-02-24 Thread Miklos Vajna
 sd/qa/unit/tiledrendering/tiledrendering.cxx   |   18 +-
 sw/inc/docufld.hxx |6 +++---
 writerfilter/source/rtftok/rtfdocumentimpl.cxx |2 +-
 3 files changed, 13 insertions(+), 13 deletions(-)

New commits:
commit 76ab37fe9005c5bea719da4808bbea10206a9d17
Author: Miklos Vajna 
Date:   Wed Feb 24 09:22:27 2016 +0100

Indentation fixes

Change-Id: Icafd56488f58a5cc580912d720f91dacd110a7c2

diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx 
b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index baeb36b..402734c 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -522,7 +522,7 @@ void SdTiledRenderingTest::testInsertDeletePage()
 SdXImpressDocument* pXImpressDocument = createDoc("insert-delete.odp");
 pXImpressDocument->registerCallback(::callback, this);
 
-SdDrawDocument *pDoc = pXImpressDocument->GetDocShell()->GetDoc();
+SdDrawDocument* pDoc = pXImpressDocument->GetDocShell()->GetDoc();
 CPPUNIT_ASSERT(pDoc);
 
 // the document has 1 slide
@@ -531,11 +531,11 @@ void SdTiledRenderingTest::testInsertDeletePage()
 uno::Sequence aArgs;
 
 // Insert slides
-for(unsigned it = 1; it <= 10; it++)
+for (unsigned it = 1; it <= 10; it++)
 comphelper::dispatchCommand(".uno:InsertPage", aArgs);
 
 // Verify inserted slides
-for(auto i: m_aPageList)
+for (auto i: m_aPageList)
 {
 SdPage* pPage = pDoc->GetSdPage(i, PK_STANDARD);
 CPPUNIT_ASSERT(pPage);
@@ -544,11 +544,11 @@ void SdTiledRenderingTest::testInsertDeletePage()
 m_aPageList.clear();
 
 // Delete slides
-for(unsigned it = 1; it <= 10; it++)
+for (unsigned it = 1; it <= 10; it++)
 comphelper::dispatchCommand(".uno:DeletePage", aArgs);
 
 // Verify deleted slides
-for(auto i: m_aPageList)
+for (auto i: m_aPageList)
 {
 SdPage* pPage = pDoc->GetSdPage(i, PK_STANDARD);
 CPPUNIT_ASSERT(pPage == nullptr);
@@ -557,11 +557,11 @@ void SdTiledRenderingTest::testInsertDeletePage()
 m_aPageList.clear();
 
 // Undo deleted slides
-for(unsigned it = 1; it <= 10; it++)
+for (unsigned it = 1; it <= 10; it++)
 comphelper::dispatchCommand(".uno:Undo", aArgs);
 
 // Verify inserted slides
-for(auto i: m_aPageList)
+for (auto i: m_aPageList)
 {
 SdPage* pPage = pDoc->GetSdPage(i, PK_STANDARD);
 CPPUNIT_ASSERT(pPage);
@@ -570,11 +570,11 @@ void SdTiledRenderingTest::testInsertDeletePage()
 m_aPageList.clear();
 
 // Redo deleted slides
-for(unsigned it = 1; it <= 10; it++)
+for (unsigned it = 1; it <= 10; it++)
 comphelper::dispatchCommand(".uno:Redo", aArgs);
 
 // Verify deleted slides
-for(auto i: m_aPageList)
+for (auto i: m_aPageList)
 {
 SdPage* pPage = pDoc->GetSdPage(i, PK_STANDARD);
 CPPUNIT_ASSERT(pPage == nullptr);
diff --git a/sw/inc/docufld.hxx b/sw/inc/docufld.hxx
index d684e9f..18f6b70 100644
--- a/sw/inc/docufld.hxx
+++ b/sw/inc/docufld.hxx
@@ -562,8 +562,8 @@ public:
 virtual SwFieldType*Copy() const override;
 
 protected:
-   /// Overlay, because there is nothing to update!
-   virtual void Modify( const SfxPoolItem*, const SfxPoolItem * ) override;
+/// Overlay, because there is nothing to update!
+virtual void Modify( const SfxPoolItem*, const SfxPoolItem * ) override;
 };
 
 // Relative page numbering.
@@ -599,7 +599,7 @@ class SwRefPageGetFieldType : public SwFieldType
 void UpdateField( SwTextField* pTextField, _SetGetExpFields& rSetList );
 protected:
 /// overwritten to update all RefPageGet fields
-   virtual void Modify( const SfxPoolItem*, const SfxPoolItem * ) override;
+virtual void Modify( const SfxPoolItem*, const SfxPoolItem * ) override;
 public:
 SwRefPageGetFieldType( SwDoc* pDoc );
 virtual SwFieldType*Copy() const override;
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 7473a98..251ff6d 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -5184,7 +5184,7 @@ RTFError RTFDocumentImpl::popState()
 {
 aPictureURL = rtl::Uri::convertRelToAbs(aFileURL, 
m_aPicturePath);
 }
-catch(const rtl::MalformedUriException& rException)
+catch (const rtl::MalformedUriException& rException)
 {
 SAL_WARN("writerfilter", "rtl::Uri::convertRelToAbs() failed: 
" << rException.getMessage());
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-02-20 Thread Henry Castro
 sd/qa/unit/tiledrendering/tiledrendering.cxx|   62 ++--
 sd/source/core/drawdoc2.cxx |   26 ++
 sd/source/ui/slidesorter/inc/model/SlideSorterModel.hxx |4 -
 sd/source/ui/slidesorter/model/SlideSorterModel.cxx |   36 ++---
 4 files changed, 46 insertions(+), 82 deletions(-)

New commits:
commit 286adeb032df8ab30930b6f76f75b342a3fa314b
Author: Henry Castro 
Date:   Sat Feb 20 09:57:52 2016 -0400

sd lok: re-work LOK_CALLBACK_PARTS_COUNT_CHANGED callback

In the tiled rendering case, slide sorted view is not created.

This revert some portion commit 80d7c5859b9e7a834a915d7e8bbbe9bc2130108a

Change-Id: Ifc2b7535f36ca69268de3e462bdd50ade9ec3853
Reviewed-on: https://gerrit.libreoffice.org/22542
Tested-by: Jenkins 
Reviewed-by: Henry Castro 

diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx 
b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 9554251..baeb36b 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -25,9 +25,6 @@
 #include 
 #include 
 
-#include 
-#include 
-#include 
 #include 
 #include 
 #include 
@@ -48,7 +45,7 @@ public:
 virtual void tearDown() override;
 
 #if !defined(_WIN32) && !defined(MACOSX)
-void testInsertPage();
+void testInsertDeletePage();
 void testRegisterCallback();
 void testPostKeyEvent();
 void testPostMouseEvent();
@@ -65,7 +62,7 @@ public:
 
 CPPUNIT_TEST_SUITE(SdTiledRenderingTest);
 #if !defined(_WIN32) && !defined(MACOSX)
-CPPUNIT_TEST(testInsertPage);
+CPPUNIT_TEST(testInsertDeletePage);
 CPPUNIT_TEST(testRegisterCallback);
 CPPUNIT_TEST(testPostKeyEvent);
 CPPUNIT_TEST(testPostMouseEvent);
@@ -519,56 +516,22 @@ void SdTiledRenderingTest::testSearchAllFollowedBySearch()
 CPPUNIT_ASSERT_EQUAL(OString("match"), 
pXImpressDocument->getTextSelection("text/plain;charset=utf-8", aUsedFormat));
 }
 
-void SdTiledRenderingTest::testInsertPage()
+void SdTiledRenderingTest::testInsertDeletePage()
 {
-uno::Sequence aFilterOptions;
-uno::Reference xLoader(mxDesktop, uno::UNO_QUERY);
-CPPUNIT_ASSERT(xLoader.is());
-
-uno::Reference xComponent;
-xComponent = xLoader->loadComponentFromURL(
-getURLFromSrc(DATA_DIRECTORY) + "insert-delete.odp",
-"_blank",
-0,
-aFilterOptions);
-CPPUNIT_ASSERT(xComponent.is());
-
-SfxObjectShell* pFoundShell = 
SfxObjectShell::GetShellFromComponent(xComponent);
-CPPUNIT_ASSERT(pFoundShell);
-
-::sd::DrawDocShell* xDocSh = dynamic_cast(pFoundShell);
-CPPUNIT_ASSERT(xDocSh);
-
-sd::ViewShell* pViewShell = xDocSh->GetViewShell();
-CPPUNIT_ASSERT(pViewShell);
-
-sd::slidesorter::SlideSorterViewShell* pSSVS = nullptr;
-for (int i = 0; i < 1000; i++)
-{
-// Process all Tasks - slide sorter is created here
-while (Scheduler::ProcessTaskScheduling(true));
-if ((pSSVS = 
sd::slidesorter::SlideSorterViewShell::GetSlideSorter(pViewShell->GetViewShellBase()))
 != nullptr)
-break;
-TimeValue aSleep(0, 100 * 100); // 100 msec
-osl::Thread::wait(aSleep);
-}
-CPPUNIT_ASSERT(pSSVS);
-
 comphelper::LibreOfficeKit::setActive();
-SdXImpressDocument* pXImpressDocument = 
SdXImpressDocument::getImplementation(xDocSh->GetModel());
-CPPUNIT_ASSERT(pXImpressDocument);
+SdXImpressDocument* pXImpressDocument = createDoc("insert-delete.odp");
+pXImpressDocument->registerCallback(::callback, this);
+
 SdDrawDocument *pDoc = pXImpressDocument->GetDocShell()->GetDoc();
 CPPUNIT_ASSERT(pDoc);
 
 // the document has 1 slide
 CPPUNIT_ASSERT(pDoc->GetSdPageCount(PK_STANDARD) == 1);
 
-pXImpressDocument->registerCallback(::callback, this);
-
 uno::Sequence aArgs;
 
 // Insert slides
-for(unsigned nIterator=1; nIterator <= 10; nIterator++)
+for(unsigned it = 1; it <= 10; it++)
 comphelper::dispatchCommand(".uno:InsertPage", aArgs);
 
 // Verify inserted slides
@@ -581,7 +544,7 @@ void SdTiledRenderingTest::testInsertPage()
 m_aPageList.clear();
 
 // Delete slides
-for(unsigned nIterator=1; nIterator <= 10; nIterator++)
+for(unsigned it = 1; it <= 10; it++)
 comphelper::dispatchCommand(".uno:DeletePage", aArgs);
 
 // Verify deleted slides
@@ -594,7 +557,7 @@ void SdTiledRenderingTest::testInsertPage()
 m_aPageList.clear();
 
 // Undo deleted slides
-for(unsigned nIterator=1; nIterator <= 10; nIterator++)
+for(unsigned it = 1; it <= 10; it++)
 comphelper::dispatchCommand(".uno:Undo", aArgs);
 
 // Verify inserted slides
@@ -607,7 +570,7 @@ void SdTiledRenderingTest::testInsertPage()
 m_aPageList.clear();
 
 // Redo deleted slides
-for(unsigned nIterator=1; nIterator <= 10; nIterator++)
+

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

2016-02-05 Thread Caolán McNamara
 sd/qa/unit/data/odp/pass/ooo56974-1.odp |binary
 sd/source/ui/slideshow/slideshow.cxx|7 +++
 2 files changed, 7 insertions(+)

New commits:
commit 9cd24ca96340506e5ecd028e3a8d37de17aae3e9
Author: Caolán McNamara 
Date:   Fri Feb 5 11:22:48 2016 +

crashtesting: old files using StartWithNavigator fail to load

regression from...

commit 2503a1e99df463aef1bf87c94b7b4a8ee3554efe
Date:   Wed Jan 27 12:19:28 2016 -0500

tdf#96414 Remove showing navigator during slideshow

This isn't very user-friendly and the presenter console
does a much better job of this.

Change-Id: I10bec1bcd2305524446a20a34494c265330e4c10

diff --git a/sd/qa/unit/data/odp/pass/ooo56974-1.odp 
b/sd/qa/unit/data/odp/pass/ooo56974-1.odp
new file mode 100644
index 000..6a48db4
Binary files /dev/null and b/sd/qa/unit/data/odp/pass/ooo56974-1.odp differ
diff --git a/sd/source/ui/slideshow/slideshow.cxx 
b/sd/source/ui/slideshow/slideshow.cxx
index e787f03..99b27e0 100644
--- a/sd/source/ui/slideshow/slideshow.cxx
+++ b/sd/source/ui/slideshow/slideshow.cxx
@@ -116,6 +116,7 @@ const SfxItemPropertyMapEntry* 
ImplGetPresentationPropertyMap()
 { OUString("IsShowLogo"),   ATTR_PRESENT_SHOW_PAUSELOGO,   
 cppu::UnoType::get(),0, 0 },
 { OUString("IsTransitionOnClick"),  ATTR_PRESENT_CHANGE_PAGE,  
 cppu::UnoType::get(),0, 0 },
 { OUString("Pause"),ATTR_PRESENT_PAUSE_TIMEOUT,
 ::cppu::UnoType::get(),0, 0 },
+{ OUString("StartWithNavigator"),   ATTR_PRESENT_NAVIGATOR,
 cppu::UnoType::get(),0, 0 },
 { OUString("UsePen"),   ATTR_PRESENT_PEN,  
 cppu::UnoType::get(),0, 0 },
 { OUString(), 0, css::uno::Type(), 0, 0 }
 };
@@ -439,6 +440,10 @@ void SAL_CALL SlideShow::setPropertyValue( const OUString& 
aPropertyName, const
 }
 break;
 }
+case ATTR_PRESENT_NAVIGATOR:
+bIllegalArgument = false;
+//ignored, but exists in some older documents
+break;
 case ATTR_PRESENT_PEN:
 {
 bool bVal = false;
@@ -561,6 +566,8 @@ Any SAL_CALL SlideShow::getPropertyValue( const OUString& 
PropertyName ) throw(U
 return Any( rPresSettings.mbMouseVisible );
 case ATTR_PRESENT_ALWAYS_ON_TOP:
 return Any( rPresSettings.mbAlwaysOnTop );
+case ATTR_PRESENT_NAVIGATOR:
+return Any( sal_False );
 case ATTR_PRESENT_PEN:
 return Any( rPresSettings.mbMouseAsPen );
 case ATTR_PRESENT_PAUSE_TIMEOUT:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-01-29 Thread Xisco Fauli
 sd/qa/unit/import-tests.cxx|3 +--
 svx/source/table/cell.cxx  |2 +-
 svx/source/table/tablelayouter.cxx |   12 +++-
 3 files changed, 13 insertions(+), 4 deletions(-)

New commits:
commit 13d4398820ded5914f635757865e258db2db2b57
Author: Xisco Fauli 
Date:   Thu Jan 21 20:56:31 2016 +0100

tdf#91762: Check wether the row and the cell have text...

... in order to set the row's min height

Regression from 4f2c8194f485b1527fb4f4dfe23ce804937f1f9c
After this commit, the row's min height was set based only on
the cells containing text in the row, but the problem appeared
when the row didn't have any cell with text.
Change logic to check wether there's text in the cell and in the row.

Now, height in SdImportTest::testRowHeight() is 507 instead of
508 but I can't figure it out why. However, I believe there's
no harm in change the test from 508 to 507 as, visually speaking,
the difference can't be distinguish.

Change-Id: I0b3a14c34eaeaa8e77227860ca290fb79a0302ce
Reviewed-on: https://gerrit.libreoffice.org/21692
Tested-by: Jenkins 
Reviewed-by: jan iversen 

diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 49db223..9f4c2e3 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -1093,9 +1093,8 @@ void SdImportTest::testRowHeight()
 uno::Reference< css::table::XTableRows > xRows( xTable->getRows(), 
uno::UNO_QUERY_THROW);
 uno::Reference< beans::XPropertySet > xRefRow( xRows->getByIndex(0), 
uno::UNO_QUERY_THROW );
 xRefRow->getPropertyValue( sHeight ) >>= nHeight;
-CPPUNIT_ASSERT_EQUAL( sal_Int32(508), nHeight);
+CPPUNIT_ASSERT_EQUAL( sal_Int32(507), nHeight);
 }
-
 void SdImportTest::testTdf93830()
 {
 // Text shape offset was ignored
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index 6b70d08..b2d1604 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -718,7 +718,7 @@ sal_Int32 Cell::getMinimumHeight()
 pEditOutliner->SetMaxAutoPaperSize(aSize);
 nMinimumHeight = pEditOutliner->GetTextHeight()+1;
 }
-else if ( hasText() )
+else
 {
 Outliner& rOutliner=rTableObj.ImpGetDrawOutliner();
 rOutliner.SetPaperSize(aSize);
diff --git a/svx/source/table/tablelayouter.cxx 
b/svx/source/table/tablelayouter.cxx
index 892b0d9..1df1378 100644
--- a/svx/source/table/tablelayouter.cxx
+++ b/svx/source/table/tablelayouter.cxx
@@ -688,6 +688,7 @@ void TableLayouter::LayoutTableHeight( Rectangle& rArea, 
bool bFit )
 sal_Int32 nMinHeight = 0;
 
 bool bIsEmpty = true; // check if all cells in this row are merged
+bool bRowHasText = false;
 
 for( nCol = 0; nCol < nColCount; ++nCol )
 {
@@ -704,7 +705,16 @@ void TableLayouter::LayoutTableHeight( Rectangle& rArea, 
bool bFit )
 }
 else
 {
-nMinHeight = std::max( nMinHeight, 
xCell->getMinimumHeight() );
+bool bCellHasText = xCell->hasText();
+if ( (!bRowHasText && !bCellHasText) || ( bRowHasText && 
bCellHasText ) )
+{
+nMinHeight = std::max( nMinHeight, 
xCell->getMinimumHeight() );
+}
+else if ( !bRowHasText && bCellHasText )
+{
+bRowHasText = true;
+nMinHeight = xCell->getMinimumHeight();
+}
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-01-25 Thread Jan Holesovsky
 sd/qa/unit/tiledrendering/tiledrendering.cxx |   17 +
 sd/source/ui/view/Outliner.cxx   |7 ++-
 2 files changed, 19 insertions(+), 5 deletions(-)

New commits:
commit ed5450f2a5ed8e72b48b4d976217746cea04a5c9
Author: Jan Holesovsky 
Date:   Mon Jan 25 21:49:31 2016 +0100

sd lok: Fix normal 'search' performed after a 'search all'.

The DBG_ASSERT followed by the same test actually returning immediately
prevents the actual 'search' after a 'search all' being performed.

I hope this does not have any negative consequences; but if it does, we 
should
fix the root cause, instead of having this kind of defensive programming 
here.

Change-Id: I909533f301dda9c20cab1968de45e5fa7975e852

diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx 
b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 296964d..fab2c4e 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -55,6 +55,7 @@ public:
 void testSearchAll();
 void testSearchAllSelections();
 void testSearchAllNotifications();
+void testSearchAllFollowedBySearch();
 #endif
 
 CPPUNIT_TEST_SUITE(SdTiledRenderingTest);
@@ -70,6 +71,7 @@ public:
 CPPUNIT_TEST(testSearchAll);
 CPPUNIT_TEST(testSearchAllSelections);
 CPPUNIT_TEST(testSearchAllNotifications);
+CPPUNIT_TEST(testSearchAllFollowedBySearch);
 #endif
 CPPUNIT_TEST_SUITE_END();
 
@@ -482,6 +484,21 @@ void SdTiledRenderingTest::testSearchAllNotifications()
 comphelper::LibreOfficeKit::setActive(false);
 }
 
+void SdTiledRenderingTest::testSearchAllFollowedBySearch()
+{
+comphelper::LibreOfficeKit::setActive();
+SdXImpressDocument* pXImpressDocument = createDoc("search-all.odp");
+pXImpressDocument->registerCallback(::callback, this);
+
+lcl_search("third", /*bFindAll=*/true);
+lcl_search("match", /*bFindAll=*/false);
+
+OString aUsedFormat;
+// This used to give wrong result: 'search' after 'search all' still
+// returned 'third'
+CPPUNIT_ASSERT_EQUAL(OString("match"), 
pXImpressDocument->getTextSelection("text/plain;charset=utf-8", aUsedFormat));
+}
+
 #endif
 
 CPPUNIT_TEST_SUITE_REGISTRATION(SdTiledRenderingTest);
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index ce7aef6..de9756e 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -705,11 +705,8 @@ bool 
Outliner::SearchAndReplaceOnce(std::vector* pSelections)
 DetectChange ();
 
 OutlinerView* pOutlinerView = mpImpl->GetOutlinerView();
-DBG_ASSERT(pOutlinerView!=nullptr && GetEditEngine().HasView( 
>GetEditView() ),
-"SearchAndReplace without valid view!" );
-
-if( nullptr == pOutlinerView || !GetEditEngine().HasView( 
>GetEditView() ) )
-return true;
+if (!pOutlinerView)
+return true; // end of search
 
 std::shared_ptr pViewShell (mpWeakViewShell.lock());
 if (pViewShell != nullptr)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-01-15 Thread Michael Stahl
 sd/qa/unit/data/odp/math.odp |binary
 1 file changed

New commits:
commit fc4fba0c77c849cf19d9c0e1b9270b745db60b89
Author: Michael Stahl 
Date:   Fri Jan 15 17:04:48 2016 +0100

ugh, forgot to git add the test document

Change-Id: Ia10730e07de3bd86f54c7fc0ba5ae55f350ce149

diff --git a/sd/qa/unit/data/odp/math.odp b/sd/qa/unit/data/odp/math.odp
new file mode 100644
index 000..c7605c5
Binary files /dev/null and b/sd/qa/unit/data/odp/math.odp differ
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-01-13 Thread Miklos Vajna
 sd/qa/unit/tiledrendering/tiledrendering.cxx |6 ++
 sd/source/ui/func/fusel.cxx  |6 +++---
 sd/source/ui/view/Outliner.cxx   |9 +
 sd/source/ui/view/sdwindow.cxx   |7 ---
 sd/source/ui/view/viewshe2.cxx   |3 ++-
 sd/source/ui/view/viewshel.cxx   |7 ---
 6 files changed, 24 insertions(+), 14 deletions(-)

New commits:
commit 972d27f5652646d28dea9c5bdb3f987e8a8aebe8
Author: Miklos Vajna 
Date:   Thu Jan 14 08:53:03 2016 +0100

sd: clean up remaining non-static isTiledRendering() usage

Change-Id: I36b0edc55b9c275bef5cf82af2bdf0ccb3ebe621

diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx 
b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 7c14fa9..13b4223 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -254,6 +254,7 @@ void SdTiledRenderingTest::testPostKeyEvent()
 
 void SdTiledRenderingTest::testPostMouseEvent()
 {
+comphelper::LibreOfficeKit::setActive();
 SdXImpressDocument* pXImpressDocument = createDoc("dummy.odp");
 sd::ViewShell* pViewShell = 
pXImpressDocument->GetDocShell()->GetViewShell();
 SdPage* pActualPage = pViewShell->GetActualPage();
@@ -277,6 +278,7 @@ void SdTiledRenderingTest::testPostMouseEvent()
 CPPUNIT_ASSERT(pView->GetTextEditObject());
 // The new cursor position must be before the first word.
 CPPUNIT_ASSERT_EQUAL(static_cast(0), 
rEditView.GetSelection().nStartPos);
+comphelper::LibreOfficeKit::setActive(false);
 }
 
 void SdTiledRenderingTest::testSetTextSelection()
@@ -424,6 +426,7 @@ void SdTiledRenderingTest::testSearch()
 
 void SdTiledRenderingTest::testSearchAll()
 {
+comphelper::LibreOfficeKit::setActive();
 SdXImpressDocument* pXImpressDocument = createDoc("search-all.odp");
 pXImpressDocument->registerCallback(::callback, this);
 
@@ -438,10 +441,12 @@ void SdTiledRenderingTest::testSearchAll()
 lcl_search("second", /*bFindAll=*/true);
 // This was 0: no SET_PART was emitted.
 CPPUNIT_ASSERT_EQUAL(static_cast(1), m_nPart);
+comphelper::LibreOfficeKit::setActive(false);
 }
 
 void SdTiledRenderingTest::testSearchAllSelections()
 {
+comphelper::LibreOfficeKit::setActive();
 SdXImpressDocument* pXImpressDocument = createDoc("search-all.odp");
 pXImpressDocument->registerCallback(::callback, this);
 
@@ -450,6 +455,7 @@ void SdTiledRenderingTest::testSearchAllSelections()
 CPPUNIT_ASSERT_EQUAL(static_cast(2), m_nPart);
 // This was 1: only the first match was highlighted.
 CPPUNIT_ASSERT_EQUAL(static_cast(2), m_aSelection.size());
+comphelper::LibreOfficeKit::setActive(false);
 }
 
 #endif
diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx
index 03569ca..fbd0587 100644
--- a/sd/source/ui/func/fusel.cxx
+++ b/sd/source/ui/func/fusel.cxx
@@ -72,12 +72,12 @@
 #include 
 
 #include 
+#include 
 
 using namespace ::com::sun::star;
 
 namespace sd {
 
-
 FuSelection::FuSelection (
 ViewShell* pViewSh,
 ::sd::Window* pWin,
@@ -154,7 +154,7 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
 sal_uInt16 nDrgLog = sal_uInt16 ( 
mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
 sal_uInt16 nHitLog = sal_uInt16 ( 
mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
 
-if (mpDoc->isTiledRendering())
+if (comphelper::LibreOfficeKit::isActive())
 {
 // When tiled rendering, we always work in logic units, use the 
non-pixel constants.
 nDrgLog = DRGLOG;
@@ -275,7 +275,7 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
 mpWindow->ReleaseMouse();
 
 // If tiled rendering, let client handles URL execution and 
early returns.
-if (mpDoc->isTiledRendering())
+if (comphelper::LibreOfficeKit::isActive())
 {
 
mpDoc->libreOfficeKitCallback(LOK_CALLBACK_HYPERLINK_CLICKED,
 aVEvt.pURLField->GetURL().toUtf8().getStr());
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index caf2da7..1eb659a 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -74,6 +74,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -632,7 +633,7 @@ bool Outliner::SearchAndReplaceAll()
 do
 {
 bFoundMatch = ! SearchAndReplaceOnce();
-if (mpSearchItem->GetCommand() == SvxSearchCmd::FIND_ALL && 
pViewShell->GetDoc()->isTiledRendering() && bFoundMatch && aSelections.size() 
== 1)
+if (mpSearchItem->GetCommand() == SvxSearchCmd::FIND_ALL && 
comphelper::LibreOfficeKit::isActive() && bFoundMatch && aSelections.size() == 
1)
 {
 // Without this, RememberStartPosition() will think it already 
has a remembered 

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

2016-01-11 Thread Marco Cecchetti
 sd/qa/unit/tiledrendering/tiledrendering.cxx |2 --
 sd/source/ui/view/Outliner.cxx   |2 ++
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit d6f1ca24932ba85607ba3e526c5721132cd39252
Author: Marco Cecchetti 
Date:   Mon Jan 11 16:43:02 2016 +0100

lool - search all - unit test failure - solved

Change-Id: I5a74dd60f61fc0fdb88f08383d579b14222aa55d
Reviewed-on: https://gerrit.libreoffice.org/21365
Tested-by: Jenkins 
Reviewed-by: Marco Cecchetti 

diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx 
b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index b3ac27e..7c14fa9 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -442,7 +442,6 @@ void SdTiledRenderingTest::testSearchAll()
 
 void SdTiledRenderingTest::testSearchAllSelections()
 {
-#if 0
 SdXImpressDocument* pXImpressDocument = createDoc("search-all.odp");
 pXImpressDocument->registerCallback(::callback, this);
 
@@ -451,7 +450,6 @@ void SdTiledRenderingTest::testSearchAllSelections()
 CPPUNIT_ASSERT_EQUAL(static_cast(2), m_nPart);
 // This was 1: only the first match was highlighted.
 CPPUNIT_ASSERT_EQUAL(static_cast(2), m_aSelection.size());
-#endif
 }
 
 #endif
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index 69ec222..caf2da7 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -591,6 +591,8 @@ void Outliner::Initialize (bool bDirectionIsForward)
 
 bool Outliner::SearchAndReplaceAll()
 {
+DetectChange();
+
 bool bRet = true;
 // Save the current position to be restored after having replaced all
 // matches.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-01-07 Thread Jan Holesovsky
 sd/qa/unit/tiledrendering/tiledrendering.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit be343661b076f3f57e7eb9ca1a5a4d3529752b58
Author: Jan Holesovsky 
Date:   Thu Jan 7 11:02:45 2016 +0100

Disabled the test for a moment.

Change-Id: I251d079d6362cf09d014623663cf9355a9c79a2e

diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx 
b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 7c14fa9..60a555d 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -67,7 +67,7 @@ public:
 CPPUNIT_TEST(testResetSelection);
 CPPUNIT_TEST(testSearch);
 CPPUNIT_TEST(testSearchAll);
-CPPUNIT_TEST(testSearchAllSelections);
+//CPPUNIT_TEST(testSearchAllSelections);
 #endif
 CPPUNIT_TEST_SUITE_END();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-01-07 Thread Stephan Bergmann
 sd/qa/unit/tiledrendering/tiledrendering.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit dc8b615d7a13c5ef4481b0e5f1fcc5e606c12234
Author: Stephan Bergmann 
Date:   Thu Jan 7 15:15:49 2016 +0100

Avoid loplugin:unreffun

...with be343661b076f3f57e7eb9ca1a5a4d3529752b58 "Disabled the test for a
moment."

Change-Id: Ic1b60f5590431f2edea4a65c62fdeb8eda256987

diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx 
b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 60a555d..b3ac27e 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -67,7 +67,7 @@ public:
 CPPUNIT_TEST(testResetSelection);
 CPPUNIT_TEST(testSearch);
 CPPUNIT_TEST(testSearchAll);
-//CPPUNIT_TEST(testSearchAllSelections);
+CPPUNIT_TEST(testSearchAllSelections);
 #endif
 CPPUNIT_TEST_SUITE_END();
 
@@ -442,6 +442,7 @@ void SdTiledRenderingTest::testSearchAll()
 
 void SdTiledRenderingTest::testSearchAllSelections()
 {
+#if 0
 SdXImpressDocument* pXImpressDocument = createDoc("search-all.odp");
 pXImpressDocument->registerCallback(::callback, this);
 
@@ -450,6 +451,7 @@ void SdTiledRenderingTest::testSearchAllSelections()
 CPPUNIT_ASSERT_EQUAL(static_cast(2), m_nPart);
 // This was 1: only the first match was highlighted.
 CPPUNIT_ASSERT_EQUAL(static_cast(2), m_aSelection.size());
+#endif
 }
 
 #endif
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-11-21 Thread Andras Timar
 sd/qa/unit/data/empty.fodp  |2 +
 sd/qa/unit/export-tests.cxx |   52 
 2 files changed, 54 insertions(+)

New commits:
commit aa94dd9a5b5db3c51d5de1b5a3e9c8d9e7a22b5c
Author: Andras Timar 
Date:   Fri Nov 20 23:49:12 2015 +0100

tdf#92527 unit test

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

diff --git a/sd/qa/unit/data/empty.fodp b/sd/qa/unit/data/empty.fodp
new file mode 100644
index 000..3c2a4cf
--- /dev/null
+++ b/sd/qa/unit/data/empty.fodp
@@ -0,0 +1,2 @@
+
+
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index eba8d7b..32175f4 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -10,6 +10,7 @@
 #include "sdmodeltestbase.hxx"
 #include "Outliner.hxx"
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -61,6 +62,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -139,6 +141,7 @@ public:
 void testBnc822341();
 #endif
 void testTdf80224();
+void testTdf92527();
 
 CPPUNIT_TEST_SUITE(SdExportTest);
 CPPUNIT_TEST(testFdo90607);
@@ -181,6 +184,7 @@ public:
 CPPUNIT_TEST(testTdf80224);
 
 CPPUNIT_TEST(testExportTransitionsPPTX);
+CPPUNIT_TEST(testTdf92527);
 
 CPPUNIT_TEST_SUITE_END();
 };
@@ -1282,6 +1286,54 @@ void SdExportTest::testExportTransitionsPPTX()
 CPPUNIT_ASSERT(checkTransitionOnPage(xDoc, 74, TransitionType::ZOOM, 
TransitionSubType::ROTATEIN));
 }
 
+void SdExportTest::testTdf92527()
+{
+// We draw a diamond in an empty document. A newly created diamond shape 
does not have
+// CustomShapeGeometry - Path - Segments property, and previously 
DrawingML exporter
+// did not export custom shapes which did not have CustomShapeGeometry - 
Path - Segments property.
+sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc("/sd/qa/unit/data/empty.fodp"), FODG );
+uno::Reference 
xFactory(xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY);
+uno::Reference 
xShape1(xFactory->createInstance("com.sun.star.drawing.CustomShape"), 
uno::UNO_QUERY);
+uno::Reference 
xDoc1(xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY_THROW);
+uno::Reference 
xPage1(xDoc1->getDrawPages()->getByIndex(0), uno::UNO_QUERY_THROW);
+xPage1->add(xShape1);
+xShape1->setSize(awt::Size(1, 1));
+xShape1->setPosition(awt::Point(1000, 1000));
+uno::Sequence 
aShapeGeometry(comphelper::InitPropertySequence(
+{
+{"Type", uno::makeAny(OUString("diamond"))},
+}));
+uno::Reference xPropertySet1(xShape1, uno::UNO_QUERY);
+xPropertySet1->setPropertyValue("CustomShapeGeometry", 
uno::makeAny(aShapeGeometry));
+
+xDocShRef = saveAndReload(xDocShRef, PPTX);
+
+uno::Reference 
xDoc2(xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY_THROW);
+uno::Reference 
xPage2(xDoc2->getDrawPages()->getByIndex(0), uno::UNO_QUERY_THROW);
+uno::Reference xShape2(xPage2->getByIndex(0), 
uno::UNO_QUERY_THROW);
+uno::Reference< beans::XPropertySet > xPropertySet2( xShape2, 
uno::UNO_QUERY_THROW );
+uno::Sequence aProps;
+xPropertySet2->getPropertyValue("CustomShapeGeometry") >>= aProps;
+uno::Sequence aPathProps;
+for (int i = 0; i < aProps.getLength(); ++i)
+{
+const beans::PropertyValue& rProp = aProps[i];
+if (rProp.Name == "Path")
+aPathProps = rProp.Value.get< uno::Sequence 
>();
+}
+uno::Sequence aCoordinates;
+for (int i = 0; i < aPathProps.getLength(); ++i)
+{
+const beans::PropertyValue& rProp = aPathProps[i];
+if (rProp.Name == "Coordinates")
+aCoordinates = rProp.Value.get< 
uno::Sequence >();
+}
+
+// 5 coordinate pairs, 1 MoveTo, 4 LineTo
+CPPUNIT_ASSERT_EQUAL(sal_Int32(5), aCoordinates.getLength());
+xDocShRef->DoClose();
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SdExportTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-11-17 Thread Tor Lillqvist
 sd/qa/unit/import-tests.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2e88fbd747ef2fc7e2d266f7f15db37ecab7662d
Author: Tor Lillqvist 
Date:   Tue Nov 17 12:46:07 2015 +0200

WaE: loplugin:stringconstant

Change-Id: I8765ae89bcab8dc3c7360dace57a57094e5c5cc4

diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index c7f0ff5..bc2b3a4 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -604,7 +604,7 @@ void SdImportTest::testFdo71075()
 sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc("/sd/qa/unit/data/fdo71075.odp"), ODP);
 
 uno::Reference< beans::XPropertySet > xPropSet( getShapeFromPage( 0, 0, 
xDocShRef ) );
-aAny = xPropSet->getPropertyValue( OUString("Model") );
+aAny = xPropSet->getPropertyValue( "Model" );
 CPPUNIT_ASSERT_MESSAGE( "The shape doesn't have the property", 
aAny.hasValue() );
 
 uno::Reference< chart::XChartDocument > xChartDoc;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-11-17 Thread Stephan Bergmann
 sd/qa/unit/sdmodeltestbase.hxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 9579e458a5dbd1099a42ef616dfa4d0287931c22
Author: Stephan Bergmann 
Date:   Tue Nov 17 13:27:53 2015 +0100

loplugin:nullptr

Change-Id: Iaf31a731c9151972ba2fe2ed50074ea59c147550

diff --git a/sd/qa/unit/sdmodeltestbase.hxx b/sd/qa/unit/sdmodeltestbase.hxx
index d70f34b..a9682bb 100644
--- a/sd/qa/unit/sdmodeltestbase.hxx
+++ b/sd/qa/unit/sdmodeltestbase.hxx
@@ -268,10 +268,10 @@ protected:
 const SdrPage* GetPage( int nPage, sd::DrawDocShellRef xDocShRef )
 {
 SdDrawDocument* pDoc =  xDocShRef->GetDoc() ;
-CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
 
 const SdrPage* pPage = pDoc->GetPage( nPage );
-CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
 return pPage;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-11-17 Thread Katarina Behrens
 sd/qa/unit/export-tests.cxx|  252 -
 sd/qa/unit/import-tests.cxx|  222 ++--
 sd/qa/unit/sdmodeltestbase.hxx |   74 
 3 files changed, 162 insertions(+), 386 deletions(-)

New commits:
commit 927019f5d253a12d285f68a5f0240548d2048def
Author: Katarina Behrens 
Date:   Wed Nov 11 14:06:31 2015 +0100

tdf#94272: Reduce copy'n'pasta code in sd unit tests

Change-Id: Id1a1180e00a1c1ce7020df52f246b0c135ba03f2
Reviewed-on: https://gerrit.libreoffice.org/19912
Tested-by: Jenkins 
Reviewed-by: Katarina Behrens 

diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index ba6c309..02e42e7 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -194,8 +194,7 @@ void SdExportTest::testN821567()
 uno::Reference< drawing::XDrawPagesSupplier > xDoc(
 xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY_THROW );
 CPPUNIT_ASSERT_MESSAGE( "not exactly one page", 
xDoc->getDrawPages()->getCount() == 1 );
-uno::Reference< drawing::XDrawPage > xPage(
-xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY_THROW );
+uno::Reference< drawing::XDrawPage > xPage( getPage( 0, xDocShRef ) );
 
 uno::Reference< beans::XPropertySet > xPropSet( xPage, uno::UNO_QUERY );
 uno::Any aAny = xPropSet->getPropertyValue( "Background" );
@@ -237,10 +236,7 @@ void SdExportTest::testBnc870233_1()
 ::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc("/sd/qa/unit/data/pptx/bnc870233_1.pptx"), PPTX);
 xDocShRef = saveAndReload( xDocShRef, PPTX );
 
-SdDrawDocument *pDoc = xDocShRef->GetDoc();
-CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
-const SdrPage *pPage = pDoc->GetPage (1);
-CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
+const SdrPage *pPage = GetPage( 1, xDocShRef );
 
 // The problem was all shapes had the same font (the last parsed font 
attribues overwrote all previous ones)
 
@@ -266,10 +262,7 @@ void SdExportTest::testBnc870233_2()
 ::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc("/sd/qa/unit/data/pptx/bnc870233_2.pptx"), PPTX);
 xDocShRef = saveAndReload( xDocShRef, PPTX );
 
-SdDrawDocument *pDoc = xDocShRef->GetDoc();
-CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
-const SdrPage *pPage = pDoc->GetPage (1);
-CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
+const SdrPage *pPage = GetPage( 1, xDocShRef );
 
 // The problem was in some SmartArts font color was wrong
 
@@ -301,10 +294,7 @@ void SdExportTest::testN828390_4()
 
 xDocShRef = saveAndReload( xDocShRef, PPTX );
 
-SdDrawDocument *pDoc = xDocShRef->GetDoc();
-CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
-const SdrPage *pPage = pDoc->GetPage(1);
-CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
+const SdrPage *pPage = GetPage( 1, xDocShRef );
 {
 std::vector rLst;
 SdrObject *pObj = pPage->GetObj(0);
@@ -339,10 +329,7 @@ void SdExportTest::testN828390_5()
 
 xDocShRef = saveAndReload( xDocShRef, PPTX );
 
-SdDrawDocument *pDoc = xDocShRef->GetDoc();
-CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
-const SdrPage *pPage = pDoc->GetPage(1);
-CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
+const SdrPage *pPage = GetPage( 1, xDocShRef );
 {
 SdrObject *pObj = pPage->GetObj(0);
 SdrTextObj *pTxtObj = dynamic_cast( pObj );
@@ -361,10 +348,7 @@ void SdExportTest::testTransparentBackground()
::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc("/sd/qa/unit/data/odp/transparent_background.odp"), ODP);
 xDocShRef = saveAndReload( xDocShRef, ODP );
 
-SdDrawDocument *pDoc = xDocShRef->GetDoc();
-CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
-const SdrPage *pPage = pDoc->GetPage (1);
-CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
+const SdrPage *pPage = GetPage( 1, xDocShRef );
 
 const SdrTextObj *pObj1 = dynamic_cast( pPage->GetObj( 0 ) );
 checkFontAttributes( pObj1, 
Color(COL_TRANSPARENT) );
@@ -381,10 +365,7 @@ void SdExportTest::testMediaEmbedding()
 xDocShRef = saveAndReload( xDocShRef, ODP );
 #endif
 
-SdDrawDocument *pDoc = xDocShRef->GetDoc();
-CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
-const SdrPage *pPage = pDoc->GetPage (1);
-CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
+const SdrPage *pPage = GetPage( 1, xDocShRef );
 
 #if HAVE_FEATURE_GLTF
 // First object is a glTF model
@@ -414,10 +395,7 @@ void SdExportTest::testFdo84043()
 xDocShRef = saveAndReload( xDocShRef, ODP );
 
 // the bug was duplicate attributes, causing crash in a build with asserts
-SdDrawDocument const* pDoc = xDocShRef->GetDoc();
-

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

2015-11-08 Thread Stephan Bergmann
 sd/qa/unit/export-tests.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 6115acca2859432f8dff3c707bc42fd54234e91d
Author: Stephan Bergmann 
Date:   Sun Nov 8 22:23:17 2015 +0100

loplugin:defaultparams

Change-Id: Ia4f51a3599afa6ffe7b689a8703a9634b4fb082d

diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index 11e87de..bba730a 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -1397,9 +1397,9 @@ void SdExportTest::testExportTransitionsPPTX()
 
 // WIPE TRANSITIONS
 CPPUNIT_ASSERT(checkTransitionOnPage(xDoc, 01, TransitionType::BARWIPE, 
TransitionSubType::TOPTOBOTTOM, false));
-CPPUNIT_ASSERT(checkTransitionOnPage(xDoc, 02, TransitionType::BARWIPE, 
TransitionSubType::LEFTTORIGHT, true));
+CPPUNIT_ASSERT(checkTransitionOnPage(xDoc, 02, TransitionType::BARWIPE, 
TransitionSubType::LEFTTORIGHT));
 CPPUNIT_ASSERT(checkTransitionOnPage(xDoc, 03, TransitionType::BARWIPE, 
TransitionSubType::LEFTTORIGHT, false));
-CPPUNIT_ASSERT(checkTransitionOnPage(xDoc, 04, TransitionType::BARWIPE, 
TransitionSubType::TOPTOBOTTOM, true));
+CPPUNIT_ASSERT(checkTransitionOnPage(xDoc, 04, TransitionType::BARWIPE, 
TransitionSubType::TOPTOBOTTOM));
 
 // CUT THROUGH BLACK
 CPPUNIT_ASSERT(checkTransitionOnPage(xDoc, 31, TransitionType::BARWIPE, 
TransitionSubType::FADEOVERCOLOR));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-09-18 Thread Caolán McNamara
 sd/qa/unit/data/ppt/pass/hang-22.ppt |binary
 sd/source/filter/ppt/propread.cxx|4 +++-
 2 files changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 7af19f45b35c428d3e06972806e5a05489f45955
Author: Caolán McNamara 
Date:   Fri Sep 18 13:20:03 2015 +0100

check stream status and string lengths

Change-Id: I99f3d4a2ec760228f485d01fce856deb9c068431

diff --git a/sd/qa/unit/data/ppt/pass/hang-22.ppt 
b/sd/qa/unit/data/ppt/pass/hang-22.ppt
new file mode 100644
index 000..c869b39
Binary files /dev/null and b/sd/qa/unit/data/ppt/pass/hang-22.ppt differ
diff --git a/sd/source/filter/ppt/propread.cxx 
b/sd/source/filter/ppt/propread.cxx
index b76fbca..03e05d0 100644
--- a/sd/source/filter/ppt/propread.cxx
+++ b/sd/source/filter/ppt/propread.cxx
@@ -288,7 +288,9 @@ void Section::GetDictionary(Dictionary& rDict)
 for (sal_uInt32 i = 0; i < nDictCount; ++i)
 {
 sal_uInt32 nId(0), nSize(0);
-aStream.ReadUInt32( nId ).ReadUInt32( nSize );
+aStream.ReadUInt32(nId).ReadUInt32(nSize);
+if (!aStream.good() || nSize > aStream.remainingSize())
+break;
 if (mnTextEnc == RTL_TEXTENCODING_UCS2)
 nSize >>= 1;
 if (!nSize)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-08-29 Thread Caolán McNamara
 sd/qa/unit/data/ppt/pass/hang-21.ppt |binary
 sd/source/filter/ppt/propread.cxx|8 
 2 files changed, 8 insertions(+)

New commits:
commit 452cd9e75de657e996e17510fe5d3539065489d1
Author: Caolán McNamara caol...@redhat.com
Date:   Sat Aug 29 20:26:27 2015 +0100

check stream status

Change-Id: I6b9537cf94ac1c5d996ba64ddf878745dadde254

diff --git a/sd/qa/unit/data/ppt/pass/hang-21.ppt 
b/sd/qa/unit/data/ppt/pass/hang-21.ppt
new file mode 100644
index 000..99cf49f
Binary files /dev/null and b/sd/qa/unit/data/ppt/pass/hang-21.ppt differ
diff --git a/sd/source/filter/ppt/propread.cxx 
b/sd/source/filter/ppt/propread.cxx
index 18f3450..5454c56 100644
--- a/sd/source/filter/ppt/propread.cxx
+++ b/sd/source/filter/ppt/propread.cxx
@@ -497,10 +497,18 @@ void Section::Read( SotStorageStream *pStrm )
 {
 sal_uInt32 nDictCount(0);
 pStrm-ReadUInt32(nDictCount);
+auto nMaxRecordsPossible = pStrm-remainingSize() / 
(sizeof(sal_uInt32)*2);
+if (nDictCount  nMaxRecordsPossible)
+{
+SAL_WARN(sd.filter, Dictionary count of   nDictCount  
 claimed, only   nMaxRecordsPossible   possible);
+nDictCount = nMaxRecordsPossible;
+}
 for (sal_uInt32 i = 0; i  nDictCount; ++i)
 {
 sal_uInt32 nSize(0);
 pStrm-ReadUInt32( nSize ).ReadUInt32( nSize );
+if (!pStrm-good())
+break;
 sal_uInt64 nPos = pStrm-Tell() + nSize;
 if (nPos != pStrm-Seek(nPos))
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-08-05 Thread Varun
 sd/qa/unit/data/odp/Tdf62176.odp |binary
 sd/qa/unit/export-tests.cxx  |   47 +++
 2 files changed, 47 insertions(+)

New commits:
commit 077fd3d95cc00bb3cd99f6bb7dae610877ad59b5
Author: Varun varun.dh...@studentpartner.com
Date:   Wed Aug 5 15:42:08 2015 +0530

Added Test for #tdf62176 Negative indent on text shapes

Change-Id: I9548c80f0bda342477cde249f9b55dde95e9c0f4
Reviewed-on: https://gerrit.libreoffice.org/17524
Tested-by: Jenkins c...@libreoffice.org
Reviewed-by: Michael Stahl mst...@redhat.com

diff --git a/sd/qa/unit/data/odp/Tdf62176.odp b/sd/qa/unit/data/odp/Tdf62176.odp
new file mode 100644
index 000..1139dd0
Binary files /dev/null and b/sd/qa/unit/data/odp/Tdf62176.odp differ
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index fe60aeb..0a8a342 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -119,6 +119,7 @@ public:
 void testRightToLeftParaghraph();
 void testTableCellBorder();
 void testBulletColor();
+void testTdf62176();
 void testBulletMarginAndIndentation();
 void testParaMarginAndindentation();
 void testTransparentBackground();
@@ -156,6 +157,7 @@ public:
 CPPUNIT_TEST(testRightToLeftParaghraph);
 CPPUNIT_TEST(testTableCellBorder);
 CPPUNIT_TEST(testBulletColor);
+CPPUNIT_TEST(testTdf62176);
 CPPUNIT_TEST(testBulletMarginAndIndentation);
 CPPUNIT_TEST(testParaMarginAndindentation);
 CPPUNIT_TEST(testTransparentBackground);
@@ -974,6 +976,51 @@ void SdExportTest::testBulletColor()
 CPPUNIT_ASSERT_EQUAL_MESSAGE( Bullet's color is wrong!, 
sal_uInt32(0xff),pNumFmt-GetNumRule()-GetLevel(0).GetBulletColor().GetColor());
 }
 
+void SdExportTest::testTdf62176()
+{
+::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/odp/Tdf62176.odp), ODP);
+uno::Referencedrawing::XDrawPagesSupplier 
xDoc(xDocShRef-GetDoc()-getUnoModel(), uno::UNO_QUERY_THROW);
+uno::Referencedrawing::XDrawPage 
xPage(xDoc-getDrawPages()-getByIndex(0), uno::UNO_QUERY_THROW);
+//there should be only *one* shape
+CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xPage-getCount());
+uno::Referencebeans::XPropertySet xShape(xPage-getByIndex(0), 
uno::UNO_QUERY);
+//checking Paragraph's Left Margin with expected value
+sal_Int32 nParaLeftMargin = 0;
+xShape-getPropertyValue(ParaLeftMargin) = nParaLeftMargin;
+CPPUNIT_ASSERT_EQUAL(sal_Int32(2000), nParaLeftMargin);
+//checking Paragraph's First Line Indent with expected value
+sal_Int32 nParaFirstLineIndent = 0;
+xShape-getPropertyValue(ParaFirstLineIndent) = nParaFirstLineIndent;
+CPPUNIT_ASSERT_EQUAL(sal_Int32(-1300), nParaFirstLineIndent);
+//Checking the *Text* in TextBox
+uno::Referencetext::XText xText = 
uno::Referencetext::XTextRange(xShape, uno::UNO_QUERY)-getText();
+uno::Referencecontainer::XEnumerationAccess paraEnumAccess(xText, 
uno::UNO_QUERY);
+uno::Referencecontainer::XEnumeration 
paraEnum(paraEnumAccess-createEnumeration());
+uno::Referencetext::XTextRange xParagraph(paraEnum-nextElement(), 
uno::UNO_QUERY_THROW);
+CPPUNIT_ASSERT_EQUAL(OUString(Hello World), xParagraph-getString());
+//Saving and Reloading the file
+xDocShRef = saveAndReload(xDocShRef, ODP);
+uno::Referencedrawing::XDrawPagesSupplier 
xDoc2(xDocShRef-GetDoc()-getUnoModel(), uno::UNO_QUERY_THROW);
+uno::Referencedrawing::XDrawPage 
xPage2(xDoc2-getDrawPages()-getByIndex(0), uno::UNO_QUERY_THROW);
+//there should be only *one* shape
+CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xPage2-getCount());
+uno::Referencebeans::XPropertySet xShape2(xPage2-getByIndex(0), 
uno::UNO_QUERY);
+//checking Paragraph's Left Margin with expected value
+sal_Int32 nParaLeftMargin2 = 0;
+xShape2-getPropertyValue(ParaLeftMargin) = nParaLeftMargin2;
+CPPUNIT_ASSERT_EQUAL(sal_Int32(2000), nParaLeftMargin2);
+//checking Paragraph's First Line Indent with expected value
+sal_Int32 nParaFirstLineIndent2 = 0;
+xShape2-getPropertyValue(ParaFirstLineIndent) = nParaFirstLineIndent2;
+CPPUNIT_ASSERT_EQUAL(sal_Int32(-1300), nParaFirstLineIndent2);
+//Checking the *Text* in TextBox
+uno::Referencetext::XText xText2 = 
uno::Referencetext::XTextRange(xShape2, uno::UNO_QUERY)-getText();
+uno::Referencecontainer::XEnumerationAccess paraEnumAccess2(xText2, 
uno::UNO_QUERY);
+uno::Referencecontainer::XEnumeration 
paraEnum2(paraEnumAccess2-createEnumeration());
+uno::Referencetext::XTextRange xParagraph2(paraEnum2-nextElement(), 
uno::UNO_QUERY_THROW);
+CPPUNIT_ASSERT_EQUAL(OUString(Hello World), xParagraph2-getString());
+}
+
 void SdExportTest::testTdf91378()
 {
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-07-07 Thread Varun
 sd/qa/unit/data/odp/tdf80020.odp |binary
 sd/qa/unit/export-tests.cxx  |   23 ++-
 2 files changed, 22 insertions(+), 1 deletion(-)

New commits:
commit 91949b62505b4159ad930dca89d2cc9eba082807
Author: Varun varun.dh...@studentpartner.com
Date:   Wed Jul 8 01:05:48 2015 +0530

Added Test for tdf#80020 Impress style inheritance

Change-Id: I001dff1ba3774b811721709b0910a6fb711cca1f
Reviewed-on: https://gerrit.libreoffice.org/16833
Reviewed-by: Michael Stahl mst...@redhat.com
Tested-by: Michael Stahl mst...@redhat.com

diff --git a/sd/qa/unit/data/odp/tdf80020.odp b/sd/qa/unit/data/odp/tdf80020.odp
new file mode 100644
index 000..dade8d6
Binary files /dev/null and b/sd/qa/unit/data/odp/tdf80020.odp differ
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index 3c72207..51a5e51 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -59,7 +59,8 @@
 #include com/sun/star/graphic/XGraphic.hpp
 #include com/sun/star/frame/XStorable.hpp
 #include com/sun/star/drawing/FillStyle.hpp
- #include com/sun/star/text/WritingMode2.hpp
+#include com/sun/star/text/WritingMode2.hpp
+#include com/sun/star/style/XStyleFamiliesSupplier.hpp
 #include com/sun/star/table/BorderLine2.hpp
 #include com/sun/star/table/XTable.hpp
 #include com/sun/star/table/XMergeableCell.hpp
@@ -108,6 +109,7 @@ public:
 void testFdo83751();
 void testFdo79731();
 void testSwappedOutImageExport();
+void testTdf80020();
 void testLinkedGraphicRT();
 void testImageWithSpecialID();
 void testTableCellFillProperties();
@@ -144,6 +146,7 @@ public:
 CPPUNIT_TEST(testFdo83751);
 CPPUNIT_TEST(testFdo79731);
 CPPUNIT_TEST(testSwappedOutImageExport);
+CPPUNIT_TEST(testTdf80020);
 CPPUNIT_TEST(testLinkedGraphicRT);
 CPPUNIT_TEST(testImageWithSpecialID);
 CPPUNIT_TEST(testTableCellFillProperties);
@@ -674,6 +677,24 @@ void SdExportTest::testSwappedOutImageExport()
 }
 }
 
+void SdExportTest::testTdf80020()
+{
+::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/odp/tdf80020.odp), ODP);
+{
+uno::Referencestyle::XStyleFamiliesSupplier 
xStyleFamiliesSupplier(xDocShRef-GetModel(), uno::UNO_QUERY);
+uno::Referencecontainer::XNameAccess 
xStyleFamilies(xStyleFamiliesSupplier-getStyleFamilies(), uno::UNO_QUERY);
+uno::Referencecontainer::XNameAccess 
xStyleFamily(xStyleFamilies-getByName(graphics), uno::UNO_QUERY);
+uno::Referencestyle::XStyle xStyle(xStyleFamily-getByName(Test 
Style), uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(OUString(text), xStyle-getParentStyle());
+}
+xDocShRef = saveAndReload( xDocShRef, ODP );
+uno::Referencestyle::XStyleFamiliesSupplier 
xStyleFamiliesSupplier(xDocShRef-GetModel(), uno::UNO_QUERY);
+uno::Referencecontainer::XNameAccess 
xStyleFamilies(xStyleFamiliesSupplier-getStyleFamilies(), uno::UNO_QUERY);
+uno::Referencecontainer::XNameAccess 
xStyleFamily(xStyleFamilies-getByName(graphics), uno::UNO_QUERY);
+uno::Referencestyle::XStyle xStyle(xStyleFamily-getByName(Test 
Style), uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(OUString(text), xStyle-getParentStyle());
+}
+
 void SdExportTest::testLinkedGraphicRT()
 {
 // Problem was with linked images
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-06-19 Thread Miklos Vajna
 sd/qa/unit/tiledrendering/tiledrendering.cxx |   22 
 sd/source/ui/inc/ViewShell.hxx   |2 +
 sd/source/ui/inc/unomodel.hxx|2 +
 sd/source/ui/unoidl/unomodel.cxx |   11 ++
 sd/source/ui/view/viewshel.cxx   |   48 +++
 sw/source/uibase/uno/unotxdoc.cxx|2 +
 6 files changed, 87 insertions(+)

New commits:
commit d299041e8cdd0318f79115061e0ab25359c2e396
Author: Miklos Vajna vmik...@collabora.co.uk
Date:   Fri Jun 19 09:53:56 2015 +0200

sd: implement getTextSelection() in SdXImpressDocument

Change-Id: I29df1873b3954aa64a613e06c53c8e9acfa6a79d
Reviewed-on: https://gerrit.libreoffice.org/16369
Reviewed-by: Miklos Vajna vmik...@collabora.co.uk
Tested-by: Jenkins c...@libreoffice.org

diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx 
b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 0523773..6ec2219 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -46,6 +46,7 @@ public:
 void testPostKeyEvent();
 void testPostMouseEvent();
 void testSetTextSelection();
+void testGetTextSelection();
 void testSetGraphicSelection();
 void testResetSelection();
 void testSearch();
@@ -57,6 +58,7 @@ public:
 CPPUNIT_TEST(testPostKeyEvent);
 CPPUNIT_TEST(testPostMouseEvent);
 CPPUNIT_TEST(testSetTextSelection);
+CPPUNIT_TEST(testGetTextSelection);
 CPPUNIT_TEST(testSetGraphicSelection);
 CPPUNIT_TEST(testResetSelection);
 CPPUNIT_TEST(testSearch);
@@ -283,6 +285,26 @@ void SdTiledRenderingTest::testSetTextSelection()
 CPPUNIT_ASSERT_EQUAL(OUString(bbb.), rEditView.GetSelected());
 }
 
+void SdTiledRenderingTest::testGetTextSelection()
+{
+SdXImpressDocument* pXImpressDocument = createDoc(dummy.odp);
+uno::Referencecontainer::XIndexAccess 
xDrawPage(pXImpressDocument-getDrawPages()-getByIndex(0), uno::UNO_QUERY);
+uno::Referencetext::XTextRange xShape(xDrawPage-getByIndex(0), 
uno::UNO_QUERY);
+xShape-setString(Shape);
+// Create a selection on the shape text.
+sd::ViewShell* pViewShell = 
pXImpressDocument-GetDocShell()-GetViewShell();
+SdPage* pActualPage = pViewShell-GetActualPage();
+SdrObject* pObject = pActualPage-GetObj(0);
+SdrView* pView = pViewShell-GetView();
+pView-SdrBeginTextEdit(pObject);
+CPPUNIT_ASSERT(pView-GetTextEditObject());
+EditView rEditView = pView-GetTextEditOutlinerView()-GetEditView();
+ESelection aWordSelection(0, 0, 0, 5);
+rEditView.SetSelection(aWordSelection);
+// Did we indeed manage to copy the selected text?
+CPPUNIT_ASSERT_EQUAL(OString(Shape), 
pXImpressDocument-getTextSelection(text/plain;charset=utf-8));
+}
+
 void SdTiledRenderingTest::testSetGraphicSelection()
 {
 SdXImpressDocument* pXImpressDocument = createDoc(shape.odp);
diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx
index 97ed710..d3dfadb 100644
--- a/sd/source/ui/inc/ViewShell.hxx
+++ b/sd/source/ui/inc/ViewShell.hxx
@@ -451,6 +451,8 @@ public:
 void LogicMouseMove(const MouseEvent rMouseEvent);
 /// Allows adjusting the point or mark of the selection to a document 
coordinate.
 void SetCursorMm100Position(const Point rPosition, bool bPoint, bool 
bClearMark);
+/// Gets the currently selected text.
+OString GetTextSelection(OString aMimeType);
 /// Allows starting or ending a graphic move or resize action.
 void SetGraphicMm100Position(bool bStart, const Point rPosition);
 
diff --git a/sd/source/ui/inc/unomodel.hxx b/sd/source/ui/inc/unomodel.hxx
index 43444b8..2793ca0 100644
--- a/sd/source/ui/inc/unomodel.hxx
+++ b/sd/source/ui/inc/unomodel.hxx
@@ -251,6 +251,8 @@ public:
 virtual void postMouseEvent(int nType, int nX, int nY, int nCount) 
SAL_OVERRIDE;
 /// @see vcl::ITiledRenderable::setTextSelection().
 virtual void setTextSelection(int nType, int nX, int nY) SAL_OVERRIDE;
+/// @see vcl::ITiledRenderable::getTextSelection().
+virtual OString getTextSelection(const char* pMimeType) SAL_OVERRIDE;
 /// @see vcl::ITiledRenderable::setGraphicSelection().
 virtual void setGraphicSelection(int nType, int nX, int nY) SAL_OVERRIDE;
 /// @see lok::Document::resetSelection().
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 1029f19..c74f3b1 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -2446,6 +2446,17 @@ void SdXImpressDocument::setTextSelection(int nType, int 
nX, int nY)
 }
 }
 
+OString SdXImpressDocument::getTextSelection(const char* pMimeType)
+{
+SolarMutexGuard aGuard;
+
+DrawViewShell* pViewShell = GetViewShell();
+if (!pViewShell)
+return OString();
+
+return pViewShell-GetTextSelection(pMimeType);
+}
+
 void SdXImpressDocument::setGraphicSelection(int nType, int nX, int nY)
 {
 SolarMutexGuard 

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

2015-06-18 Thread Katarina Behrens
 sd/qa/unit/data/odp/transparent_background.odp |binary
 sd/qa/unit/export-tests.cxx|   19 +++
 2 files changed, 19 insertions(+)

New commits:
commit f3b51162b68acc7b22c2c5b41a8b29038153afab
Author: Katarina Behrens katarina.behr...@cib.de
Date:   Wed Jun 17 21:06:37 2015 +0200

Bugfix test for tdf#88295

Change-Id: Ic9c4330e9b14e43448302132b6c01a8d93001d2f

diff --git a/sd/qa/unit/data/odp/transparent_background.odp 
b/sd/qa/unit/data/odp/transparent_background.odp
new file mode 100644
index 000..ce599db
Binary files /dev/null and b/sd/qa/unit/data/odp/transparent_background.odp 
differ
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index f82b523..4149a30 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -121,6 +121,7 @@ public:
 void testBulletColor();
 void testBulletMarginAndIndentation();
 void testParaMarginAndindentation();
+void testTransparentBackground();
 
 void testFdo90607();
 #if !defined WNT
@@ -155,6 +156,7 @@ public:
 CPPUNIT_TEST(testBulletColor);
 CPPUNIT_TEST(testBulletMarginAndIndentation);
 CPPUNIT_TEST(testParaMarginAndindentation);
+CPPUNIT_TEST(testTransparentBackground);
 
 #if !defined WNT
 CPPUNIT_TEST(testBnc822341);
@@ -333,6 +335,23 @@ void SdExportTest::testN828390_5()
 xDocShRef-DoClose();
 }
 
+void SdExportTest::testTransparentBackground()
+{
+   ::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/odp/transparent_background.odp), ODP);
+xDocShRef = saveAndReload( xDocShRef, ODP );
+
+SdDrawDocument *pDoc = xDocShRef-GetDoc();
+CPPUNIT_ASSERT_MESSAGE( no document, pDoc != NULL );
+const SdrPage *pPage = pDoc-GetPage (1);
+CPPUNIT_ASSERT_MESSAGE( no page, pPage != NULL );
+
+const SdrTextObj *pObj1 = dynamic_castSdrTextObj *( pPage-GetObj( 0 ) );
+checkFontAttributesColor, SvxBackgroundColorItem( pObj1, 
Color(COL_TRANSPARENT) );
+
+const SdrTextObj *pObj2 = dynamic_castSdrTextObj *( pPage-GetObj( 1 ) );
+checkFontAttributesColor, SvxBackgroundColorItem( pObj2, 
Color(COL_YELLOW));
+}
+
 void SdExportTest::testMediaEmbedding()
 {
 ::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/media_embedding.odp), ODP);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-06-17 Thread Stephan Bergmann
 sd/qa/unit/export-tests.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 55e7aa6022a7d05f79bd9fe6df8a865e3901aecf
Author: Stephan Bergmann sberg...@redhat.com
Date:   Wed Jun 17 08:58:20 2015 +0200

loplugin:cstylecast

Change-Id: Ia8e0b5ded9f73cf448910593184a0e8936180a12

diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index 3f52898..f82b523 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -202,7 +202,7 @@ void checkFontAttributes( const SdrTextObj* pObj, ItemValue 
nVal)
 const ItemType* pAttrib = dynamic_castconst ItemType *((*it).pAttr);
 if (pAttrib)
 {
-CPPUNIT_ASSERT_EQUAL( nVal, (ItemValue)pAttrib-GetValue());
+CPPUNIT_ASSERT_EQUAL( nVal, 
static_castItemValue(pAttrib-GetValue()));
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-06-16 Thread Katarina Behrens
 sd/qa/unit/export-tests.cxx |   65 
 1 file changed, 31 insertions(+), 34 deletions(-)

New commits:
commit a6c07d2c263a39c829385d17cc125bd7d2b01531
Author: Katarina Behrens katarina.behr...@cib.de
Date:   Tue Jun 16 12:20:47 2015 +0200

Use template function to reduce copy'n'pasta code

Change-Id: I22964bfcfb80a3e97903674dbf71a1b7be3a0920
Reviewed-on: https://gerrit.libreoffice.org/16308
Tested-by: Jenkins c...@libreoffice.org
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index 3151afb..3f52898 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -71,6 +71,25 @@
 #include config_features.h
 #include com/sun/star/document/XDocumentPropertiesSupplier.hpp
 
+CPPUNIT_NS_BEGIN
+
+template struct assertion_traitsColor
+{
+static bool equal( const Color c1, const Color c2 )
+{
+return c1 == c2;
+}
+
+static std::string toString( const Color c )
+{
+OStringStream ost;
+ost  static_castunsigned int(c.GetColor());
+return ost.str();
+}
+};
+
+CPPUNIT_NS_END
+
 using namespace ::com::sun::star;
 
 class SdExportTest : public SdModelTestBase
@@ -171,8 +190,8 @@ void SdExportTest::testN821567()
 
 namespace {
 
-void checkFontAttributes(const SdrTextObj* pObj, sal_uInt32 nColor,
-bool bCheckWeight, FontWeight eWeight, bool bCheckItalic, FontItalic 
eItalic)
+template typename ItemValue, typename ItemType 
+void checkFontAttributes( const SdrTextObj* pObj, ItemValue nVal)
 {
 CPPUNIT_ASSERT_MESSAGE( no object, pObj != NULL);
 const EditTextObject aEdit = 
pObj-GetOutlinerParaObject()-GetTextObject();
@@ -180,31 +199,12 @@ void checkFontAttributes(const SdrTextObj* pObj, 
sal_uInt32 nColor,
 aEdit.GetCharAttribs(0, rLst);
 for( std::vectorEECharAttrib::reverse_iterator it = rLst.rbegin(); 
it!=rLst.rend(); ++it)
 {
-const SvxColorItem *pCharColor = dynamic_castconst SvxColorItem 
*((*it).pAttr);
-if( pCharColor )
+const ItemType* pAttrib = dynamic_castconst ItemType *((*it).pAttr);
+if (pAttrib)
 {
-CPPUNIT_ASSERT_EQUAL( nColor, pCharColor-GetValue().GetColor());
-}
-
-if(bCheckWeight)
-{
-const SvxWeightItem *pWeight = dynamic_castconst SvxWeightItem 
*((*it).pAttr);
-if( pWeight )
-{
-CPPUNIT_ASSERT_EQUAL( eWeight, pWeight-GetWeight());
-}
-}
-
-if(bCheckItalic)
-{
-const SvxPostureItem *pPosture = dynamic_castconst SvxPostureItem 
*((*it).pAttr);
-if( pPosture )
-{
-CPPUNIT_ASSERT_EQUAL( eItalic, pPosture-GetPosture());
-}
+CPPUNIT_ASSERT_EQUAL( nVal, (ItemValue)pAttrib-GetValue());
 }
 }
-
 }
 
 }
@@ -224,15 +224,15 @@ void SdExportTest::testBnc870233_1()
 // First shape has red, bold font
 {
 const SdrTextObj *pObj = dynamic_castSdrTextObj *( pPage-GetObj( 0 
) );
-checkFontAttributes(pObj, sal_uInt32(0xff),
-true, WEIGHT_BOLD, true, ITALIC_NONE);
+checkFontAttributesColor, SvxColorItem( pObj, Color(0xff) );
+checkFontAttributesFontWeight, SvxWeightItem( pObj, WEIGHT_BOLD );
 }
 
 // Second shape has blue, italic font
 {
 const SdrTextObj *pObj = dynamic_castSdrTextObj *( pPage-GetObj( 1 
) );
-checkFontAttributes(pObj, sal_uInt32(0xff),
-true, WEIGHT_NORMAL, true, ITALIC_NORMAL);
+checkFontAttributesColor, SvxColorItem( pObj, Color(0xff) );
+checkFontAttributesFontItalic, SvxPostureItem( pObj, ITALIC_NORMAL );
 }
 
 xDocShRef-DoClose();
@@ -253,22 +253,19 @@ void SdExportTest::testBnc870233_2()
 // First smart art has blue font color (direct formatting)
 {
 const SdrTextObj *pObj = dynamic_castSdrTextObj *( pPage-GetObj( 0 
) );
-checkFontAttributes(pObj, sal_uInt32(0xff),
-false, WEIGHT_DONTKNOW, false, ITALIC_NONE);
+checkFontAttributesColor, SvxColorItem( pObj, Color(0xff) );
 }
 
 // Second smart art has dk2 font color (style)
 {
 const SdrTextObj *pObj = dynamic_castSdrTextObj *( pPage-GetObj( 1 
) );
-checkFontAttributes(pObj, sal_uInt32(0x1F497D),
-false, WEIGHT_DONTKNOW, false, ITALIC_NONE);
+checkFontAttributesColor, SvxColorItem( pObj, Color(0x1F497D) );
 }
 
 // Third smart art has white font color (style)
 {
 const SdrTextObj *pObj = dynamic_castSdrTextObj *( pPage-GetObj( 2 
) );
-checkFontAttributes(pObj, sal_uInt32(0xff),
-false, WEIGHT_DONTKNOW, false, ITALIC_NONE);
+checkFontAttributesColor, SvxColorItem( pObj, Color(0xff) );
 }
 
 

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

2015-05-28 Thread Miklos Vajna
 sd/qa/unit/tiledrendering/tiledrendering.cxx |2 +-
 sw/source/core/doc/doc.cxx   |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit afc3010f45ee67a2517fcebac5d96c309eb94118
Author: Miklos Vajna vmik...@collabora.co.uk
Date:   Thu May 28 09:04:53 2015 +0200

indentation fixes

Change-Id: I267bb8b66c6c568718cec3f292f0b63737693b37

diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx 
b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index b41c427..0523773 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -82,7 +82,7 @@ private:
 SdTiledRenderingTest::SdTiledRenderingTest()
 #if !defined(WNT)  !defined(MACOSX)
 : m_bFound(true),
-m_nPart(0)
+  m_nPart(0)
 #endif
 {
 }
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index a25a641..c65309f 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -1058,7 +1058,7 @@ const SwFormatRefMark* SwDoc::GetRefMark( sal_uInt16 
nIndex ) const
 nCount++;
 }
 }
-   return pRet;
+return pRet;
 }
 
 /// @return the names of all set references in the Doc
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-05-27 Thread Miklos Vajna
 sd/qa/unit/tiledrendering/data/dummy.odp |binary
 sd/qa/unit/tiledrendering/tiledrendering.cxx |   36 ++-
 2 files changed, 30 insertions(+), 6 deletions(-)

New commits:
commit a0576aec8381ca8ea36d60c925e871587702c268
Author: Miklos Vajna vmik...@collabora.co.uk
Date:   Wed May 27 11:59:00 2015 +0200

CppunitTest_sd_tiledrendering: add part switching testcase

Fails with the last hunk of commit
67a37be9969d8b5a0bc8ae081bc1aba697ea6ba5 (sd: fix LOK search result
highlight when result is not on the current slide, 2015-05-26) reverted.

Change-Id: I5f8b57784ad1de1434113af7f94c9fde8672b4d5

diff --git a/sd/qa/unit/tiledrendering/data/dummy.odp 
b/sd/qa/unit/tiledrendering/data/dummy.odp
index e559de6..12cd679 100644
Binary files a/sd/qa/unit/tiledrendering/data/dummy.odp and 
b/sd/qa/unit/tiledrendering/data/dummy.odp differ
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx 
b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index a55b026..9889015 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -37,6 +37,7 @@ static const char* DATA_DIRECTORY = 
/sd/qa/unit/tiledrendering/data/;
 class SdTiledRenderingTest : public test::BootstrapFixture, public 
unotest::MacrosTest, public XmlTestTools
 {
 public:
+SdTiledRenderingTest();
 virtual void setUp() SAL_OVERRIDE;
 virtual void tearDown() SAL_OVERRIDE;
 
@@ -73,9 +74,17 @@ private:
 #if !defined(WNT)  !defined(MACOSX)
 Rectangle m_aInvalidation;
 std::vectorRectangle m_aSelection;
+sal_Int32 m_nPart;
 #endif
 };
 
+SdTiledRenderingTest::SdTiledRenderingTest()
+#if !defined(WNT)  !defined(MACOSX)
+: m_nPart(0)
+#endif
+{
+}
+
 void SdTiledRenderingTest::setUp()
 {
 test::BootstrapFixture::setUp();
@@ -158,6 +167,12 @@ void SdTiledRenderingTest::callbackImpl(int nType, const 
char* pPayload)
 }
 }
 break;
+case LOK_CALLBACK_SET_PART:
+{
+OUString aPayload = OUString::createFromAscii(pPayload);
+m_nPart = aPayload.toInt32();
+}
+break;
 }
 }
 
@@ -306,6 +321,16 @@ void SdTiledRenderingTest::testResetSelection()
 CPPUNIT_ASSERT(!pView-GetTextEditObject());
 }
 
+static void lcl_search(const OUString rKey)
+{
+uno::Sequencebeans::PropertyValue 
aPropertyValues(comphelper::InitPropertySequence(
+{
+{SearchItem.SearchString, uno::makeAny(rKey)},
+{SearchItem.Backward, uno::makeAny(false)}
+}));
+comphelper::dispatchCommand(.uno:ExecuteSearch, aPropertyValues);
+}
+
 void SdTiledRenderingTest::testSearch()
 {
 SdXImpressDocument* pXImpressDocument = createDoc(dummy.odp);
@@ -314,12 +339,7 @@ void SdTiledRenderingTest::testSearch()
 uno::Referencetext::XTextRange xShape(xDrawPage-getByIndex(0), 
uno::UNO_QUERY);
 xShape-setString(Aaa bbb.);
 
-uno::Sequencebeans::PropertyValue 
aPropertyValues(comphelper::InitPropertySequence(
-{
-{SearchItem.SearchString, uno::makeAny(OUString(bbb))},
-{SearchItem.Backward, uno::makeAny(false)}
-}));
-comphelper::dispatchCommand(.uno:ExecuteSearch, aPropertyValues);
+lcl_search(bbb);
 
 sd::ViewShell* pViewShell = 
pXImpressDocument-GetDocShell()-GetViewShell();
 SdrView* pView = pViewShell-GetView();
@@ -329,6 +349,10 @@ void SdTiledRenderingTest::testSearch()
 
 // Did the selection callback fire?
 CPPUNIT_ASSERT_EQUAL(static_castsize_t(1), m_aSelection.size());
+
+// Search for something on the second slide, and make sure that the 
set-part callback fired.
+lcl_search(bbb);
+CPPUNIT_ASSERT_EQUAL(static_castsal_Int32(1), m_nPart);
 }
 
 #endif
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-05-27 Thread Robert Antoni Buj Gelonch
 sd/qa/unit/import-tests.cxx |   66 ++--
 1 file changed, 33 insertions(+), 33 deletions(-)

New commits:
commit c52bc46136d24557ca142ee2d143be1ee7a0f4cf
Author: Robert Antoni Buj Gelonch robert@gmail.com
Date:   Tue May 26 11:40:17 2015 +0200

Coding style: removing the scope resolution operator in xDocShRef 
declarations

Change-Id: Ie88d2f3d6af3553976ebe0d299c4e9f31443cda6
Signed-off-by: Stephan Bergmann sberg...@redhat.com

diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 440271e..111f1d8 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -200,7 +200,7 @@ void SdImportTest::testDocumentLayout()
 {
 int nUpdateMe = -1; // index of test we want to update; supposedly 
only when the test is created
 
-::sd::DrawDocShellRef xDocShRef = loadURL( getURLFromSrc( 
/sd/qa/unit/data/ ) + OUString::createFromAscii( aFilesToCompare[i].pInput ), 
aFilesToCompare[i].nFormat );
+sd::DrawDocShellRef xDocShRef = loadURL( getURLFromSrc( 
/sd/qa/unit/data/ ) + OUString::createFromAscii( aFilesToCompare[i].pInput ), 
aFilesToCompare[i].nFormat );
 if( aFilesToCompare[i].nExportType = 0 )
 xDocShRef = saveAndReload( xDocShRef, 
aFilesToCompare[i].nExportType );
 compareWithShapesDump( xDocShRef,
@@ -211,7 +211,7 @@ void SdImportTest::testDocumentLayout()
 
 void SdImportTest::testSmoketest()
 {
-::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/smoketest.pptx), PPTX);
+sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/smoketest.pptx), PPTX);
 
 SdDrawDocument *pDoc = xDocShRef-GetDoc();
 CPPUNIT_ASSERT_MESSAGE( no document, pDoc != NULL );
@@ -239,7 +239,7 @@ void SdImportTest::testSmoketest()
 
 void SdImportTest::testN759180()
 {
-::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/n759180.pptx), PPTX);
+sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/n759180.pptx), PPTX);
 
 SdDrawDocument *pDoc = xDocShRef-GetDoc();
 CPPUNIT_ASSERT_MESSAGE( no document, pDoc != NULL );
@@ -277,7 +277,7 @@ void SdImportTest::testN759180()
 
 void SdImportTest::testN862510_1()
 {
-::sd::DrawDocShellRef xDocShRef = loadURL( 
getURLFromSrc(/sd/qa/unit/data/pptx/n862510_1.pptx), PPTX );
+sd::DrawDocShellRef xDocShRef = loadURL( 
getURLFromSrc(/sd/qa/unit/data/pptx/n862510_1.pptx), PPTX );
 
 SdDrawDocument *pDoc = xDocShRef-GetDoc();
 CPPUNIT_ASSERT_MESSAGE( no document, pDoc != NULL );
@@ -302,7 +302,7 @@ void SdImportTest::testN862510_1()
 
 void SdImportTest::testN862510_2()
 {
-::sd::DrawDocShellRef xDocShRef = loadURL( 
getURLFromSrc(/sd/qa/unit/data/pptx/n862510_2.pptx), PPTX );
+sd::DrawDocShellRef xDocShRef = loadURL( 
getURLFromSrc(/sd/qa/unit/data/pptx/n862510_2.pptx), PPTX );
 
 SdDrawDocument *pDoc = xDocShRef-GetDoc();
 CPPUNIT_ASSERT_MESSAGE( no document, pDoc != NULL );
@@ -321,7 +321,7 @@ void SdImportTest::testN862510_2()
 
 void SdImportTest::testN862510_4()
 {
-::sd::DrawDocShellRef xDocShRef = loadURL( 
getURLFromSrc(/sd/qa/unit/data/pptx/n862510_4.pptx), PPTX );
+sd::DrawDocShellRef xDocShRef = loadURL( 
getURLFromSrc(/sd/qa/unit/data/pptx/n862510_4.pptx), PPTX );
 
 SdDrawDocument *pDoc = xDocShRef-GetDoc();
 CPPUNIT_ASSERT_MESSAGE( no document, pDoc != NULL );
@@ -346,7 +346,7 @@ void SdImportTest::testN862510_4()
 
 void SdImportTest::testN828390_2()
 {
-::sd::DrawDocShellRef xDocShRef = loadURL( 
getURLFromSrc(/sd/qa/unit/data/pptx/n828390_2.pptx), PPTX );
+sd::DrawDocShellRef xDocShRef = loadURL( 
getURLFromSrc(/sd/qa/unit/data/pptx/n828390_2.pptx), PPTX );
 
 SdDrawDocument *pDoc = xDocShRef-GetDoc();
 CPPUNIT_ASSERT_MESSAGE( no document, pDoc != NULL );
@@ -366,7 +366,7 @@ void SdImportTest::testN828390_2()
 void SdImportTest::testN828390_3()
 {
 bool bPassed = true;
-::sd::DrawDocShellRef xDocShRef = loadURL( 
getURLFromSrc(/sd/qa/unit/data/pptx/n828390_3.pptx), PPTX );
+sd::DrawDocShellRef xDocShRef = loadURL( 
getURLFromSrc(/sd/qa/unit/data/pptx/n828390_3.pptx), PPTX );
 
 SdDrawDocument *pDoc = xDocShRef-GetDoc();
 CPPUNIT_ASSERT_MESSAGE( no document, pDoc != NULL );
@@ -398,7 +398,7 @@ void SdImportTest::testN828390_3()
 
 void SdImportTest::testMasterPageStyleParent()
 {
-::sd::DrawDocShellRef xDocShRef = loadURL( 
getURLFromSrc(/sd/qa/unit/data/odp/masterpage_style_parent.odp), ODP );
+sd::DrawDocShellRef xDocShRef = loadURL( 
getURLFromSrc(/sd/qa/unit/data/odp/masterpage_style_parent.odp), ODP );
 
 SdDrawDocument *pDoc = xDocShRef-GetDoc();
 CPPUNIT_ASSERT_MESSAGE( no document, pDoc != NULL );
@@ -437,7 +437,7 @@ void SdImportTest::testMasterPageStyleParent()
 
 void SdImportTest::testN778859()
 {
-::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/pptx/n778859.pptx), PPTX);
+

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

2015-05-14 Thread Charu Tyagi
 sd/qa/unit/data/fdo90607.pptx |binary
 sd/qa/unit/export-tests.cxx   |   26 ++
 2 files changed, 26 insertions(+)

New commits:
commit 58f43ab810311d8b7238317f4cec5346eebdbb17
Author: Charu Tyagi charu.ty...@ericsson.com
Date:   Tue Apr 21 15:04:34 2015 +0530

tdf#90607-Test Case for the patch

Change-Id: Ifcd75cc47baf9da7b3480a4a1e51853aa66c3f1c
Reviewed-on: https://gerrit.libreoffice.org/15458
Tested-by: Jenkins c...@libreoffice.org
Tested-by: Caolán McNamara caol...@redhat.com
Reviewed-by: Caolán McNamara caol...@redhat.com

diff --git a/sd/qa/unit/data/fdo90607.pptx b/sd/qa/unit/data/fdo90607.pptx
new file mode 100644
index 000..0c01aa8
Binary files /dev/null and b/sd/qa/unit/data/fdo90607.pptx differ
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index 036e179..3151afb 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -103,11 +103,13 @@ public:
 void testBulletMarginAndIndentation();
 void testParaMarginAndindentation();
 
+void testFdo90607();
 #if !defined WNT
 void testBnc822341();
 #endif
 
 CPPUNIT_TEST_SUITE(SdExportTest);
+CPPUNIT_TEST(testFdo90607);
 CPPUNIT_TEST(testN821567);
 CPPUNIT_TEST(testBnc870233_1);
 CPPUNIT_TEST(testBnc870233_2);
@@ -527,6 +529,30 @@ void SdExportTest::testBnc822347_EmptyBullet()
 xDocShRef-DoClose();
 }
 
+//Bullets not having  any text following them are not getting exported to pptx 
correctly.
+void SdExportTest::testFdo90607()
+{
+sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/fdo90607.pptx), PPTX);
+xDocShRef = saveAndReload(xDocShRef, PPTX);
+
+uno::Reference drawing::XDrawPagesSupplier  xDoc(
+xDocShRef-GetDoc()-getUnoModel(), uno::UNO_QUERY_THROW );
+
+uno::Reference drawing::XDrawPage  xPage(
+xDoc-getDrawPages()-getByIndex(0), uno::UNO_QUERY_THROW );
+ SdDrawDocument *pDoc = xDocShRef-GetDoc();
+CPPUNIT_ASSERT_MESSAGE( no document, pDoc != NULL );
+
+const SdrPage *pPage = pDoc-GetPage(1);
+CPPUNIT_ASSERT_MESSAGE( no page, pPage != NULL );
+SdrTextObj *pTxtObj = dynamic_castSdrTextObj *( pPage-GetObj(1) );
+CPPUNIT_ASSERT_MESSAGE( no text object, pTxtObj != NULL);
+OutlinerParaObject* pOutlinerParagraphObject = 
pTxtObj-GetOutlinerParaObject();
+const sal_Int16 nDepth = pOutlinerParagraphObject-GetDepth(0);
+CPPUNIT_ASSERT_MESSAGE(not equal, nDepth != -1);
+xDocShRef-DoClose();
+}
+
 void SdExportTest::testFdo83751()
 {
 ::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/pptx/fdo83751.pptx), PPTX);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-05-12 Thread yogesh . bharate001
 sd/qa/unit/data/pptx/n80340.pptx |binary
 sd/qa/unit/import-tests.cxx  |   25 +
 svx/source/table/cell.cxx|2 +-
 3 files changed, 26 insertions(+), 1 deletion(-)

New commits:
commit 4f2c8194f485b1527fb4f4dfe23ce804937f1f9c
Author: yogesh.bharate001 yogesh.bhar...@synerzip.com
Date:   Fri Mar 20 20:37:52 2015 +0530

tdf#80340: Table changes format in PPTX format

Problem:
- If the PPTX contains embedded table i.e copied from excel, when we open 
it in
impress it row height increase due to this table format changes.
- Table contents empty row i.e without text, then row height increase 
because
text height is added also added for empty row.

Solution:
- Added check whether row contents text or not.

Change-Id: I9f8a99aa407384505f0075168cf64fd51b8b4c7b
Reviewed-on: https://gerrit.libreoffice.org/14925
Tested-by: Jenkins c...@libreoffice.org
Tested-by: Caolán McNamara caol...@redhat.com
Reviewed-by: Caolán McNamara caol...@redhat.com

diff --git a/sd/qa/unit/data/pptx/n80340.pptx b/sd/qa/unit/data/pptx/n80340.pptx
new file mode 100755
index 000..6702075
Binary files /dev/null and b/sd/qa/unit/data/pptx/n80340.pptx differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index c2f00b9..6b7f993 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -58,6 +58,7 @@
 #include com/sun/star/chart2/data/XNumericalDataSequence.hpp
 #include com/sun/star/table/BorderLine2.hpp
 #include com/sun/star/style/ParagraphAdjust.hpp
+#include com/sun/star/table/XTableRows.hpp
 
 #include stlpool.hxx
 
@@ -102,6 +103,7 @@ public:
 #endif
 void testBulletSuffix();
 void testBnc910045();
+void testRowHeight();
 
 CPPUNIT_TEST_SUITE(SdImportTest);
 
@@ -140,6 +142,7 @@ public:
 #endif
 CPPUNIT_TEST(testBulletSuffix);
 CPPUNIT_TEST(testBnc910045);
+CPPUNIT_TEST(testRowHeight);
 
 CPPUNIT_TEST_SUITE_END();
 };
@@ -1173,6 +1176,28 @@ void SdImportTest::testBnc910045()
 CPPUNIT_ASSERT_EQUAL(sal_Int32(5210557), nColor);
 }
 
+void SdImportTest::testRowHeight()
+{
+::sd::DrawDocShellRef xDocShRef = loadURL( 
getURLFromSrc(/sd/qa/unit/data/pptx/n80340.pptx), PPTX );
+
+SdDrawDocument *pDoc = xDocShRef-GetDoc();
+CPPUNIT_ASSERT_MESSAGE( no document, pDoc != NULL );
+
+const SdrPage *pPage = pDoc-GetPage(1);
+CPPUNIT_ASSERT_MESSAGE( no page, pPage != NULL );
+
+sdr::table::SdrTableObj *pTableObj = 
dynamic_castsdr::table::SdrTableObj*(pPage-GetObj(0));
+CPPUNIT_ASSERT( pTableObj );
+
+sal_Int32 nHeight;
+const OUString sHeight(Height);
+uno::Reference com::sun::star::table::XTable  
xTable(pTableObj-getTable(), uno::UNO_QUERY_THROW);
+uno::Reference com::sun::star::table::XTableRows  xRows( 
xTable-getRows(), uno::UNO_QUERY_THROW);
+uno::Reference beans::XPropertySet  xRefRow( xRows-getByIndex(0), 
uno::UNO_QUERY_THROW );
+xRefRow-getPropertyValue( sHeight ) = nHeight;
+CPPUNIT_ASSERT_EQUAL( sal_Int32(508), nHeight);
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index 11aedb8..71da0f1 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -727,7 +727,7 @@ sal_Int32 Cell::getMinimumHeight()
 pEditOutliner-SetMaxAutoPaperSize(aSize);
 nMinimumHeight = pEditOutliner-GetTextHeight()+1;
 }
-else /*if ( hasText() )*/
+else if ( hasText() )
 {
 Outliner rOutliner=rTableObj.ImpGetDrawOutliner();
 rOutliner.SetPaperSize(aSize);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-04-24 Thread Miklos Vajna
 sd/qa/unit/tiledrendering/tiledrendering.cxx |   74 ---
 1 file changed, 68 insertions(+), 6 deletions(-)

New commits:
commit 041de031e456d6122dc28aeac2edb7f913ddfdbe
Author: Miklos Vajna vmik...@collabora.co.uk
Date:   Fri Apr 24 11:19:50 2015 +0200

CppunitTest_sd_tiledrendering: add search testcase

This fails without ef9722558a33a6e88ed5ab76198f2698ddd1e003
(ImpEditView::SetEditSelection: fix missing tiled rendering selection
callbacks, 2015-04-23).

Change-Id: I5bf6bf6373e43e8551dd61d72d1f0012f92d2619

diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx 
b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 7e3cf19..a55b026 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -10,7 +10,9 @@
 #define LOK_USE_UNSTABLE_API
 #include LibreOfficeKit/LibreOfficeKitEnums.h
 #include com/sun/star/frame/Desktop.hpp
+#include comphelper/dispatchcommand.hxx
 #include comphelper/processfactory.hxx
+#include comphelper/propertysequence.hxx
 #include comphelper/string.hxx
 #include editeng/editids.hrc
 #include editeng/editview.hxx
@@ -45,6 +47,7 @@ public:
 void testSetTextSelection();
 void testSetGraphicSelection();
 void testResetSelection();
+void testSearch();
 #endif
 
 CPPUNIT_TEST_SUITE(SdTiledRenderingTest);
@@ -55,6 +58,7 @@ public:
 CPPUNIT_TEST(testSetTextSelection);
 CPPUNIT_TEST(testSetGraphicSelection);
 CPPUNIT_TEST(testResetSelection);
+CPPUNIT_TEST(testSearch);
 #endif
 CPPUNIT_TEST_SUITE_END();
 
@@ -68,6 +72,7 @@ private:
 uno::Referencelang::XComponent mxComponent;
 #if !defined(WNT)  !defined(MACOSX)
 Rectangle m_aInvalidation;
+std::vectorRectangle m_aSelection;
 #endif
 };
 
@@ -103,6 +108,33 @@ void SdTiledRenderingTest::callback(int nType, const char* 
pPayload, void* pData
 static_castSdTiledRenderingTest*(pData)-callbackImpl(nType, pPayload);
 }
 
+static std::vectorOUString lcl_convertSeparated(const OUString rString, 
sal_Unicode nSeparator)
+{
+std::vectorOUString aRet;
+
+sal_Int32 nIndex = 0;
+do
+{
+OUString aToken = rString.getToken(0, nSeparator, nIndex);
+aToken = aToken.trim();
+if (!aToken.isEmpty())
+aRet.push_back(aToken);
+}
+while (nIndex = 0);
+
+return aRet;
+}
+
+static void lcl_convertRectangle(const OUString rString, Rectangle 
rRectangle)
+{
+uno::SequenceOUString aSeq = 
comphelper::string::convertCommaSeparated(rString);
+CPPUNIT_ASSERT_EQUAL(static_castsal_Int32(4), aSeq.getLength());
+rRectangle.setX(aSeq[0].toInt32());
+rRectangle.setY(aSeq[1].toInt32());
+rRectangle.setWidth(aSeq[2].toInt32());
+rRectangle.setHeight(aSeq[3].toInt32());
+}
+
 void SdTiledRenderingTest::callbackImpl(int nType, const char* pPayload)
 {
 switch (nType)
@@ -111,13 +143,18 @@ void SdTiledRenderingTest::callbackImpl(int nType, const 
char* pPayload)
 {
 OUString aPayload = OUString::createFromAscii(pPayload);
 if (aPayload != EMPTY  m_aInvalidation.IsEmpty())
+lcl_convertRectangle(aPayload, m_aInvalidation);
+}
+break;
+case LOK_CALLBACK_TEXT_SELECTION:
+{
+OUString aPayload = OUString::createFromAscii(pPayload);
+m_aSelection.clear();
+for (const OUString rString : lcl_convertSeparated(aPayload, 
static_castsal_Unicode(';')))
 {
-uno::SequenceOUString aSeq = 
comphelper::string::convertCommaSeparated(aPayload);
-CPPUNIT_ASSERT_EQUAL(static_castsal_Int32(4), aSeq.getLength());
-m_aInvalidation.setX(aSeq[0].toInt32());
-m_aInvalidation.setY(aSeq[1].toInt32());
-m_aInvalidation.setWidth(aSeq[2].toInt32());
-m_aInvalidation.setHeight(aSeq[3].toInt32());
+Rectangle aRectangle;
+lcl_convertRectangle(rString, aRectangle);
+m_aSelection.push_back(aRectangle);
 }
 }
 break;
@@ -269,6 +306,31 @@ void SdTiledRenderingTest::testResetSelection()
 CPPUNIT_ASSERT(!pView-GetTextEditObject());
 }
 
+void SdTiledRenderingTest::testSearch()
+{
+SdXImpressDocument* pXImpressDocument = createDoc(dummy.odp);
+pXImpressDocument-registerCallback(SdTiledRenderingTest::callback, this);
+uno::Referencecontainer::XIndexAccess 
xDrawPage(pXImpressDocument-getDrawPages()-getByIndex(0), uno::UNO_QUERY);
+uno::Referencetext::XTextRange xShape(xDrawPage-getByIndex(0), 
uno::UNO_QUERY);
+xShape-setString(Aaa bbb.);
+
+uno::Sequencebeans::PropertyValue 
aPropertyValues(comphelper::InitPropertySequence(
+{
+{SearchItem.SearchString, uno::makeAny(OUString(bbb))},
+{SearchItem.Backward, uno::makeAny(false)}
+}));
+comphelper::dispatchCommand(.uno:ExecuteSearch, aPropertyValues);
+
+sd::ViewShell* pViewShell = 
pXImpressDocument-GetDocShell()-GetViewShell();
+SdrView* pView = 

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

2015-04-14 Thread Miklos Vajna
 sd/qa/unit/tiledrendering/data/shape.odp |binary
 sd/qa/unit/tiledrendering/tiledrendering.cxx |   24 
 2 files changed, 24 insertions(+)

New commits:
commit 87b682500f481b61399609b24a4a695fda93f552
Author: Miklos Vajna vmik...@collabora.co.uk
Date:   Tue Apr 14 12:44:29 2015 +0200

Add SdXImpressDocument::setGraphicSelection() testcase.

Change-Id: Ifdf3ef84cd886b338536629fb36ebba694916d6a

diff --git a/sd/qa/unit/tiledrendering/data/shape.odp 
b/sd/qa/unit/tiledrendering/data/shape.odp
new file mode 100644
index 000..f734761
Binary files /dev/null and b/sd/qa/unit/tiledrendering/data/shape.odp differ
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx 
b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 1b87768..16ec351 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -43,6 +43,7 @@ public:
 void testPostKeyEvent();
 void testPostMouseEvent();
 void testSetTextSelection();
+void testSetGraphicSelection();
 #endif
 
 CPPUNIT_TEST_SUITE(SdTiledRenderingTest);
@@ -51,6 +52,7 @@ public:
 CPPUNIT_TEST(testPostKeyEvent);
 CPPUNIT_TEST(testPostMouseEvent);
 CPPUNIT_TEST(testSetTextSelection);
+CPPUNIT_TEST(testSetGraphicSelection);
 #endif
 CPPUNIT_TEST_SUITE_END();
 
@@ -219,6 +221,28 @@ void SdTiledRenderingTest::testSetTextSelection()
 // The new selection must include the ending dot, too -- but not the first 
word.
 CPPUNIT_ASSERT_EQUAL(OUString(bbb.), rEditView.GetSelected());
 }
+
+void SdTiledRenderingTest::testSetGraphicSelection()
+{
+SdXImpressDocument* pXImpressDocument = createDoc(shape.odp);
+sd::ViewShell* pViewShell = 
pXImpressDocument-GetDocShell()-GetViewShell();
+SdPage* pPage = pViewShell-GetActualPage();
+SdrObject* pObject = pPage-GetObj(0);
+// Make sure the rectangle has 8 handles: at each corner and at the center 
of each edge.
+CPPUNIT_ASSERT_EQUAL(static_castsal_uInt32(8), pObject-GetHdlCount());
+// Take the bottom center one.
+SdrHdl* pHdl = pObject-GetHdl(6);
+CPPUNIT_ASSERT_EQUAL(HDL_LOWER, pHdl-GetKind());
+Rectangle aShapeBefore = pObject-GetSnapRect();
+// Resize.
+pXImpressDocument-setGraphicSelection(LOK_SETGRAPHICSELECTION_START, 
convertMm100ToTwip(pHdl-GetPos().getX()), 
convertMm100ToTwip(pHdl-GetPos().getY()));
+pXImpressDocument-setGraphicSelection(LOK_SETGRAPHICSELECTION_END, 
convertMm100ToTwip(pHdl-GetPos().getX()), 
convertMm100ToTwip(pHdl-GetPos().getY() + 1000));
+Rectangle aShapeAfter = pObject-GetSnapRect();
+// Check that a resize happened, but aspect ratio is not kept.
+CPPUNIT_ASSERT_EQUAL(aShapeBefore.getWidth(), aShapeAfter.getWidth());
+CPPUNIT_ASSERT(aShapeBefore.getHeight()  aShapeAfter.getHeight());
+}
+
 #endif
 
 CPPUNIT_TEST_SUITE_REGISTRATION(SdTiledRenderingTest);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-04-07 Thread Stephan Bergmann
 sd/qa/unit/tiledrendering/tiledrendering.cxx |   10 ++
 1 file changed, 10 insertions(+)

New commits:
commit 8f2209b1ebcb053c9f6fa8cb2c39041bec08f9f8
Author: Stephan Bergmann sberg...@redhat.com
Date:   Tue Apr 7 22:57:38 2015 +0200

loplugin:unreffun

Change-Id: Id6370750cb42fdfb7b5b920e1a84317d0a2a4acb

diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx 
b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 0a4665c..5a364c4 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -28,7 +28,9 @@
 
 using namespace css;
 
+#if !defined(WNT)  !defined(MACOSX)
 static const char* DATA_DIRECTORY = /sd/qa/unit/tiledrendering/data/;
+#endif
 
 class SdTiledRenderingTest : public test::BootstrapFixture, public 
unotest::MacrosTest, public XmlTestTools
 {
@@ -36,9 +38,11 @@ public:
 virtual void setUp() SAL_OVERRIDE;
 virtual void tearDown() SAL_OVERRIDE;
 
+#if !defined(WNT)  !defined(MACOSX)
 void testRegisterCallback();
 void testPostMouseEvent();
 void testSetTextSelection();
+#endif
 
 CPPUNIT_TEST_SUITE(SdTiledRenderingTest);
 #if !defined(WNT)  !defined(MACOSX)
@@ -49,12 +53,16 @@ public:
 CPPUNIT_TEST_SUITE_END();
 
 private:
+#if !defined(WNT)  !defined(MACOSX)
 SdXImpressDocument* createDoc(const char* pName);
 static void callback(int nType, const char* pPayload, void* pData);
 void callbackImpl(int nType, const char* pPayload);
+#endif
 
 uno::Referencelang::XComponent mxComponent;
+#if !defined(WNT)  !defined(MACOSX)
 Rectangle m_aInvalidation;
+#endif
 };
 
 void SdTiledRenderingTest::setUp()
@@ -72,6 +80,7 @@ void SdTiledRenderingTest::tearDown()
 test::BootstrapFixture::tearDown();
 }
 
+#if !defined(WNT)  !defined(MACOSX)
 SdXImpressDocument* SdTiledRenderingTest::createDoc(const char* pName)
 {
 if (mxComponent.is())
@@ -182,6 +191,7 @@ void SdTiledRenderingTest::testSetTextSelection()
 // The new selection must include the ending dot, too -- but not the first 
word.
 CPPUNIT_ASSERT_EQUAL(OUString(bbb.), rEditView.GetSelected());
 }
+#endif
 
 CPPUNIT_TEST_SUITE_REGISTRATION(SdTiledRenderingTest);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-03-05 Thread Stephan Bergmann
 sd/qa/unit/import-tests.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit b8ca219893a6e14bfea3cec5522532c144ad2fa6
Author: Stephan Bergmann sberg...@redhat.com
Date:   Thu Mar 5 12:23:46 2015 +0100

Actually execute testPDFImportSkipImages

Change-Id: Ie3dda6d7ea24031eadf86801867a94f95c11310e

diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 6e0710d..972f8bc 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -129,6 +129,7 @@ public:
 CPPUNIT_TEST(testBnc862510_6);
 CPPUNIT_TEST(testBnc862510_7);
 CPPUNIT_TEST(testPDFImport);
+CPPUNIT_TEST(testPDFImportSkipImages);
 
 CPPUNIT_TEST_SUITE_END();
 };
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-02-07 Thread Zolnai Tamás
 sd/qa/unit/data/xml/fdo64586_0.xml|4 ++--
 sd/qa/unit/data/xml/n758621_0.xml |4 ++--
 sd/qa/unit/data/xml/n758621_1.xml |4 ++--
 sd/qa/unit/data/xml/n819614_0.xml |2 +-
 svtools/qa/unit/GraphicObjectTest.cxx |   11 +++
 vcl/source/gdi/impgraph.cxx   |4 ++--
 6 files changed, 20 insertions(+), 9 deletions(-)

New commits:
commit 905d4db48a0b98f540c8abc3e12fb80be4826029
Author: Zolnai Tamás zolnaitamas2...@gmail.com
Date:   Sat Feb 7 11:26:23 2015 +0100

tdf#88836: UI: in-form navigation bar icons gone

Regression from:
6419c745e5e9802da264250d5e131fb9a3b6e4de

Revert it and use IsEmpty() instead of operator!().

Change-Id: Icc4f5dbba848a1d4ef807e598f0aa3b940459c82

diff --git a/sd/qa/unit/data/xml/fdo64586_0.xml 
b/sd/qa/unit/data/xml/fdo64586_0.xml
index 7bbf719..a248783 100644
--- a/sd/qa/unit/data/xml/fdo64586_0.xml
+++ b/sd/qa/unit/data/xml/fdo64586_0.xml
@@ -4,7 +4,7 @@
   FillTransparenceGradient style=LINEAR startColor=00 
endColor=ff angle=0 border=0 xOffset=50 yOffset=50 
startIntensity=100 endIntensity=100 stepCount=0/
   FillGradient style=LINEAR startColor=00 endColor=ff angle=0 
border=0 xOffset=50 yOffset=50 startIntensity=100 endIntensity=100 
stepCount=0/
   FillHatch style=SINGLE color=3465a4 distance=20 angle=0/
-  FillBitmap width=0 height=0/
+  FillBitmap/
   LineDash style=RECT dots=1 dotLen=20 dashes=1 dashLen=20 
distance=20/
   LineStart/
   LineEnd/
@@ -18,7 +18,7 @@
   FillTransparenceGradient style=LINEAR startColor=00 
endColor=ff angle=0 border=0 xOffset=50 yOffset=50 
startIntensity=100 endIntensity=100 stepCount=0/
   FillGradient style=LINEAR startColor=00 endColor=ff angle=0 
border=0 xOffset=50 yOffset=50 startIntensity=100 endIntensity=100 
stepCount=0/
   FillHatch style=SINGLE color=3465a4 distance=20 angle=0/
-  FillBitmap width=0 height=0/
+  FillBitmap/
   LineDash style=RECT dots=1 dotLen=20 dashes=1 dashLen=20 
distance=20/
   LineStart/
   LineEnd/
diff --git a/sd/qa/unit/data/xml/n758621_0.xml 
b/sd/qa/unit/data/xml/n758621_0.xml
index 288bf98..754be1d 100644
--- a/sd/qa/unit/data/xml/n758621_0.xml
+++ b/sd/qa/unit/data/xml/n758621_0.xml
@@ -4,7 +4,7 @@
   FillTransparenceGradient style=LINEAR startColor=00 
endColor=ff angle=0 border=0 xOffset=50 yOffset=50 
startIntensity=100 endIntensity=100 stepCount=0/
   FillGradient style=LINEAR startColor=00 endColor=ff angle=0 
border=0 xOffset=50 yOffset=50 startIntensity=100 endIntensity=100 
stepCount=0/
   FillHatch style=SINGLE color=3465a4 distance=20 angle=0/
-  FillBitmap width=0 height=0/
+  FillBitmap/
   LineDash style=RECT dots=1 dotLen=20 dashes=1 dashLen=20 
distance=20/
   LineStart/
   LineEnd/
@@ -18,7 +18,7 @@
   FillTransparenceGradient style=LINEAR startColor=00 
endColor=ff angle=0 border=0 xOffset=50 yOffset=50 
startIntensity=100 endIntensity=100 stepCount=0/
   FillGradient style=LINEAR startColor=00 endColor=ff angle=0 
border=0 xOffset=50 yOffset=50 startIntensity=100 endIntensity=100 
stepCount=0/
   FillHatch style=SINGLE color=3465a4 distance=20 angle=0/
-  FillBitmap width=0 height=0/
+  FillBitmap/
   LineDash style=RECT dots=1 dotLen=20 dashes=1 dashLen=20 
distance=20/
   LineStart/
   LineEnd/
diff --git a/sd/qa/unit/data/xml/n758621_1.xml 
b/sd/qa/unit/data/xml/n758621_1.xml
index a124211..0f71931 100644
--- a/sd/qa/unit/data/xml/n758621_1.xml
+++ b/sd/qa/unit/data/xml/n758621_1.xml
@@ -4,7 +4,7 @@
   FillTransparenceGradient style=LINEAR startColor=00 
endColor=ff angle=0 border=0 xOffset=50 yOffset=50 
startIntensity=100 endIntensity=100 stepCount=0/
   FillGradient style=LINEAR startColor=00 endColor=ff angle=0 
border=0 xOffset=50 yOffset=50 startIntensity=100 endIntensity=100 
stepCount=0/
   FillHatch style=SINGLE color=3465a4 distance=20 angle=0/
-  FillBitmap width=0 height=0/
+  FillBitmap/
   LineDash style=RECT dots=1 dotLen=20 dashes=1 dashLen=20 
distance=20/
   LineStart/
   LineEnd/
@@ -18,7 +18,7 @@
   FillTransparenceGradient style=LINEAR startColor=00 
endColor=ff angle=0 border=0 xOffset=50 yOffset=50 
startIntensity=100 endIntensity=100 stepCount=0/
   FillGradient style=LINEAR startColor=00 endColor=ff angle=0 
border=0 xOffset=50 yOffset=50 startIntensity=100 endIntensity=100 
stepCount=0/
   FillHatch style=SINGLE color=3465a4 distance=20 angle=0/
-  FillBitmap width=0 height=0/
+  FillBitmap/
   LineDash style=RECT dots=1 dotLen=20 dashes=1 dashLen=20 
distance=20/
   LineStart/
   LineEnd/
diff --git a/sd/qa/unit/data/xml/n819614_0.xml 
b/sd/qa/unit/data/xml/n819614_0.xml
index b7005be..aff9c32 100644
--- a/sd/qa/unit/data/xml/n819614_0.xml
+++ b/sd/qa/unit/data/xml/n819614_0.xml
@@ -4,7 +4,7 @@
   FillTransparenceGradient style=LINEAR startColor=00 
endColor=ff angle=0 border=0 xOffset=50 yOffset=50 
startIntensity=100 endIntensity=100 stepCount=0/
   FillGradient 

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

2014-12-22 Thread Zolnai Tamás
 sd/qa/unit/import-tests.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a911241da212808375af0067049d28ce0b3709bb
Author: Zolnai Tamás tamas.zol...@collabora.com
Date:   Mon Dec 22 16:39:22 2014 +0100

Fix typo

Change-Id: I6b4b16a8ab4a446826e4b6d2670b1484cb87379a

diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index c33176f..b401687 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -1030,7 +1030,7 @@ void SdImportTest::testBnc862510_6()
 sal_Int32 nCharColor;
 xPropSet-getPropertyValue( CharColor ) = nCharColor;
 
-// Color should be black
+// Color should be gray
 CPPUNIT_ASSERT_EQUAL( sal_Int32(0x8B8B8B), nCharColor );
 
 xDocShRef-DoClose();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-12-22 Thread Zolnai Tamás
 sd/qa/unit/export-tests.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 1a27c648c8a72bc69c5f5a56e9398f6e5980b387
Author: Zolnai Tamás tamas.zol...@collabora.com
Date:   Mon Dec 22 16:43:21 2014 +0100

More typos

Change-Id: Iffaca1b822d24247825250044fba3bdc07a051fc

diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index b425323..9f00db1 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -728,7 +728,7 @@ void SdExportTest::testBnc822341()
 ::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(sd/qa/unit/data/odp/bnc822341.odp), ODP);
 xDocShRef = saveAndReload( xDocShRef, PPTX );
 
-// Export an LO specific ole object (exported from an ODP document)
+// Export an LO specific ole object (imported from an ODP document)
 {
 SdDrawDocument *pDoc = xDocShRef-GetDoc();
 CPPUNIT_ASSERT_MESSAGE( no document, pDoc != NULL );
@@ -742,7 +742,7 @@ void SdExportTest::testBnc822341()
 
 xDocShRef = saveAndReload( xDocShRef, PPTX );
 
-// Export an MS specific ole object (exported from a PPTX document)
+// Export an MS specific ole object (imported from a PPTX document)
 {
 SdDrawDocument *pDoc = xDocShRef-GetDoc();
 CPPUNIT_ASSERT_MESSAGE( no document, pDoc != NULL );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-12-22 Thread Zolnai Tamás
 sd/qa/unit/export-tests.cxx |8 
 1 file changed, 8 insertions(+)

New commits:
commit 6eb059a56d6575496265e4c552f79e8946640d52
Author: Zolnai Tamás tamas.zol...@collabora.com
Date:   Mon Dec 22 18:06:37 2014 +0100

This test fails for Windows, so skip it for now.

Change-Id: I33e480e756cd5cc88e119b47022646a4db3f4f96

diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index 9f00db1..19c5ed3 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -81,7 +81,9 @@ public:
 void testSwappedOutImageExport();
 void testLinkedGraphicRT();
 void testImageWithSpecialID();
+#if !defined WNT
 void testBnc822341();
+#endif
 
 CPPUNIT_TEST_SUITE(SdExportTest);
 CPPUNIT_TEST(testN821567);
@@ -101,7 +103,9 @@ public:
 CPPUNIT_TEST(testSwappedOutImageExport);
 CPPUNIT_TEST(testLinkedGraphicRT);
 CPPUNIT_TEST(testImageWithSpecialID);
+#if !defined WNT
 CPPUNIT_TEST(testBnc822341);
+#endif
 CPPUNIT_TEST_SUITE_END();
 };
 
@@ -722,6 +726,8 @@ void SdExportTest::testImageWithSpecialID()
 }
 }
 
+#if !defined WNT
+
 void SdExportTest::testBnc822341()
 {
 // Check import / export of embedded text document
@@ -757,6 +763,8 @@ void SdExportTest::testBnc822341()
 xDocShRef-DoClose();
 }
 
+#endif
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SdExportTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-11-28 Thread Michael Stahl
 sd/qa/unit/data/fdo84043.odp |binary
 sd/qa/unit/export-tests.cxx  |   16 
 2 files changed, 16 insertions(+)

New commits:
commit 12ab10e5824bb5efff27123aecfdefa1a16d5223
Author: Michael Stahl mst...@redhat.com
Date:   Fri Nov 28 17:37:01 2014 +0100

fdo#84043: add a test for the bug

Change-Id: Ic9ad86bfc2d4d6b02afe99a34ded27fe94f54fab

diff --git a/sd/qa/unit/data/fdo84043.odp b/sd/qa/unit/data/fdo84043.odp
new file mode 100644
index 000..eed9e79
Binary files /dev/null and b/sd/qa/unit/data/fdo84043.odp differ
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index dfa2edc..189dbf2 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -71,6 +71,7 @@ public:
 void testN828390_5();
 void testMediaEmbedding();
 void testFdo71961();
+void testFdo84043();
 void testN828390();
 void testBnc880763();
 void testBnc862510_5();
@@ -87,6 +88,7 @@ public:
 CPPUNIT_TEST(testN828390_5);
 CPPUNIT_TEST(testMediaEmbedding);
 CPPUNIT_TEST(testFdo71961);
+CPPUNIT_TEST(testFdo84043);
 CPPUNIT_TEST(testN828390);
 CPPUNIT_TEST(testBnc880763);
 CPPUNIT_TEST(testBnc862510_5);
@@ -325,6 +327,20 @@ void SdExportTest::testMediaEmbedding()
 xDocShRef-DoClose();
 }
 
+void SdExportTest::testFdo84043()
+{
+::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/fdo84043.odp), ODP);
+xDocShRef = saveAndReload( xDocShRef, ODP );
+
+// the bug was duplicate attributes, causing crash in a build with asserts
+SdDrawDocument const* pDoc = xDocShRef-GetDoc();
+CPPUNIT_ASSERT_MESSAGE(no document, pDoc != nullptr);
+SdrPage const* pPage = pDoc-GetPage(1);
+CPPUNIT_ASSERT_MESSAGE(no page, pPage != nullptr);
+SdrObject const* pShape = pPage-GetObj(1);
+CPPUNIT_ASSERT_MESSAGE(no shape, pShape != nullptr);
+}
+
 void SdExportTest::testFdo71961()
 {
 ::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/fdo71961.odp), ODP);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-11-13 Thread Noel Grandin
 sd/qa/unit/import-tests.cxx   |2 
 sd/source/filter/eppt/eppt.cxx|2 
 sd/source/filter/eppt/pptx-epptbase.cxx   |2 
 sd/source/filter/ppt/pptin.cxx|   68 +++---
 sd/source/filter/sdpptwrp.cxx |4 -
 sd/source/ui/animations/CustomAnimationDialog.cxx |   12 +--
 sd/source/ui/animations/CustomAnimationPane.cxx   |   16 ++---
 sd/source/ui/annotations/annotationmanager.cxx|   14 ++--
 sd/source/ui/annotations/annotationwindow.cxx |8 +-
 sd/source/ui/app/sdmod1.cxx   |8 +-
 sd/source/ui/app/sdmod2.cxx   |   10 +--
 sd/source/ui/app/sdpopup.cxx  |   36 +--
 sd/source/ui/app/sdxfer.cxx   |   10 +--
 sd/source/ui/app/tmplctrl.cxx |2 
 sd/source/ui/dlg/animobjs.cxx |6 -
 sd/source/ui/dlg/brkdlg.cxx   |2 
 sd/source/ui/dlg/copydlg.cxx  |   18 ++---
 sd/source/ui/dlg/diactrl.cxx  |2 
 sd/source/ui/dlg/dlgassim.cxx |6 -
 sd/source/ui/dlg/dlgchar.cxx  |2 
 sd/source/ui/dlg/dlgfield.cxx |   38 ++--
 sd/source/ui/dlg/dlgolbul.cxx |8 +-
 sd/source/ui/dlg/dlgpage.cxx  |8 +-
 sd/source/ui/dlg/dlgsnap.cxx  |4 -
 sd/source/ui/dlg/gluectrl.cxx |4 -
 sd/source/ui/dlg/headerfooterdlg.cxx  |   28 -
 sd/source/ui/dlg/layeroptionsdlg.cxx  |   12 +--
 sd/source/ui/dlg/masterlayoutdlg.cxx  |2 
 sd/source/ui/dlg/morphdlg.cxx |8 +-
 sd/source/ui/dlg/paragr.cxx   |4 -
 sd/source/ui/dlg/present.cxx  |   34 +--
 sd/source/ui/dlg/prltempl.cxx |   14 ++--
 sd/source/ui/dlg/sdpreslt.cxx |8 +-
 sd/source/ui/dlg/sdtreelb.cxx |   38 +---
 sd/source/ui/dlg/tabtempl.cxx |4 -
 sd/source/ui/dlg/tpaction.cxx |   12 +--
 sd/source/ui/dlg/tpoption.cxx |   40 ++--
 sd/source/ui/dlg/unchss.cxx   |9 +-
 sd/source/ui/dlg/vectdlg.cxx  |2 
 sd/source/ui/docshell/docshel3.cxx|   13 +---
 sd/source/ui/docshell/docshel4.cxx|4 -
 sd/source/ui/view/drviewse.cxx|4 -
 42 files changed, 263 insertions(+), 265 deletions(-)

New commits:
commit b52a7c4df461109e6b80c65b043135582dd4f01b
Author: Noel Grandin n...@peralex.com
Date:   Thu Nov 13 10:19:16 2014 +0200

loplugin: cstylecast

Change-Id: I071962c646199c30e842b9ec7673473de237ee45

diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 141db84..bf98862 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -449,7 +449,7 @@ void SdImportTest::testFdo72998()
 {
 SdrObjCustomShape *pObj = dynamic_castSdrObjCustomShape 
*(pPage-GetObj(2));
 CPPUNIT_ASSERT( pObj );
-const SdrCustomShapeGeometryItem rGeometryItem = (const 
SdrCustomShapeGeometryItem)pObj-GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY );
+const SdrCustomShapeGeometryItem rGeometryItem = static_castconst 
SdrCustomShapeGeometryItem(pObj-GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY 
));
 const ::com::sun::star::uno::Any* pViewBox = 
((SdrCustomShapeGeometryItem)rGeometryItem).GetPropertyValueByName( OUString( 
ViewBox ) );
 CPPUNIT_ASSERT_MESSAGE( Missing ViewBox, pViewBox );
 com::sun::star::awt::Rectangle aViewBox;
diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx
index 8861fed..4bf6e91 100644
--- a/sd/source/filter/eppt/eppt.cxx
+++ b/sd/source/filter/eppt/eppt.cxx
@@ -1272,7 +1272,7 @@ void PPTWriter::ImplWriteOLE( )
 SdrObject* pSdrObj = GetSdrObjectFromXShape( pPtr-xShape );
 if ( pSdrObj  pSdrObj-ISA( SdrOle2Obj ) )
 {
-::uno::Reference  embed::XEmbeddedObject  xObj( ( 
(SdrOle2Obj*) pSdrObj )-GetObjRef() );
+::uno::Reference  embed::XEmbeddedObject  xObj( 
static_castSdrOle2Obj*(pSdrObj)-GetObjRef() );
 if( xObj.is() )
 {
 SvStorageRef xTempStorage( new SvStorage( new 
SvMemoryStream(), true ) );
diff --git a/sd/source/filter/eppt/pptx-epptbase.cxx 
b/sd/source/filter/eppt/pptx-epptbase.cxx
index 1e17c09..2ec0569 100644
--- a/sd/source/filter/eppt/pptx-epptbase.cxx
+++ b/sd/source/filter/eppt/pptx-epptbase.cxx
@@ -540,7 +540,7 @@ bool PPTWriterBase::GetStyleSheets()
 ? (sal_uInt16)( *(sal_Int32*)mAny.getValue() / 4.40972 )
 : 1250;
 
-

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

2014-11-07 Thread Zolnai Tamás
 sd/qa/unit/export-tests.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 673f3dfc3cc4190a01001280330ff0b63cd1cc7f
Author: Zolnai Tamás tamas.zol...@collabora.com
Date:   Fri Nov 7 15:41:53 2014 +0100

Build fix again

Change-Id: Ia3ddea84b022a34709b6be14afb105bedeef0553

diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index c1caa46..244c4e8 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -513,7 +513,7 @@ void SdExportTest::testSwappedOutImageExport()
 {
 // Load the original file with one image
 ::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/odp/document_with_two_images.odp), 
ODP);
-const OString sFailedMessage = OString(Failed on filter: ) + 
OString(aFileFormats[nExportFormat]].pFilterName);
+const OString sFailedMessage = OString(Failed on filter: ) + 
OString(aFileFormats[vFormats[nExportFormat]].pFilterName);
 
 // Export the document and import again for a check
 uno::Reference lang::XComponent  xComponent(xDocShRef-GetModel(), 
uno::UNO_QUERY);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-10-21 Thread Caolán McNamara
 sd/qa/unit/data/pptx/pass/CVE-2014-4114.ppsx |binary
 sd/qa/unit/filters-test.cxx  |4 
 2 files changed, 4 insertions(+)

New commits:
commit fd92dffe05f6bf5c849df65c03de56ea0b3e7df0
Author: Caolán McNamara caol...@redhat.com
Date:   Tue Oct 21 10:02:39 2014 +0100

add CVE-2014-4114 test

Change-Id: I4d195f5ff7f9dc12747a8748915e82ab06d770fa

diff --git a/sd/qa/unit/data/pptx/fail/.gitignore 
b/sd/qa/unit/data/pptx/fail/.gitignore
new file mode 100644
index 000..e69de29
diff --git a/sd/qa/unit/data/pptx/indeterminate/.gitignore 
b/sd/qa/unit/data/pptx/indeterminate/.gitignore
new file mode 100644
index 000..e69de29
diff --git a/sd/qa/unit/data/pptx/pass/.gitignore 
b/sd/qa/unit/data/pptx/pass/.gitignore
new file mode 100644
index 000..e69de29
diff --git a/sd/qa/unit/data/pptx/pass/CVE-2014-4114.ppsx 
b/sd/qa/unit/data/pptx/pass/CVE-2014-4114.ppsx
new file mode 100644
index 000..ee80cbe
Binary files /dev/null and b/sd/qa/unit/data/pptx/pass/CVE-2014-4114.ppsx differ
diff --git a/sd/qa/unit/filters-test.cxx b/sd/qa/unit/filters-test.cxx
index 1d18531..e0e5905 100644
--- a/sd/qa/unit/filters-test.cxx
+++ b/sd/qa/unit/filters-test.cxx
@@ -84,6 +84,10 @@ void SdFiltersTest::testCVEs()
 getURLFromSrc(/sd/qa/unit/data/ppt/),
 OUString(sdfilt));
 
+testDir(OUString(Impress Office Open XML),
+getURLFromSrc(/sd/qa/unit/data/pptx/),
+OUString(),  (SFX_FILTER_IMPORT | SFX_FILTER_ALIEN | 
SFX_FILTER_STARONEFILTER));
+
 testDir(OUString(impress8),
 getURLFromSrc(/sd/qa/unit/data/odp/),
 OUString(sdfilt));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-09-25 Thread Heena Gupta
 sd/qa/unit/data/pptx/fdo83751.pptx |binary
 sd/qa/unit/export-tests.cxx|   19 +++
 2 files changed, 19 insertions(+)

New commits:
commit 13f4581c8db921f93f3a278f212f859a7158c482
Author: Heena Gupta heena.h.gu...@ericsson.com
Date:   Fri Sep 12 17:27:16 2014 +0530

fdo#83751- Add test case for custom properties in pptx

Change-Id: I83fb0462c662e0da1f1c5c6dfec4bd8d94d97b87
Reviewed-on: https://gerrit.libreoffice.org/11420
Reviewed-by: Michael Stahl mst...@redhat.com
Tested-by: Michael Stahl mst...@redhat.com

diff --git a/sd/qa/unit/data/pptx/fdo83751.pptx 
b/sd/qa/unit/data/pptx/fdo83751.pptx
new file mode 100644
index 000..be0dfe4
Binary files /dev/null and b/sd/qa/unit/data/pptx/fdo83751.pptx differ
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index 0c856fd..7aa1e26 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -52,6 +52,7 @@
 #include com/sun/star/chart2/data/XNumericalDataSequence.hpp
 
 #include config_features.h
+#include com/sun/star/document/XDocumentPropertiesSupplier.hpp
 
 using namespace ::com::sun::star;
 
@@ -69,6 +70,7 @@ public:
 void testBnc880763();
 void testBnc862510_5();
 void testBnc822347_EmptyBullet();
+void testFdo83751();
 
 CPPUNIT_TEST_SUITE(SdFiltersTest);
 CPPUNIT_TEST(testN821567);
@@ -82,6 +84,7 @@ public:
 CPPUNIT_TEST(testBnc880763);
 CPPUNIT_TEST(testBnc862510_5);
 CPPUNIT_TEST(testBnc822347_EmptyBullet);
+CPPUNIT_TEST(testFdo83751);
 CPPUNIT_TEST_SUITE_END();
 };
 
@@ -457,6 +460,22 @@ void SdFiltersTest::testBnc822347_EmptyBullet()
 xDocShRef-DoClose();
 }
 
+void SdFiltersTest::testFdo83751()
+{
+::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/pptx/fdo83751.pptx), PPTX);
+xDocShRef = saveAndReload( xDocShRef, PPTX );
+
+SdDrawDocument *pDoc = xDocShRef-GetDoc();
+CPPUNIT_ASSERT_MESSAGE( no document, pDoc != NULL );
+
+uno::Referencedocument::XDocumentPropertiesSupplier 
xDocumentPropertiesSupplier( xDocShRef-GetModel(), uno::UNO_QUERY );
+uno::Referencedocument::XDocumentProperties xProps( 
xDocumentPropertiesSupplier-getDocumentProperties(), uno::UNO_QUERY );
+uno::Referencebeans::XPropertySet xUDProps( 
xProps-getUserDefinedProperties(), uno::UNO_QUERY );
+OUString propValue;
+xUDProps-getPropertyValue(OUString(Testing)) = propValue;
+CPPUNIT_ASSERT_EQUAL(OUString(Document), propValue);
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SdFiltersTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-09-09 Thread Matúš Kukan
 sd/qa/unit/data/pptx/bnc480256.pptx |binary
 sd/qa/unit/import-tests.cxx |   48 
 2 files changed, 48 insertions(+)

New commits:
commit 5681725f1a2535a13b86104d8b8a33f750f34efc
Author: Matúš Kukan matus.ku...@collabora.com
Date:   Tue Sep 9 13:19:27 2014 +0200

bnc#480256: OOXML import: unit test for table background property

Change-Id: I97bf0bd1ea8cf8ece30a2fa328c5c7a8b0549a4a

diff --git a/sd/qa/unit/data/pptx/bnc480256.pptx 
b/sd/qa/unit/data/pptx/bnc480256.pptx
new file mode 100755
index 000..71e91c2
Binary files /dev/null and b/sd/qa/unit/data/pptx/bnc480256.pptx differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 259004c..f49d6aa 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -76,6 +76,7 @@ public:
 void testN862510_4();
 void testBnc870237();
 void testBnc887225();
+void testBnc480256();
 void testCreationDate();
 
 CPPUNIT_TEST_SUITE(SdFiltersTest);
@@ -97,6 +98,7 @@ public:
 CPPUNIT_TEST(testN862510_4);
 CPPUNIT_TEST(testBnc870237);
 CPPUNIT_TEST(testBnc887225);
+CPPUNIT_TEST(testBnc480256);
 CPPUNIT_TEST(testCreationDate);
 
 CPPUNIT_TEST_SUITE_END();
@@ -661,6 +663,52 @@ void SdFiltersTest::testBnc887225()
 xDocShRef-DoClose();
 }
 
+void SdFiltersTest::testBnc480256()
+{
+::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/pptx/bnc480256.pptx), PPTX);
+// In the document, there are two tables with table background properties.
+// Make sure colors are set properly for individual cells.
+
+// TODO: If you are working on improving table background support, expect
+// this unit test to fail. In that case, feel free to change the numbers.
+
+SdDrawDocument *pDoc = xDocShRef-GetDoc();
+CPPUNIT_ASSERT_MESSAGE( no document, pDoc != NULL );
+const SdrPage *pPage = pDoc-GetPage(1);
+CPPUNIT_ASSERT_MESSAGE( no page, pPage != NULL );
+
+sdr::table::SdrTableObj *pTableObj;
+uno::Reference table::XCellRange  xTable;
+uno::Reference beans::XPropertySet  xCell;
+sal_Int32 nColor;
+
+pTableObj = dynamic_castsdr::table::SdrTableObj*(pPage-GetObj(0));
+CPPUNIT_ASSERT( pTableObj );
+xTable.set(pTableObj-getTable(), uno::UNO_QUERY_THROW);
+
+xCell.set(xTable-getCellByPosition(0, 0), uno::UNO_QUERY_THROW);
+xCell-getPropertyValue(FillColor) = nColor;
+CPPUNIT_ASSERT_EQUAL(sal_Int32(10208238), nColor);
+
+xCell.set(xTable-getCellByPosition(0, 1), uno::UNO_QUERY_THROW);
+xCell-getPropertyValue(FillColor) = nColor;
+CPPUNIT_ASSERT_EQUAL(sal_Int32(13032959), nColor);
+
+pTableObj = dynamic_castsdr::table::SdrTableObj*(pPage-GetObj(1));
+CPPUNIT_ASSERT( pTableObj );
+xTable.set(pTableObj-getTable(), uno::UNO_QUERY_THROW);
+
+xCell.set(xTable-getCellByPosition(0, 0), uno::UNO_QUERY_THROW);
+xCell-getPropertyValue(FillColor) = nColor;
+CPPUNIT_ASSERT_EQUAL(sal_Int32(7056614), nColor);
+
+xCell.set(xTable-getCellByPosition(0, 1), uno::UNO_QUERY_THROW);
+xCell-getPropertyValue(FillColor) = nColor;
+CPPUNIT_ASSERT_EQUAL(sal_Int32(4626400), nColor);
+
+xDocShRef-DoClose();
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SdFiltersTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-07-17 Thread Markus Mohrhard
 sd/qa/unit/HtmlExportTest.cxx  |2 -
 sd/qa/unit/export-tests.cxx|   20 +++
 sd/qa/unit/import-tests.cxx|   54 -
 sd/qa/unit/sdmodeltestbase.hxx |   21 +--
 4 files changed, 45 insertions(+), 52 deletions(-)

New commits:
commit 461cb8fb430bfab2f67ae22d40852c3ca42841a2
Author: Markus Mohrhard markus.mohrh...@collabora.co.uk
Date:   Thu Jul 17 13:20:13 2014 +0200

make the temp file names random in sd tests

All the temp files got the same names for the temp files which might
conflict when two tests try to get teh same temp file at the same time.
Additionally it makes the dbgutil check by Norbert for finding leaked
temp files useless.

Change-Id: I692107f7705787c360247785b8d95daf4199c2a6

diff --git a/sd/qa/unit/HtmlExportTest.cxx b/sd/qa/unit/HtmlExportTest.cxx
index 81a62b4..779 100644
--- a/sd/qa/unit/HtmlExportTest.cxx
+++ b/sd/qa/unit/HtmlExportTest.cxx
@@ -32,7 +32,7 @@ public:
 
 void testHTMLExport()
 {
-sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/HtmlExportTestDocument.odp));
+sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/HtmlExportTestDocument.odp), ODP);
 htmlDocPtr htmlDoc = exportAndParseHtml(xDocShRef);
 
 assertXPath(htmlDoc, /html, 1);
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index 44c5c9a..3a939d7 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -82,7 +82,7 @@ public:
 void SdFiltersTest::testN821567()
 {
 OUString bgImage;
-::sd::DrawDocShellRef xDocShRef = loadURL( 
getURLFromSrc(/sd/qa/unit/data/pptx/n821567.pptx) );
+::sd::DrawDocShellRef xDocShRef = loadURL( 
getURLFromSrc(/sd/qa/unit/data/pptx/n821567.pptx), PPTX );
 
 xDocShRef = saveAndReload( xDocShRef, ODP );
 uno::Reference drawing::XDrawPagesSupplier  xDoc(
@@ -147,7 +147,7 @@ void checkFontAttributes(const SdrTextObj* pObj, sal_uInt32 
nColor,
 
 void SdFiltersTest::testBnc870233_1()
 {
-::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/pptx/bnc870233_1.pptx));
+::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/pptx/bnc870233_1.pptx), PPTX);
 xDocShRef = saveAndReload( xDocShRef, PPTX );
 
 SdDrawDocument *pDoc = xDocShRef-GetDoc();
@@ -176,7 +176,7 @@ void SdFiltersTest::testBnc870233_1()
 
 void SdFiltersTest::testBnc870233_2()
 {
-::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/pptx/bnc870233_2.pptx));
+::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/pptx/bnc870233_2.pptx), PPTX);
 xDocShRef = saveAndReload( xDocShRef, PPTX );
 
 SdDrawDocument *pDoc = xDocShRef-GetDoc();
@@ -213,7 +213,7 @@ void SdFiltersTest::testBnc870233_2()
 void SdFiltersTest::testN828390_4()
 {
 bool bPassed = false;
-::sd::DrawDocShellRef xDocShRef = loadURL( 
getURLFromSrc(/sd/qa/unit/data/n828390_4.odp) );
+::sd::DrawDocShellRef xDocShRef = loadURL( 
getURLFromSrc(/sd/qa/unit/data/n828390_4.odp), ODP );
 
 xDocShRef = saveAndReload( xDocShRef, PPTX );
 
@@ -251,7 +251,7 @@ void SdFiltersTest::testN828390_4()
 
 void SdFiltersTest::testN828390_5()
 {
-::sd::DrawDocShellRef xDocShRef = loadURL( 
getURLFromSrc(/sd/qa/unit/data/n828390_5.odp) );
+::sd::DrawDocShellRef xDocShRef = loadURL( 
getURLFromSrc(/sd/qa/unit/data/n828390_5.odp), ODP );
 
 xDocShRef = saveAndReload( xDocShRef, PPTX );
 
@@ -274,7 +274,7 @@ void SdFiltersTest::testN828390_5()
 
 void SdFiltersTest::testMediaEmbedding()
 {
-::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/media_embedding.odp));
+::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/media_embedding.odp), ODP);
 
 #if HAVE_FEATURE_GLTF
 xDocShRef = saveAndReload( xDocShRef, ODP );
@@ -309,7 +309,7 @@ void SdFiltersTest::testMediaEmbedding()
 
 void SdFiltersTest::testFdo71961()
 {
-::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/fdo71961.odp));
+::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/fdo71961.odp), ODP);
 
 xDocShRef = saveAndReload( xDocShRef, PPTX );
 
@@ -341,7 +341,7 @@ void SdFiltersTest::testFdo71961()
 void SdFiltersTest::testN828390()
 {
 bool bPassed = false;
-::sd::DrawDocShellRef xDocShRef = loadURL( 
getURLFromSrc(/sd/qa/unit/data/pptx/n828390.pptx) );
+::sd::DrawDocShellRef xDocShRef = loadURL( 
getURLFromSrc(/sd/qa/unit/data/pptx/n828390.pptx), PPTX );
 
 xDocShRef = saveAndReload( xDocShRef, PPTX );
 
@@ -377,7 +377,7 @@ void SdFiltersTest::testN828390()
 
 void SdFiltersTest::testBnc880763()
 {
-::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/pptx/bnc880763.pptx));
+::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/pptx/bnc880763.pptx), PPTX);
 xDocShRef = 

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

2014-07-17 Thread Markus Mohrhard
 sd/qa/unit/import-tests.cxx|2 +-
 sd/qa/unit/sdmodeltestbase.hxx |1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 472e34d22f845734b886142bfcaadc69d6749e39
Author: Markus Mohrhard markus.mohrh...@collabora.co.uk
Date:   Thu Jul 17 15:45:33 2014 +0200

fix build failure

Change-Id: I95af4c2750c01e3e48f6708306b25f774c29e592

diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 6567f3d..51b5fcc 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -555,7 +555,7 @@ void SdFiltersTest::testBnc870237()
 
 void SdFiltersTest::testBnc887225()
 {
-::sd::DrawDocShellRef xDocShRef = loadURL( 
getURLFromSrc(/sd/qa/unit/data/pptx/bnc887225.pptx) );
+::sd::DrawDocShellRef xDocShRef = loadURL( 
getURLFromSrc(/sd/qa/unit/data/pptx/bnc887225.pptx), PPTX );
 // In the document, lastRow and lastCol table properties are used.
 // Make sure styles are set properly for individual cells.
 
diff --git a/sd/qa/unit/sdmodeltestbase.hxx b/sd/qa/unit/sdmodeltestbase.hxx
index c78c980..20cdacc 100644
--- a/sd/qa/unit/sdmodeltestbase.hxx
+++ b/sd/qa/unit/sdmodeltestbase.hxx
@@ -168,7 +168,6 @@ protected:
 sd::DrawDocShellRef saveAndReload(sd::DrawDocShell *pShell, sal_Int32 
nExportType)
 {
 FileFormat* pFormat = getFormat(nExportType);
-OUString aExt = OUString( . ) + 
OUString::createFromAscii(pFormat-pName);
 utl::TempFile aTempFile;
 aTempFile.EnableKillingFile();
 save(pShell, pFormat, aTempFile);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-06-17 Thread Matúš Kukan
 sd/qa/unit/data/xml/n593612_0.xml |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 5158f5e9fdffe31f54b6da9e75164a99d10ad617
Author: Matúš Kukan matus.ku...@collabora.com
Date:   Tue Jun 17 12:45:47 2014 +0200

fix sd_import_tests after e42c05c1f96832572e525d85d89590f56f5a29dd

Change-Id: Ife852a6c7c360c66a7d7d5b144f18898398505dd

diff --git a/sd/qa/unit/data/xml/n593612_0.xml 
b/sd/qa/unit/data/xml/n593612_0.xml
index 5d5189b..b55385b 100644
--- a/sd/qa/unit/data/xml/n593612_0.xml
+++ b/sd/qa/unit/data/xml/n593612_0.xml
@@ -1,6 +1,6 @@
 ?xml version=1.0?
 XShapes
- XShape positionX=11429 positionY=1324 sizeX=2259 sizeY=15192 
type=com.sun.star.drawing.CustomShape name=Rectangle 52 
text=#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;
 fontHeight=24.00 fontColor= textAutoGrowHeight=true 
textAutoGrowWidth=false textContourFrame=false textFitToSize=NONE 
textHorizontalAdjust=CENTER textVerticalAdjust=TOP textLeftDistance=254 
textRightDistance=254 textUpperDistance=127 textLowerDistance=127 
textMaximumFrameHeight=0 textMaximumFrameWidth=0 textMinimumFrameHeight=0 
textMinimumFrameWidth=0 textAnimationAmount=0 textAnimationCount=0 
textAnimationDelay=0 textAnimationDirection=LEFT textAnimationKind=NONE 
textAnimationStartInside=false textAnimationStopInside=false 
textWritingMode=LR_TB fillStyle=SOLID fillColor=3c8c93 
fillTransparence=0 fillTran
 sparenceGradientName=
+ XShape positionX=11429 positionY=1324 sizeX=2259 sizeY=15821 
type=com.sun.star.drawing.CustomShape name=Rectangle 52 
text=#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;
 fontHeight=24.00 fontColor= textAutoGrowHeight=true 
textAutoGrowWidth=false textContourFrame=false textFitToSize=NONE 
textHorizontalAdjust=CENTER textVerticalAdjust=TOP textLeftDistance=254 
textRightDistance=254 textUpperDistance=127 textLowerDistance=127 
textMaximumFrameHeight=0 textMaximumFrameWidth=0 textMinimumFrameHeight=0 
textMinimumFrameWidth=0 textAnimationAmount=0 textAnimationCount=0 
textAnimationDelay=0 textAnimationDirection=LEFT textAnimationKind=NONE 
textAnimationStartInside=false textAnimationStopInside=false 
textWritingMode=LR_TB fillStyle=SOLID fillColor=3c8c93 
fillTransparence=0 fillTran
 sparenceGradientName=
   FillTransparenceGradient style=LINEAR startColor=00 
endColor=ff angle=0 border=0 xOffset=50 yOffset=50 
startIntensity=100 endIntensity=100 stepCount=0/
   FillGradient style=LINEAR startColor=3465a4 endColor=ff angle=0 
border=0 xOffset=50 yOffset=50 startIntensity=100 endIntensity=100 
stepCount=0/
   FillHatch style=SINGLE color=3465a4 distance=20 angle=0/
@@ -10,7 +10,7 @@
   LineEnd/
   Transformation
Line1 column1=2260.00 column2=0.00 column3=11429.00/
-   Line2 column1=0.00 column2=15193.00 column3=1324.00/
+   Line2 column1=0.00 column2=15822.00 column3=1324.00/
Line3 column1=0.00 column2=0.00 column3=1.00/
   /Transformation
   CustomShapeGeometry
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-06-16 Thread Zolnai Tamás
 sd/qa/unit/data/media_embedding.odp |binary
 xmloff/source/draw/shapeexport.cxx  |3 ++-
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 04b7b2c72fbfa57180cac680b07618fc40fe0da6
Author: Zolnai Tamás tamas.zol...@collabora.com
Date:   Mon Jun 16 13:55:40 2014 +0200

Fix gltf export: close plugin element before export fallback

Change-Id: I2e1f27e535ee45259f7bdf783ea5224b2ad559ef

diff --git a/sd/qa/unit/data/media_embedding.odp 
b/sd/qa/unit/data/media_embedding.odp
index 368b1fa..4174e84 100644
Binary files a/sd/qa/unit/data/media_embedding.odp and 
b/sd/qa/unit/data/media_embedding.odp differ
diff --git a/xmloff/source/draw/shapeexport.cxx 
b/xmloff/source/draw/shapeexport.cxx
index 68965ed..fff8f4a 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -3332,7 +3332,7 @@ void XMLShapeExport::ImpExportMediaShape(
 mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_MIME_TYPE, sMimeType );
 
 // write plugin
-SvXMLElementExport aOBJ(mrExport, XML_NAMESPACE_DRAW, XML_PLUGIN, !( 
nFeatures  SEF_EXPORT_NO_WS ), true);
+SvXMLElementExport* pPluginOBJ =  new SvXMLElementExport(mrExport, 
XML_NAMESPACE_DRAW, XML_PLUGIN, !( nFeatures  SEF_EXPORT_NO_WS ), true);
 
 // export parameters
 const OUString aFalseStr(  false  ), aTrueStr(  true  );
@@ -3384,6 +3384,7 @@ void XMLShapeExport::ImpExportMediaShape(
 delete( new SvXMLElementExport( mrExport, XML_NAMESPACE_DRAW, 
XML_PARAM, false, true ) );
 }
 
+delete pPluginOBJ;
 #if HAVE_FEATURE_GLTF
 if( sMimeType == model/vnd.gltf+json )
 lcl_StoreGltfFallback(GetExport(), xPropSet, aMediaURL);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-06-16 Thread Zolnai Tamás
 sd/qa/unit/data/media_embedding.odp |binary
 sd/qa/unit/import-tests.cxx |4 ++--
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit e38acfa15b52353565ad9ddaf3cf96dd13c5b0fb
Author: Zolnai Tamás tamas.zol...@collabora.com
Date:   Mon Jun 16 14:12:39 2014 +0200

Reduce test doc size, use a simpler gltf model

Change-Id: I5bd78343728f8a4d68610397a7be328826a0334c

diff --git a/sd/qa/unit/data/media_embedding.odp 
b/sd/qa/unit/data/media_embedding.odp
index 4174e84..8069b3f 100644
Binary files a/sd/qa/unit/data/media_embedding.odp and 
b/sd/qa/unit/data/media_embedding.odp differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 0f813a9..d591732 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -727,7 +727,7 @@ void SdFiltersTest::testMediaEmbedding()
 // First object is a glTF model
 SdrMediaObj *pModelObj = dynamic_castSdrMediaObj*( pPage-GetObj( 2 ));
 CPPUNIT_ASSERT_MESSAGE( missing model, pModelObj != NULL);
-CPPUNIT_ASSERT_EQUAL( OUString( 
vnd.sun.star.Package:Models/jeep/jeep.json ), 
pModelObj-getMediaProperties().getURL());
+CPPUNIT_ASSERT_EQUAL( OUString( 
vnd.sun.star.Package:Models/duck/duck.json ), 
pModelObj-getMediaProperties().getURL());
 CPPUNIT_ASSERT_EQUAL( OUString( model/vnd.gltf+json ), 
pModelObj-getMediaProperties().getMimeType());
 
 // Check the case when experimental mode is disabled
@@ -743,7 +743,7 @@ void SdFiltersTest::testMediaEmbedding()
 // If glTF is not supported, then the fallback image is imported
 SdrGrafObj *pGrafic = dynamic_castSdrGrafObj*( pPage-GetObj( 2 ));
 CPPUNIT_ASSERT_MESSAGE( Could not load glTF fallback image, pGrafic != 
NULL);
-CPPUNIT_ASSERT_EQUAL( OUString( 
vnd.sun.star.Package:Models/Fallbacks/jeep.png ), 
pGrafic-GetGrafStreamURL());
+CPPUNIT_ASSERT_EQUAL( OUString( 
vnd.sun.star.Package:Models/Fallbacks/duck.png ), 
pGrafic-GetGrafStreamURL());
 
 // Second object is a sound
 SdrMediaObj *pMediaObj = dynamic_castSdrMediaObj*( pPage-GetObj( 3 ));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sd/qa sd/source xmloff/CppunitTest_xmloff_uxmloff.mk xmloff/Library_xo.mk xmloff/source

2014-06-16 Thread Zolnai Tamás
 sd/qa/unit/import-tests.cxx  |   15 ++-
 sd/source/ui/view/drviews2.cxx   |5 -
 sd/source/ui/view/drviews7.cxx   |   11 ++-
 xmloff/CppunitTest_xmloff_uxmloff.mk |1 -
 xmloff/Library_xo.mk |1 -
 xmloff/source/draw/ximpshap.cxx  |   13 -
 6 files changed, 8 insertions(+), 38 deletions(-)

New commits:
commit b7f2cad98730ee97805fa1f831613cbfd76a9870
Author: Zolnai Tamás tamas.zol...@collabora.com
Date:   Mon Jun 16 18:59:25 2014 +0200

Revert Make glTF support an experimental feature

Actually make it experimental mode was unecessary on master.

This reverts commit 653bac184f579524bc25a9f40281763a736ae6fd.

Conflicts:
sd/qa/unit/import-tests.cxx
xmloff/source/draw/ximpshap.cxx

Change-Id: Ie8747745a9a89ce4d6500a35d15a98e28bda840a

diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index d591732..8d43ea0 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -30,7 +30,6 @@
 #include svx/svdomedia.hxx
 #include svx/svdoole2.hxx
 #include svx/xflclit.hxx
-#include svtools/miscopt.hxx
 #include animations/animationnodehelper.hxx
 
 #include com/sun/star/drawing/XDrawPage.hpp
@@ -711,7 +710,6 @@ void SdFiltersTest::testFdo71961()
 
 void SdFiltersTest::testMediaEmbedding()
 {
-SvtMiscOptions().SetExperimentalMode(true);
 ::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/media_embedding.odp));
 
 #if HAVE_FEATURE_GLTF
@@ -729,21 +727,12 @@ void SdFiltersTest::testMediaEmbedding()
 CPPUNIT_ASSERT_MESSAGE( missing model, pModelObj != NULL);
 CPPUNIT_ASSERT_EQUAL( OUString( 
vnd.sun.star.Package:Models/duck/duck.json ), 
pModelObj-getMediaProperties().getURL());
 CPPUNIT_ASSERT_EQUAL( OUString( model/vnd.gltf+json ), 
pModelObj-getMediaProperties().getMimeType());
-
-// Check the case when experimental mode is disabled
-xDocShRef-DoClose();
-SvtMiscOptions().SetExperimentalMode(false);
-xDocShRef = loadURL(getURLFromSrc(/sd/qa/unit/data/media_embedding.odp));
-pDoc = xDocShRef-GetDoc();
-CPPUNIT_ASSERT_MESSAGE( no document, pDoc != NULL );
-pPage = pDoc-GetPage (1);
-CPPUNIT_ASSERT_MESSAGE( no page, pPage != NULL );
-#endif
-
+#else
 // If glTF is not supported, then the fallback image is imported
 SdrGrafObj *pGrafic = dynamic_castSdrGrafObj*( pPage-GetObj( 2 ));
 CPPUNIT_ASSERT_MESSAGE( Could not load glTF fallback image, pGrafic != 
NULL);
 CPPUNIT_ASSERT_EQUAL( OUString( 
vnd.sun.star.Package:Models/Fallbacks/duck.png ), 
pGrafic-GetGrafStreamURL());
+#endif
 
 // Second object is a sound
 SdrMediaObj *pMediaObj = dynamic_castSdrMediaObj*( pPage-GetObj( 3 ));
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 1e6cf27..2d503cd 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -79,8 +79,6 @@
 #include svx/xlnstwit.hxx
 #include svx/xlnwtit.hxx
 
-#include svtools/miscopt.hxx
-
 #include tools/diagnose_ex.h
 
 #include unotools/useroptions.hxx
@@ -1171,9 +1169,6 @@ void DrawViewShell::FuTemporary(SfxRequest rReq)
 #if HAVE_FEATURE_GLTF
 case SID_INSERT_3DMODEL:
 {
-if( !SvtMiscOptions().IsExperimentalMode() )
-break;
-
 SetCurrentFunction( FuInsert3DModel::Create( this, 
GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
 
 Cancel();
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index 2bd235e..d57b4a6 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -43,8 +43,6 @@
 #include svx/extrusionbar.hxx
 #include svx/fontworkbar.hxx
 
-#include svtools/miscopt.hxx
-
 // #UndoRedo#
 #include svl/slstitm.hxx
 #include sfx2/app.hxx
@@ -1662,18 +1660,13 @@ void DrawViewShell::GetMenuState( SfxItemSet rSet )
 }
 }
 
-bool bDisableInsert3DModel = false;
 #if !HAVE_FEATURE_GLTF
-bDisableInsert3DModel = true;
-#else
-bDisableInsert3DModel = !SvtMiscOptions().IsExperimentalMode();
-#endif
-
-if (bDisableInsert3DModel  SFX_ITEM_AVAILABLE == 
rSet.GetItemState(SID_INSERT_3DMODEL))
+if (SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_INSERT_3DMODEL))
 {
 rSet.DisableItem(SID_INSERT_3DMODEL);
 rSet.Put(SfxVisibilityItem(SID_INSERT_3DMODEL, false));
 }
+#endif
 
 GetModeSwitchingMenuState (rSet);
 }
diff --git a/xmloff/CppunitTest_xmloff_uxmloff.mk 
b/xmloff/CppunitTest_xmloff_uxmloff.mk
index 9228357..1fa4ca4 100644
--- a/xmloff/CppunitTest_xmloff_uxmloff.mk
+++ b/xmloff/CppunitTest_xmloff_uxmloff.mk
@@ -45,7 +45,6 @@ $(eval $(call gb_CppunitTest_use_libraries,xmloff_uxmloff, \
 salhelper \
sax \
 svl \
-svt \
test \
 tl \
 utl \
diff --git a/xmloff/Library_xo.mk b/xmloff/Library_xo.mk
index 1bf512c..553fcc1 100644
--- a/xmloff/Library_xo.mk
+++ b/xmloff/Library_xo.mk
@@ 

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

2014-06-14 Thread Zolnai Tamás
 sd/qa/unit/import-tests.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 634530620e6a51c5ea8f1596f6ab51b2a7e2ea9c
Author: Zolnai Tamás tamas.zol...@collabora.com
Date:   Sun Jun 15 06:05:14 2014 +0200

Fix --disable-gltf build

saveAndReload tests export, which is needed only
when gltf support is enabled.

Change-Id: I08152c12db77ad2fc623f2699784b968378686db

diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index b6a6c8c..04af625 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -713,7 +713,10 @@ void SdFiltersTest::testMediaEmbedding()
 {
 SvtMiscOptions().SetExperimentalMode(true);
 ::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/media_embedding.odp));
+
+#if HAVE_FEATURE_GLTF
 xDocShRef = saveAndReload( xDocShRef, ODP );
+#endif
 
 SdDrawDocument *pDoc = xDocShRef-GetDoc();
 CPPUNIT_ASSERT_MESSAGE( no document, pDoc != NULL );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-06-06 Thread Caolán McNamara
 sd/qa/unit/import-tests.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit e990e4d145f16c0c7e4e9e12c4882ddde63a3d5a
Author: Caolán McNamara caol...@redhat.com
Date:   Fri Jun 6 10:06:00 2014 +0100

c++03 vs c++11 enum namespacing

Change-Id: I91be0e7d2b013221b1d47a5cd1e4e75eb16c2b67

diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index ce0d9d1..0b032c1 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -794,12 +794,12 @@ void SdFiltersTest::testBnc870233_1()
 const SvxWeightItem *pWeight = dynamic_castconst SvxWeightItem 
*((*it).pAttr);
 if( pWeight )
 {
-CPPUNIT_ASSERT_EQUAL( FontWeight::WEIGHT_BOLD, 
pWeight-GetWeight());
+CPPUNIT_ASSERT_EQUAL( WEIGHT_BOLD, pWeight-GetWeight());
 }
 const SvxPostureItem *pPosture = dynamic_castconst SvxPostureItem 
*((*it).pAttr);
 if( pPosture )
 {
-CPPUNIT_ASSERT_EQUAL( FontItalic::ITALIC_NONE, 
pPosture-GetPosture());
+CPPUNIT_ASSERT_EQUAL( ITALIC_NONE, pPosture-GetPosture());
 }
 }
 }
@@ -821,12 +821,12 @@ void SdFiltersTest::testBnc870233_1()
 const SvxWeightItem *pWeight = dynamic_castconst SvxWeightItem 
*((*it).pAttr);
 if( pWeight )
 {
-CPPUNIT_ASSERT_EQUAL( FontWeight::WEIGHT_NORMAL, 
pWeight-GetWeight());
+CPPUNIT_ASSERT_EQUAL( WEIGHT_NORMAL, pWeight-GetWeight());
 }
 const SvxPostureItem *pPosture = dynamic_castconst SvxPostureItem 
*((*it).pAttr);
 if( pPosture )
 {
-CPPUNIT_ASSERT_EQUAL( FontItalic::ITALIC_NORMAL, 
pPosture-GetPosture());
+CPPUNIT_ASSERT_EQUAL( ITALIC_NORMAL, pPosture-GetPosture());
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-06-06 Thread Jan Holesovsky
 sd/qa/unit/HtmlExportTest.cxx   |2 +-
 sfx2/source/bastyp/frmhtmlw.cxx |   23 ---
 2 files changed, 9 insertions(+), 16 deletions(-)

New commits:
commit f7d51f43deda5e28df63f1b8e168e84838d0d0b4
Author: Jan Holesovsky ke...@collabora.com
Date:   Fri Jun 6 21:52:48 2014 +0200

html export: More standard time specification in meta/.

Change-Id: I1a62d12531029cc36fb8aeabecb9d92a8af837f7

diff --git a/sd/qa/unit/HtmlExportTest.cxx b/sd/qa/unit/HtmlExportTest.cxx
index 388dfef..6064b28 100644
--- a/sd/qa/unit/HtmlExportTest.cxx
+++ b/sd/qa/unit/HtmlExportTest.cxx
@@ -46,7 +46,7 @@ public:
 assertXPath(htmlDoc, /html/head/meta[1], content, text/html; 
charset=utf-8);
 assertXPath(htmlDoc, /html/head/meta[2], name, generator);
 assertXPath(htmlDoc, /html/head/meta[3], name, created);
-assertXPath(htmlDoc, /html/head/meta[3], content, 
20140409;170541987922038);
+assertXPath(htmlDoc, /html/head/meta[3], content, 
2014-04-09T17:05:41.987922038);
 }
 
 CPPUNIT_TEST_SUITE(SdHTMLFilterTest);
diff --git a/sfx2/source/bastyp/frmhtmlw.cxx b/sfx2/source/bastyp/frmhtmlw.cxx
index 93567e2..5d4f1ad 100644
--- a/sfx2/source/bastyp/frmhtmlw.cxx
+++ b/sfx2/source/bastyp/frmhtmlw.cxx
@@ -44,9 +44,7 @@
 
 #include rtl/bootstrap.hxx
 #include rtl/strbuf.hxx
-
-
-
+#include sax/tools/converter.hxx
 
 using namespace ::com::sun::star;
 
@@ -164,12 +162,10 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream rStrm, 
const OUString rBaseURL,
 
 // created
 ::util::DateTime uDT = i_xDocProps-getCreationDate();
-Date aD(uDT.Day, uDT.Month, uDT.Year);
-Time aT(uDT.Hours, uDT.Minutes, uDT.Seconds, uDT.NanoSeconds);
-OUString sOut = OUString::number(aD.GetDate());
-sOut += ;;
-sOut += OUString::number(aT.GetTime());
-OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_created, sOut, 
false,
+OUStringBuffer aBuffer;
+::sax::Converter::convertTimeOrDateTime(aBuffer, uDT, 0);
+
+OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_created, 
aBuffer.makeStringAndClear(), false,
  eDestEnc, pNonConvertableChars );
 
 // changedby
@@ -180,12 +176,9 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream rStrm, 
const OUString rBaseURL,
 
 // changed
 uDT = i_xDocProps-getModificationDate();
-Date aD2(uDT.Day, uDT.Month, uDT.Year);
-Time aT2(uDT.Hours, uDT.Minutes, uDT.Seconds, uDT.NanoSeconds);
-sOut = OUString::number(aD2.GetDate());
-sOut += ;;
-sOut += OUString::number(aT2.GetTime());
-OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_changed, sOut, 
false,
+::sax::Converter::convertTimeOrDateTime(aBuffer, uDT, 0);
+
+OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_changed, 
aBuffer.makeStringAndClear(), false,
  eDestEnc, pNonConvertableChars );
 
 // Subject
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-04-23 Thread Andras Timar
 sd/qa/unit/data/xml/shapes-test_page3.xml |  230 +++---
 1 file changed, 115 insertions(+), 115 deletions(-)

New commits:
commit 2ea006fb605b886f9c9426783e4edf0de46c9af8
Author: Andras Timar andras.ti...@collabora.com
Date:   Wed Apr 23 16:01:22 2014 +0200

fix sd layout unit test

Change-Id: Ica34592788005cc3c96987b1c6c9625dd6359c76

diff --git a/sd/qa/unit/data/xml/shapes-test_page3.xml 
b/sd/qa/unit/data/xml/shapes-test_page3.xml
index 7b45e58..f3812c7 100644
--- a/sd/qa/unit/data/xml/shapes-test_page3.xml
+++ b/sd/qa/unit/data/xml/shapes-test_page3.xml
@@ -53,8 +53,8 @@
   LineStart/
   LineEnd/
   Transformation
-   Line1 column1=7591.681979 column2=0.00 column3=8629.325587/
-   Line2 column1=0.00 column2=7398.48 column3=85.734286/
+   Line1 column1=0.00 column2=7591.681979 column3=8629.325587/
+   Line2 column1=-7398.48 column2=0.00 column3=7484.216507/
Line3 column1=0.00 column2=0.00 column3=1.00/
   /Transformation
   pointSequence
@@ -125,71 +125,71 @@
point positionX=14748 positionY=7070 polygonFlags=NORMAL/
   /pointSequence
   pointSequence
-   point positionX=3 positionY=7201 polygonFlags=NORMAL/
-   point positionX=-42 positionY=6435 polygonFlags=CONTROL/
-   point positionX=496 positionY=5774 polygonFlags=CONTROL/
-   point positionX=480 positionY=4988 polygonFlags=NORMAL/
-   point positionX=465 positionY=4275 polygonFlags=CONTROL/
-   point positionX=623 positionY=3566 polygonFlags=CONTROL/
-   point positionX=740 positionY=2863 polygonFlags=NORMAL/
-   point positionX=834 positionY=2295 polygonFlags=CONTROL/
-   point positionX=1132 positionY=1777 polygonFlags=CONTROL/
-   point positionX=1261 positionY=1215 polygonFlags=NORMAL/
-   point positionX=1417 positionY=533 polygonFlags=CONTROL/
-   point positionX=1959 positionY=-15 polygonFlags=CONTROL/
-   point positionX=2562 positionY=0 polygonFlags=NORMAL/
-   point positionX=3139 positionY=14 polygonFlags=CONTROL/
-   point positionX=3463 positionY=724 polygonFlags=CONTROL/
-   point positionX=3646 positionY=1258 polygonFlags=NORMAL/
-   point positionX=3800 positionY=1709 polygonFlags=CONTROL/
-   point positionX=3768 positionY=2184 polygonFlags=CONTROL/
-   point positionX=3733 positionY=2646 polygonFlags=NORMAL/
-   point positionX=3696 positionY=3130 polygonFlags=CONTROL/
-   point positionX=3893 positionY=3547 polygonFlags=CONTROL/
-   point positionX=3820 positionY=4034 polygonFlags=NORMAL/
-   point positionX=3742 positionY=4549 polygonFlags=CONTROL/
-   point positionX=3373 positionY=5214 polygonFlags=CONTROL/
-   point positionX=3733 positionY=5596 polygonFlags=NORMAL/
-   point positionX=4208 positionY=6100 polygonFlags=CONTROL/
-   point positionX=5105 positionY=5745 polygonFlags=CONTROL/
-   point positionX=5772 positionY=5596 polygonFlags=NORMAL/
-   point positionX=6397 positionY=5456 polygonFlags=CONTROL/
-   point positionX=7177 positionY=5244 polygonFlags=CONTROL/
-   point positionX=7420 positionY=4598 polygonFlags=NORMAL/
-   point positionX=7647 positionY=3993 polygonFlags=CONTROL/
-   point positionX=7620 positionY=3316 polygonFlags=CONTROL/
-   point positionX=7507 positionY=2690 polygonFlags=NORMAL/
-   point positionX=7420 positionY=2208 polygonFlags=CONTROL/
-   point positionX=7963 positionY=1377 polygonFlags=CONTROL/
-   point positionX=7029 positionY=1258 polygonFlags=NORMAL/
-   point positionX=6202 positionY=1152 polygonFlags=CONTROL/
-   point positionX=6375 positionY=1932 polygonFlags=CONTROL/
-   point positionX=6205 positionY=2343 polygonFlags=NORMAL/
-   point positionX=5974 positionY=2900 polygonFlags=CONTROL/
-   point positionX=5763 positionY=3488 polygonFlags=CONTROL/
-   point positionX=5338 positionY=3904 polygonFlags=NORMAL/
-   point positionX=4958 positionY=4276 polygonFlags=CONTROL/
-   point positionX=4343 positionY=4299 polygonFlags=CONTROL/
-   point positionX=3820 positionY=4294 polygonFlags=NORMAL/
-   point positionX=3343 positionY=4289 polygonFlags=CONTROL/
-   point positionX=2893 positionY=4119 polygonFlags=CONTROL/
-   point positionX=2432 positionY=3947 polygonFlags=NORMAL/
-   point positionX=1983 positionY=3779 polygonFlags=CONTROL/
-   point positionX=1398 positionY=4032 polygonFlags=CONTROL/
-   point positionX=1217 positionY=4641 polygonFlags=NORMAL/
-   point positionX=1066 positionY=5149 polygonFlags=CONTROL/
-   point positionX=1010 positionY=5593 polygonFlags=CONTROL/
-   point positionX=1044 positionY=6073 polygonFlags=NORMAL/
-   point positionX=1095 positionY=6804 polygonFlags=CONTROL/
-   point positionX=1981 positionY=6987 polygonFlags=CONTROL/
-   point positionX=2562 positionY=7157 polygonFlags=NORMAL/
-   point positionX=3219 positionY=7349 polygonFlags=CONTROL/
-   point positionX=3889 positionY=7447 polygonFlags=CONTROL/
-   point positionX=4601 positionY=7374 polygonFlags=NORMAL/
-   point positionX=5117 positionY=7321 polygonFlags=CONTROL/
-   point positionX=5728 positionY=7409 

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

2014-04-15 Thread Stephan Bergmann
 sd/qa/unit/HtmlExportTest.cxx |   18 --
 1 file changed, 18 deletions(-)

New commits:
commit 3e29b0c4567a0a60fbb7e0f980810f1c3790f58d
Author: Stephan Bergmann sberg...@redhat.com
Date:   Tue Apr 15 09:47:03 2014 +0200

Remove unused code

Change-Id: Ie16056c7e6716831a0ba61c1f22ded978fb5f3c2

diff --git a/sd/qa/unit/HtmlExportTest.cxx b/sd/qa/unit/HtmlExportTest.cxx
index 8779f9f..a8aab8c 100644
--- a/sd/qa/unit/HtmlExportTest.cxx
+++ b/sd/qa/unit/HtmlExportTest.cxx
@@ -45,24 +45,6 @@ class SdHTMLFilterTest : public SdModelTestBase
 return pXmlXpathObj-nodesetval;
 }
 
-OUString getXPath(xmlDocPtr pXmlDoc, const OString rXPath, const OString 
rAttribute)
-{
-xmlNodeSetPtr pXmlNodes = getXPathNode(pXmlDoc, rXPath);
-CPPUNIT_ASSERT_EQUAL_MESSAGE(OString(XPath ' + rXPath + ' number of 
nodes is incorrect).getStr(),
- 1, xmlXPathNodeSetGetLength(pXmlNodes));
-if (rAttribute.isEmpty())
-return OUString();
-xmlNodePtr pXmlNode = pXmlNodes-nodeTab[0];
-return OUString::createFromAscii((const char*)xmlGetProp(pXmlNode, 
BAD_CAST(rAttribute.getStr(;
-}
-
-void assertXPath(xmlDocPtr pXmlDoc, const OString rXPath, const OString 
rAttribute = OString(), const OUString rExpectedValue = OUString())
-{
-OUString aValue = getXPath(pXmlDoc, rXPath, rAttribute);
-CPPUNIT_ASSERT_EQUAL_MESSAGE(OString(Attribute ' + rAttribute + ' 
of ' + rXPath + ' incorrect value.).getStr(),
- rExpectedValue, aValue);
-}
-
 void assertXPath(xmlDocPtr pXmlDoc, const OString rXPath, int 
nNumberOfNodes)
 {
 xmlNodeSetPtr pXmlNodes = getXPathNode(pXmlDoc, rXPath);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-03-31 Thread Markus Mohrhard
 sd/qa/unit/import-tests.cxx |   37 +
 1 file changed, 37 insertions(+)

New commits:
commit 2aaf9a5c9a06b770598c84b427c5099bf127d856
Author: Markus Mohrhard markus.mohrh...@collabora.co.uk
Date:   Tue Apr 1 01:55:02 2014 +0200

prevent leaked tmp files from sd import test

Change-Id: I6365924420f636c8db556d0bce02b2131e540f2c

diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 462e2ed..d532b6c 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -179,6 +179,7 @@ void SdFiltersTest::testSmoketest()
 }
 
 CPPUNIT_ASSERT_MESSAGE( changed, !pDoc-IsChanged() );
+
 xDocShRef-DoClose();
 }
 
@@ -218,6 +219,8 @@ void SdFiltersTest::testN759180()
 }
 }
 }
+
+xDocShRef-DoClose();
 }
 
 void SdFiltersTest::testN821567()
@@ -245,6 +248,8 @@ void SdFiltersTest::testN821567()
 aAny = bgImage;
 }
 CPPUNIT_ASSERT_MESSAGE(Slide Background is not exported properly, 
!bgImage.isEmpty());
+
+xDocShRef-DoClose();
 }
 
 void SdFiltersTest::testN862510_1()
@@ -270,6 +275,8 @@ void SdFiltersTest::testN862510_1()
 CPPUNIT_ASSERT_MESSAGE( Baseline attribute not handled properly, 
!( pFontEscapement  pFontEscapement-GetProp() != 100 ) );
 }
 }
+
+xDocShRef-DoClose();
 }
 
 void SdFiltersTest::testN862510_2()
@@ -289,6 +296,8 @@ void SdFiltersTest::testN862510_2()
 CPPUNIT_ASSERT( pObj );
 CPPUNIT_ASSERT_MESSAGE( Wrong Text Rotation!, 
pObj-GetExtraTextRotation( true ) == 90 );
 }
+
+xDocShRef-DoClose();
 }
 
 void SdFiltersTest::testN862510_3()
@@ -308,6 +317,8 @@ void SdFiltersTest::testN862510_3()
 CPPUNIT_ASSERT( pObj );
 CPPUNIT_ASSERT_MESSAGE( Left Spacing is wrong! check attribute 
anchorCtr, pObj-GetTextLeftDistance()  30);
 }
+
+xDocShRef-DoClose();
 }
 
 void SdFiltersTest::testN862510_4()
@@ -333,6 +344,8 @@ void SdFiltersTest::testN862510_4()
 CPPUNIT_ASSERT_MESSAGE( gradfill for text color not handled!, !( 
pC  pC-GetValue().GetColor() == 0 ) );
 }
 }
+
+xDocShRef-DoClose();
 }
 
 void SdFiltersTest::testN828390()
@@ -371,6 +384,8 @@ void SdFiltersTest::testN828390()
 }
 }
 CPPUNIT_ASSERT_MESSAGE(Subscript not exported properly, bPassed);
+
+xDocShRef-DoClose();
 }
 
 void SdFiltersTest::testN828390_2()
@@ -391,6 +406,8 @@ void SdFiltersTest::testN828390_2()
 const EditTextObject aEdit = 
pTxtObj-GetOutlinerParaObject()-GetTextObject();
 CPPUNIT_ASSERT(aEdit.GetText(0) == OUString(Linux  ));
 CPPUNIT_ASSERT(aEdit.GetText(1) == OUString(Standard Platform));
+
+xDocShRef-DoClose();
 }
 
 void SdFiltersTest::testN828390_3()
@@ -425,6 +442,8 @@ void SdFiltersTest::testN828390_3()
 }
 }
 CPPUNIT_ASSERT_MESSAGE(CharEscapment not imported properly, bPassed);
+
+xDocShRef-DoClose();
 }
 
 void SdFiltersTest::testN828390_4()
@@ -465,6 +484,8 @@ void SdFiltersTest::testN828390_4()
 }
 }
 CPPUNIT_ASSERT(bPassed);
+
+xDocShRef-DoClose();
 }
 
 void SdFiltersTest::testN828390_5()
@@ -489,6 +510,8 @@ void SdFiltersTest::testN828390_5()
 CPPUNIT_ASSERT( pNumFmt );
 CPPUNIT_ASSERT_EQUAL_MESSAGE( Bullet's relative size is wrong!, 
pNumFmt-GetNumRule()-GetLevel(1).GetBulletRelSize(), sal_uInt16(75) ); // != 
25
 }
+
+xDocShRef-DoClose();
 }
 
 void SdFiltersTest::testN778859()
@@ -508,6 +531,8 @@ void SdFiltersTest::testN778859()
 CPPUNIT_ASSERT_MESSAGE( no text object, pTxtObj != NULL);
 CPPUNIT_ASSERT(!pTxtObj-IsAutoFit());
 }
+
+xDocShRef-DoClose();
 }
 
 void SdFiltersTest::testFdo68594()
@@ -527,6 +552,8 @@ void SdFiltersTest::testFdo68594()
 CPPUNIT_ASSERT_MESSAGE( no color item, pC != NULL);
 // Color should be black
 CPPUNIT_ASSERT_MESSAGE( Placeholder color mismatch, 
pC-GetValue().GetColor() == 0);
+
+xDocShRef-DoClose();
 }
 
 void SdFiltersTest::testFdo72998()
@@ -551,6 +578,8 @@ void SdFiltersTest::testFdo72998()
 CPPUNIT_ASSERT_MESSAGE( Width should be zero - for forcing scale to 
1, !aViewBox.Width );
 CPPUNIT_ASSERT_MESSAGE( Height should be zero - for forcing scale to 
1, !aViewBox.Height );
 }
+
+xDocShRef-DoClose();
 }
 
 void SdFiltersTest::testFdo64512()
@@ -593,6 +622,8 @@ void SdFiltersTest::testFdo64512()
 xNode-getTarget(), uno::UNO_QUERY_THROW );
 CPPUNIT_ASSERT_MESSAGE( inner node not referencing svg shape,
 xTargetShape != xSvgShape );
+
+xDocShRef-DoClose();
 }
 
 // Unit test for importing charts
@@ -638,6 +669,8 @@ void SdFiltersTest::testFdo71075()
 uno::Sequence double  aValues( xNumSeq-getNumericalData());
 for(sal_Int32 i=0;ixValueSeq-getData().getLength();i++)
 CPPUNIT_ASSERT_MESSAGE( Invalid Series count, 
aValues.getConstArray()[i] == values[i]);
+
+xDocShRef-DoClose();
 }
 
 void SdFiltersTest::testStrictOOXML()
@@ 

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

2014-03-17 Thread Muthu Subramanian
 sd/qa/unit/data/pptx/n862510_1.pptx |binary
 sd/qa/unit/import-tests.cxx |   27 +++
 2 files changed, 27 insertions(+)

New commits:
commit 2796aa203c563d45b12dd395a963724a1c0e42ed
Author: Muthu Subramanian sumu...@collabora.com
Date:   Mon Mar 17 14:06:34 2014 +0530

n#862510: Adding unit test case for baseline=0

Change-Id: Ia8281ddc31b653ecf47c6bb5030db74de75b2e8d

diff --git a/sd/qa/unit/data/pptx/n862510_1.pptx 
b/sd/qa/unit/data/pptx/n862510_1.pptx
new file mode 100644
index 000..2a16a4b
Binary files /dev/null and b/sd/qa/unit/data/pptx/n862510_1.pptx differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index eb3b56d..8ea16b5 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -61,6 +61,7 @@ public:
 void testFdo68594();
 void testFdo72998();
 void testStrictOOXML();
+void testN862510_1();
 
 CPPUNIT_TEST_SUITE(SdFiltersTest);
 CPPUNIT_TEST(testDocumentLayout);
@@ -78,6 +79,7 @@ public:
 CPPUNIT_TEST(testFdo68594);
 CPPUNIT_TEST(testFdo72998);
 CPPUNIT_TEST(testStrictOOXML);
+CPPUNIT_TEST(testN862510_1);
 
 CPPUNIT_TEST_SUITE_END();
 };
@@ -235,6 +237,31 @@ void SdFiltersTest::testN821567()
 CPPUNIT_ASSERT_MESSAGE(Slide Background is not exported properly, 
!bgImage.isEmpty());
 }
 
+void SdFiltersTest::testN862510_1()
+{
+::sd::DrawDocShellRef xDocShRef = loadURL( 
getURLFromSrc(/sd/qa/unit/data/pptx/n862510_1.pptx) );
+CPPUNIT_ASSERT_MESSAGE( failed to load, xDocShRef.Is() );
+CPPUNIT_ASSERT_MESSAGE( in destruction, !xDocShRef-IsInDestruction() );
+
+SdDrawDocument *pDoc = xDocShRef-GetDoc();
+CPPUNIT_ASSERT_MESSAGE( no document, pDoc != NULL );
+const SdrPage *pPage = pDoc-GetPage(1);
+CPPUNIT_ASSERT_MESSAGE( no page, pPage != NULL );
+{
+std::vectorEECharAttrib rLst;
+SdrObject *pObj = pPage-GetObj( 0 );
+SdrTextObj *pTxtObj = dynamic_castSdrTextObj *( pObj );
+CPPUNIT_ASSERT( pTxtObj );
+const EditTextObject aEdit = 
pTxtObj-GetOutlinerParaObject()-GetTextObject();
+aEdit.GetCharAttribs( 0, rLst );
+for( std::vectorEECharAttrib::reverse_iterator it = rLst.rbegin(); 
it!=rLst.rend(); ++it)
+{
+const SvxEscapementItem *pFontEscapement = dynamic_castconst 
SvxEscapementItem *( (*it).pAttr );
+CPPUNIT_ASSERT_MESSAGE( Baseline attribute not handled properly, 
!( pFontEscapement  pFontEscapement-GetProp() != 100 ) );
+}
+}
+}
+
 void SdFiltersTest::testN828390()
 {
 bool bPassed = false;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-12-30 Thread Muthu Subramanian
 sd/qa/unit/data/pptx/cshapes.pptx |binary
 sd/qa/unit/import-tests.cxx   |   26 ++
 2 files changed, 26 insertions(+)

New commits:
commit ee6eadfc617a1ce3bc2b489523ac713b99482404
Author: Muthu Subramanian sumu...@collabora.com
Date:   Mon Dec 30 18:05:48 2013 +0530

fdo#72998: Add unit test case.

diff --git a/sd/qa/unit/data/pptx/cshapes.pptx 
b/sd/qa/unit/data/pptx/cshapes.pptx
new file mode 100644
index 000..b546206
Binary files /dev/null and b/sd/qa/unit/data/pptx/cshapes.pptx differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index cd6f9b0..015b6e1 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -22,6 +22,7 @@
 #include rsc/rscsfx.hxx
 
 #include svx/svdotext.hxx
+#include svx/svdoashp.hxx
 #include animations/animationnodehelper.hxx
 
 #include com/sun/star/drawing/XDrawPage.hpp
@@ -57,6 +58,7 @@ public:
 void testN828390_4();
 void testN828390_5();
 void testFdo68594();
+void testFdo72998();
 
 CPPUNIT_TEST_SUITE(SdFiltersTest);
 CPPUNIT_TEST(testDocumentLayout);
@@ -71,6 +73,7 @@ public:
 CPPUNIT_TEST(testN828390_4);
 CPPUNIT_TEST(testN828390_5);
 CPPUNIT_TEST(testFdo68594);
+CPPUNIT_TEST(testFdo72998);
 
 CPPUNIT_TEST_SUITE_END();
 };
@@ -389,6 +392,29 @@ void SdFiltersTest::testFdo68594()
 CPPUNIT_ASSERT_MESSAGE( Placeholder color mismatch, 
pC-GetValue().GetColor() == 0);
 }
 
+void SdFiltersTest::testFdo72998()
+{
+::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/pptx/cshapes.pptx));
+CPPUNIT_ASSERT_MESSAGE( failed to load, xDocShRef.Is() );
+CPPUNIT_ASSERT_MESSAGE( not in destruction, 
!xDocShRef-IsInDestruction() );
+
+SdDrawDocument *pDoc = xDocShRef-GetDoc();
+CPPUNIT_ASSERT_MESSAGE( no document, pDoc != NULL );
+const SdrPage *pPage = pDoc-GetPage(1);
+CPPUNIT_ASSERT_MESSAGE( no page, pPage != NULL );
+{
+SdrObjCustomShape *pObj = dynamic_castSdrObjCustomShape 
*(pPage-GetObj(2));
+const SdrCustomShapeGeometryItem rGeometryItem = (const 
SdrCustomShapeGeometryItem)pObj-GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY );
+CPPUNIT_ASSERT_MESSAGE( not a custom shape, pObj );
+const ::com::sun::star::uno::Any* pViewBox = 
((SdrCustomShapeGeometryItem)rGeometryItem).GetPropertyValueByName( OUString( 
ViewBox ) );
+CPPUNIT_ASSERT_MESSAGE( Missing ViewBox, pViewBox );
+com::sun::star::awt::Rectangle aViewBox;
+CPPUNIT_ASSERT( (*pViewBox = aViewBox ) );
+CPPUNIT_ASSERT_MESSAGE( Width should be zero - for forcing scale to 
1, !aViewBox.Width );
+CPPUNIT_ASSERT_MESSAGE( Height should be zero - for forcing scale to 
1, !aViewBox.Height );
+}
+}
+
 void SdFiltersTest::testFdo64512()
 {
 ::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/fdo64512.odp));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-12-19 Thread Muthu Subramanian
 sd/qa/unit/data/n828390_5.odp |binary
 sd/qa/unit/import-tests.cxx   |   26 ++
 2 files changed, 26 insertions(+)

New commits:
commit 3b9b2e2d98ee3eb10dfdcbc27c5ead40f0335cb7
Author: Muthu Subramanian sumu...@collabora.com
Date:   Thu Dec 19 18:14:47 2013 +0530

n#828390: Unit test for bullet's relative size.

diff --git a/sd/qa/unit/data/n828390_5.odp b/sd/qa/unit/data/n828390_5.odp
new file mode 100644
index 000..29cb8af
Binary files /dev/null and b/sd/qa/unit/data/n828390_5.odp differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 31b9e7b..cd6f9b0 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -18,6 +18,7 @@
 #include editeng/colritem.hxx
 #include editeng/fontitem.hxx
 #include editeng/wghtitem.hxx
+#include editeng/numitem.hxx
 #include rsc/rscsfx.hxx
 
 #include svx/svdotext.hxx
@@ -54,6 +55,7 @@ public:
 void testN828390_2();
 void testN828390_3();
 void testN828390_4();
+void testN828390_5();
 void testFdo68594();
 
 CPPUNIT_TEST_SUITE(SdFiltersTest);
@@ -67,6 +69,7 @@ public:
 CPPUNIT_TEST(testN828390_2);
 CPPUNIT_TEST(testN828390_3);
 CPPUNIT_TEST(testN828390_4);
+CPPUNIT_TEST(testN828390_5);
 CPPUNIT_TEST(testFdo68594);
 
 CPPUNIT_TEST_SUITE_END();
@@ -326,6 +329,29 @@ void SdFiltersTest::testN828390_4()
 CPPUNIT_ASSERT(bPassed);
 }
 
+void SdFiltersTest::testN828390_5()
+{
+::sd::DrawDocShellRef xDocShRef = loadURL( 
getURLFromSrc(/sd/qa/unit/data/n828390_5.odp) );
+CPPUNIT_ASSERT_MESSAGE( failed to load, xDocShRef.Is() );
+
+xDocShRef = saveAndReload( xDocShRef, PPTX );
+CPPUNIT_ASSERT_MESSAGE( failed to load, xDocShRef.Is() );
+CPPUNIT_ASSERT_MESSAGE( not in destruction, 
!xDocShRef-IsInDestruction() );
+
+SdDrawDocument *pDoc = xDocShRef-GetDoc();
+CPPUNIT_ASSERT_MESSAGE( no document, pDoc != NULL );
+const SdrPage *pPage = pDoc-GetPage(1);
+CPPUNIT_ASSERT_MESSAGE( no page, pPage != NULL );
+{
+SdrObject *pObj = pPage-GetObj(0);
+SdrTextObj *pTxtObj = dynamic_castSdrTextObj *( pObj );
+const EditTextObject aEdit = 
pTxtObj-GetOutlinerParaObject()-GetTextObject();
+const SvxNumBulletItem *pNumFmt = dynamic_castconst SvxNumBulletItem 
*(aEdit.GetPool()-GetItem2(EE_PARA_NUMBULLET, 5));
+CPPUNIT_ASSERT( pNumFmt );
+CPPUNIT_ASSERT_MESSAGE( Bullet's relative size is wrong!, 
pNumFmt-GetNumRule()-GetLevel(1).GetBulletRelSize() == 75 ); // != 25
+}
+}
+
 void SdFiltersTest::testN778859()
 {
 ::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/pptx/n778859.pptx));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-12-12 Thread Muthu Subramanian
 sd/qa/unit/data/pptx/n828390_3.pptx |binary
 sd/qa/unit/import-tests.cxx |   35 +++
 2 files changed, 35 insertions(+)

New commits:
commit eea8c671e42b91c8486e3796869d140d70b1a7eb
Author: Muthu Subramanian sumu...@collabora.com
Date:   Thu Dec 12 18:54:00 2013 +0530

n#828390: Unit test for resetting char escapement.

diff --git a/sd/qa/unit/data/pptx/n828390_3.pptx 
b/sd/qa/unit/data/pptx/n828390_3.pptx
new file mode 100644
index 000..ad95758
Binary files /dev/null and b/sd/qa/unit/data/pptx/n828390_3.pptx differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index f912d11..630891c 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -50,6 +50,7 @@ public:
 void testFdo71075();
 void testN828390();
 void testN828390_2();
+void testN828390_3();
 void testFdo68594();
 
 CPPUNIT_TEST_SUITE(SdFiltersTest);
@@ -61,6 +62,7 @@ public:
 CPPUNIT_TEST(testFdo71075);
 CPPUNIT_TEST(testN828390);
 CPPUNIT_TEST(testN828390_2);
+CPPUNIT_TEST(testN828390_3);
 CPPUNIT_TEST(testFdo68594);
 
 CPPUNIT_TEST_SUITE_END();
@@ -248,6 +250,39 @@ void SdFiltersTest::testN828390_2()
 CPPUNIT_ASSERT(aEdit.GetText(1) == OUString(Standard Platform));
 }
 
+void SdFiltersTest::testN828390_3()
+{
+bool bPassed = true;
+::sd::DrawDocShellRef xDocShRef = loadURL( 
getURLFromSrc(/sd/qa/unit/data/pptx/n828390_3.pptx) );
+CPPUNIT_ASSERT_MESSAGE( failed to load, xDocShRef.Is() );
+CPPUNIT_ASSERT_MESSAGE( failed to load, xDocShRef.Is() );
+CPPUNIT_ASSERT_MESSAGE( not in destruction, 
!xDocShRef-IsInDestruction() );
+
+SdDrawDocument *pDoc = xDocShRef-GetDoc();
+CPPUNIT_ASSERT_MESSAGE( no document, pDoc != NULL );
+const SdrPage *pPage = pDoc-GetPage(1);
+CPPUNIT_ASSERT_MESSAGE( no page, pPage != NULL );
+
+SdrObject *pObj = pPage-GetObj(0);
+SdrTextObj *pTxtObj = dynamic_castSdrTextObj *( pObj );
+const EditTextObject aEdit = 
pTxtObj-GetOutlinerParaObject()-GetTextObject();
+std::vectorEECharAttrib rLst;
+aEdit.GetCharAttribs(1, rLst);
+for( std::vectorEECharAttrib::reverse_iterator it = rLst.rbegin(); 
it!=rLst.rend(); ++it)
+{
+const SvxEscapementItem *pFontEscapement = dynamic_castconst 
SvxEscapementItem *((*it).pAttr);
+if(pFontEscapement)
+{
+if( pFontEscapement-GetEsc() != 0 )
+{
+bPassed = false;
+break;
+}
+}
+}
+CPPUNIT_ASSERT_MESSAGE(CharEscapment not imported properly, bPassed);
+}
+
 void SdFiltersTest::testN778859()
 {
 ::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/pptx/n778859.pptx));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-12-11 Thread Muthu Subramanian
 sd/qa/unit/data/pptx/n828390_2.pptx |binary
 sd/qa/unit/import-tests.cxx |   21 +
 2 files changed, 21 insertions(+)

New commits:
commit 0b578e51cd1eabbbe375e25927df86fac7552641
Author: Muthu Subramanian sumu...@collabora.com
Date:   Thu Dec 12 13:19:36 2013 +0530

n#828390: Add unit test for new line import.

diff --git a/sd/qa/unit/data/pptx/n828390_2.pptx 
b/sd/qa/unit/data/pptx/n828390_2.pptx
new file mode 100644
index 000..e30948f
Binary files /dev/null and b/sd/qa/unit/data/pptx/n828390_2.pptx differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 9b00403..f912d11 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -49,6 +49,7 @@ public:
 void testFdo64512();
 void testFdo71075();
 void testN828390();
+void testN828390_2();
 void testFdo68594();
 
 CPPUNIT_TEST_SUITE(SdFiltersTest);
@@ -59,6 +60,7 @@ public:
 CPPUNIT_TEST(testFdo64512);
 CPPUNIT_TEST(testFdo71075);
 CPPUNIT_TEST(testN828390);
+CPPUNIT_TEST(testN828390_2);
 CPPUNIT_TEST(testFdo68594);
 
 CPPUNIT_TEST_SUITE_END();
@@ -227,6 +229,25 @@ void SdFiltersTest::testN828390()
 CPPUNIT_ASSERT_MESSAGE(Subscript not exported properly, bPassed);
 }
 
+void SdFiltersTest::testN828390_2()
+{
+::sd::DrawDocShellRef xDocShRef = loadURL( 
getURLFromSrc(/sd/qa/unit/data/pptx/n828390_2.pptx) );
+CPPUNIT_ASSERT_MESSAGE( failed to load, xDocShRef.Is() );
+CPPUNIT_ASSERT_MESSAGE( failed to load, xDocShRef.Is() );
+CPPUNIT_ASSERT_MESSAGE( not in destruction, 
!xDocShRef-IsInDestruction() );
+
+SdDrawDocument *pDoc = xDocShRef-GetDoc();
+CPPUNIT_ASSERT_MESSAGE( no document, pDoc != NULL );
+const SdrPage *pPage = pDoc-GetPage(1);
+CPPUNIT_ASSERT_MESSAGE( no page, pPage != NULL );
+
+SdrObject *pObj = pPage-GetObj(0);
+SdrTextObj *pTxtObj = dynamic_castSdrTextObj *( pObj );
+const EditTextObject aEdit = 
pTxtObj-GetOutlinerParaObject()-GetTextObject();
+CPPUNIT_ASSERT(aEdit.GetText(0) == OUString(Linux  ));
+CPPUNIT_ASSERT(aEdit.GetText(1) == OUString(Standard Platform));
+}
+
 void SdFiltersTest::testN778859()
 {
 ::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/pptx/n778859.pptx));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-12-10 Thread Muthu Subramanian
 sd/qa/unit/data/xml/n819614_0.xml |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a850e62cd26a58a6ee9f3a2c8faa75ab10e96f8f
Author: Muthu Subramanian sumu...@collabora.com
Date:   Tue Dec 10 21:57:11 2013 +0530

Fix unit test case.

This would test for white spaces in text import.

diff --git a/sd/qa/unit/data/xml/n819614_0.xml 
b/sd/qa/unit/data/xml/n819614_0.xml
index 713ad74..6a834be 100644
--- a/sd/qa/unit/data/xml/n819614_0.xml
+++ b/sd/qa/unit/data/xml/n819614_0.xml
@@ -3418,7 +3418,7 @@
  /PropertyValue
 /CustomShapeGeometry
/XShape
-   XShape positionX=182 positionY=4529 sizeX=2743 sizeY=1244 
type=com.sun.star.drawing.CustomShape text=A fontHeight=18.00 
fontColor= textAutoGrowHeight=false textAutoGrowWidth=false 
textContourFrame=false textFitToSize=NONE textHorizontalAdjust=BLOCK 
textVerticalAdjust=CENTER textLeftDistance=12 textRightDistance=12 
textUpperDistance=12 textLowerDistance=12 textMaximumFrameHeight=0 
textMaximumFrameWidth=0 textMinimumFrameHeight=0 textMinimumFrameWidth=0 
textAnimationAmount=0 textAnimationCount=0 textAnimationDelay=0 
textAnimationDirection=LEFT textAnimationKind=NONE 
textAnimationStartInside=false textAnimationStopInside=false 
textWritingMode=LR_TB fillStyle=GRADIENT fillColor=729fcf 
fillTransparence=0 fillTransparenceGradientName=
+   XShape positionX=182 positionY=4529 sizeX=2743 sizeY=1244 
type=com.sun.star.drawing.CustomShape text=A  fontHeight=18.00 
fontColor= textAutoGrowHeight=false textAutoGrowWidth=false 
textContourFrame=false textFitToSize=NONE textHorizontalAdjust=BLOCK 
textVerticalAdjust=CENTER textLeftDistance=12 textRightDistance=12 
textUpperDistance=12 textLowerDistance=12 textMaximumFrameHeight=0 
textMaximumFrameWidth=0 textMinimumFrameHeight=0 textMinimumFrameWidth=0 
textAnimationAmount=0 textAnimationCount=0 textAnimationDelay=0 
textAnimationDirection=LEFT textAnimationKind=NONE 
textAnimationStartInside=false textAnimationStopInside=false 
textWritingMode=LR_TB fillStyle=GRADIENT fillColor=729fcf 
fillTransparence=0 fillTransparenceGradientName=
 FillTransparenceGradient style=LINEAR startColor=00 
endColor=ff angle=0 border=0 xOffset=50 yOffset=50 
startIntensity=100 endIntensity=100 stepCount=0/
 FillGradient style=AXIAL startColor=ff endColor=ff 
angle=1800 border=0 xOffset=0 yOffset=0 startIntensity=100 
endIntensity=100 stepCount=0/
 FillHatch style=SINGLE color=3465a4 distance=20 angle=0/
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-12-08 Thread Korrawit Pruegsanusak
 sd/qa/unit/data/fdo71434.pptx  |binary
 sd/qa/unit/data/xml/fdo71434_0.xml |   11 +++
 sd/qa/unit/import-tests.cxx|1 +
 3 files changed, 12 insertions(+)

New commits:
commit 6fd352dc3ad32078188537aa8849758735391f46
Author: Korrawit Pruegsanusak detective.conan.1...@gmail.com
Date:   Sun Dec 8 14:28:37 2013 +0700

unittest for fdo#71434

Change-Id: I4ef376e048aa0ba37e5c1bc7664e9e8cd3e283b6
Reviewed-on: https://gerrit.libreoffice.org/6985
Reviewed-by: Markus Mohrhard markus.mohrh...@googlemail.com
Tested-by: Markus Mohrhard markus.mohrh...@googlemail.com

diff --git a/sd/qa/unit/data/fdo71434.pptx b/sd/qa/unit/data/fdo71434.pptx
new file mode 100755
index 000..384f1f3
Binary files /dev/null and b/sd/qa/unit/data/fdo71434.pptx differ
diff --git a/sd/qa/unit/data/xml/fdo71434_0.xml 
b/sd/qa/unit/data/xml/fdo71434_0.xml
new file mode 100644
index 000..1605ba5
--- /dev/null
+++ b/sd/qa/unit/data/xml/fdo71434_0.xml
@@ -0,0 +1,11 @@
+?xml version=1.0?
+XShapes
+ XShape positionX=2823 positionY=-75 sizeX=19753 sizeY=19045 
type=com.sun.star.drawing.GraphicObjectShape name=Picture 5 
fontHeight=18.00 fontColor= textAutoGrowHeight=false 
textAutoGrowWidth=false textContourFrame=false textFitToSize=NONE 
textHorizontalAdjust=BLOCK textVerticalAdjust=TOP textLeftDistance=250 
textRightDistance=250 textUpperDistance=125 textLowerDistance=125 
textMaximumFrameHeight=0 textMaximumFrameWidth=0 textMinimumFrameHeight=0 
textMinimumFrameWidth=0 textAnimationAmount=0 textAnimationCount=0 
textAnimationDelay=0 textAnimationDirection=LEFT textAnimationKind=NONE 
textAnimationStartInside=false textAnimationStopInside=false 
textWritingMode=LR_TB shadow=false shadowColor=808080 
shadowTransparence=0 shadowXDistance=200 shadowYDistance=200 zOrder=0 
layerID=0 layerName=layout visible=true printable=true 
moveProtect=false sizeProtect=false
+  Transformation
+   Line1 column1=19754.00 column2=0.00 column3=2823.00/
+   Line2 column1=0.00 column2=19046.00 column3=-75.00/
+   Line3 column1=0.00 column2=0.00 column3=1.00/
+  /Transformation
+  InteropGrabBag/
+ /XShape
+/XShapes
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 63b8056..9b00403 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -106,6 +106,7 @@ void SdFiltersTest::testDocumentLayout()
 { n820786.pptx, xml/n820786_, -1 },
 { n762695.pptx, xml/n762695_, -1 },
 { n593612.pptx, xml/n593612_, -1 },
+{ fdo71434.pptx, xml/fdo71434_, -1 },
 // { pptx/n828390.pptx, pptx/xml/n828390_, PPTX }, // Example
 };
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-11-25 Thread Muthu Subramanian
 sd/qa/unit/data/ppt/fdo68594.ppt |binary
 sd/qa/unit/import-tests.cxx  |   23 +++
 2 files changed, 23 insertions(+)

New commits:
commit 32f700a683b7faa17c58e6d1aad85915ebd40a1a
Author: Muthu Subramanian sumu...@collabora.com
Date:   Mon Nov 25 19:39:20 2013 +0530

fdo#68594: Adding unit test.

diff --git a/sd/qa/unit/data/ppt/fdo68594.ppt b/sd/qa/unit/data/ppt/fdo68594.ppt
new file mode 100644
index 000..83a95cd
Binary files /dev/null and b/sd/qa/unit/data/ppt/fdo68594.ppt differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 23ddec3..bd65a30 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -15,6 +15,8 @@
 #include editeng/ulspitem.hxx
 #include editeng/fhgtitem.hxx
 #include editeng/escapementitem.hxx
+#include editeng/colritem.hxx
+#include rsc/rscsfx.hxx
 
 #include svx/svdotext.hxx
 #include animations/animationnodehelper.hxx
@@ -47,6 +49,7 @@ public:
 void testFdo64512();
 void testFdo71075();
 void testN828390();
+void testFdo68594();
 
 CPPUNIT_TEST_SUITE(SdFiltersTest);
 CPPUNIT_TEST(testDocumentLayout);
@@ -56,6 +59,7 @@ public:
 CPPUNIT_TEST(testFdo64512);
 CPPUNIT_TEST(testFdo71075);
 CPPUNIT_TEST(testN828390);
+CPPUNIT_TEST(testFdo68594);
 
 CPPUNIT_TEST_SUITE_END();
 };
@@ -240,6 +244,25 @@ void SdFiltersTest::testN778859()
 }
 }
 
+void SdFiltersTest::testFdo68594()
+{
+::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/ppt/fdo68594.ppt));
+CPPUNIT_ASSERT_MESSAGE( failed to load, xDocShRef.Is() );
+CPPUNIT_ASSERT_MESSAGE( not in destruction, 
!xDocShRef-IsInDestruction() );
+
+SdDrawDocument *pDoc = xDocShRef-GetDoc();
+CPPUNIT_ASSERT_MESSAGE( no document, pDoc != NULL );
+const SdrPage *pPage = (pDoc-GetPage (1)-TRG_GetMasterPage());
+CPPUNIT_ASSERT_MESSAGE( no page, pPage != NULL );
+SdrObject *pObj = pPage-GetObj(1);
+SdrTextObj *pTxtObj = dynamic_castSdrTextObj *( pObj );
+CPPUNIT_ASSERT_MESSAGE( no text object, pTxtObj != NULL);
+const SvxColorItem *pC = dynamic_castconst SvxColorItem 
*(pTxtObj-GetMergedItem(EE_CHAR_COLOR));
+CPPUNIT_ASSERT_MESSAGE( no color item, pC != NULL);
+// Color should be black
+CPPUNIT_ASSERT_MESSAGE( Placeholder color mismatch, 
pC-GetValue().GetColor() == 0);
+}
+
 void SdFiltersTest::testFdo64512()
 {
 ::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/fdo64512.odp));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-11-14 Thread Muthu Subramanian
 sd/qa/unit/data/pptx/n828390.pptx |binary
 sd/qa/unit/import-tests.cxx   |   43 +-
 2 files changed, 42 insertions(+), 1 deletion(-)

New commits:
commit 22db67c9b64f6807d071d2c15da58954fb7aa8e9
Author: Muthu Subramanian sumu...@collabora.com
Date:   Thu Nov 14 13:43:09 2013 +0530

n#828390: Add unit test case for subscript export.

diff --git a/sd/qa/unit/data/pptx/n828390.pptx 
b/sd/qa/unit/data/pptx/n828390.pptx
new file mode 100644
index 000..e28a785
Binary files /dev/null and b/sd/qa/unit/data/pptx/n828390.pptx differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 6862815..23ddec3 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -14,6 +14,7 @@
 #include editeng/outlobj.hxx
 #include editeng/ulspitem.hxx
 #include editeng/fhgtitem.hxx
+#include editeng/escapementitem.hxx
 
 #include svx/svdotext.hxx
 #include animations/animationnodehelper.hxx
@@ -45,6 +46,7 @@ public:
 void testN778859();
 void testFdo64512();
 void testFdo71075();
+void testN828390();
 
 CPPUNIT_TEST_SUITE(SdFiltersTest);
 CPPUNIT_TEST(testDocumentLayout);
@@ -53,6 +55,7 @@ public:
 CPPUNIT_TEST(testN778859);
 CPPUNIT_TEST(testFdo64512);
 CPPUNIT_TEST(testFdo71075);
+CPPUNIT_TEST(testN828390);
 
 CPPUNIT_TEST_SUITE_END();
 };
@@ -66,9 +69,10 @@ why, instead of just updating .xml's blindly.
 
 Example: Let's say you are adding a test called fdoABCD.pptx.  You'll place it
 to the data/ subdirectory, and will add an entry to aFilesToCompare below,
+the 3rd parameter is for export test - can be -1 (don't export), ODP, PPT or 
PPTX
 like:
 
-{ fdoABCD.pptx, xml/fdoABCD_ },
+{ fdoABCD.pptx, xml/fdoABCD_, PPTX },
 
 and will count the index in the aFilesToCompare structure (1st is 0, 2nd is 1,
 etc.)  Temporarily you'll set nUpdateMe to this index (instead of -1), and run
@@ -181,6 +185,43 @@ void SdFiltersTest::testN759180()
 }
 }
 
+void SdFiltersTest::testN828390()
+{
+bool bPassed = false;
+::sd::DrawDocShellRef xDocShRef = loadURL( 
getURLFromSrc(/sd/qa/unit/data/pptx/n828390.pptx) );
+CPPUNIT_ASSERT_MESSAGE( failed to load, xDocShRef.Is() );
+
+xDocShRef = saveAndReload( xDocShRef, PPTX );
+CPPUNIT_ASSERT_MESSAGE( failed to load, xDocShRef.Is() );
+CPPUNIT_ASSERT_MESSAGE( in destruction, !xDocShRef-IsInDestruction() );
+
+SdDrawDocument *pDoc = xDocShRef-GetDoc();
+CPPUNIT_ASSERT_MESSAGE( no document, pDoc != NULL );
+const SdrPage *pPage = pDoc-GetPage(1);
+CPPUNIT_ASSERT_MESSAGE( no page, pPage != NULL );
+{
+std::vectorEECharAttrib rLst;
+// Get the object
+SdrObject *pObj = pPage-GetObj(0);
+SdrTextObj *pTxtObj = dynamic_castSdrTextObj *( pObj );
+const EditTextObject aEdit = 
pTxtObj-GetOutlinerParaObject()-GetTextObject();
+aEdit.GetCharAttribs(0, rLst);
+for( std::vectorEECharAttrib::reverse_iterator it = rLst.rbegin(); 
it!=rLst.rend(); ++it)
+{
+const SvxEscapementItem *pFontEscapement = dynamic_castconst 
SvxEscapementItem *((*it).pAttr);
+if(pFontEscapement)
+{
+if( pFontEscapement-GetEsc() == -25 )
+{
+bPassed = true;
+break;
+}
+}
+}
+}
+CPPUNIT_ASSERT_MESSAGE(Subscript not exported properly, bPassed);
+}
+
 void SdFiltersTest::testN778859()
 {
 ::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/pptx/n778859.pptx));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-10-16 Thread Jacobo Aragunde Pérez
 sd/qa/unit/data/xml/n819614_0.xml |7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

New commits:
commit 3f8e73a36aeb4b029ef9e2025fd05a56011da9df
Author: Jacobo Aragunde Pérez jaragu...@igalia.com
Date:   Tue Oct 15 18:14:09 2013 +0200

sd: Fix output for unit test file n819614.pptx

Change-Id: Ida2d2bab3a30beaa8e686a23355e4d6f41182f3f
Reviewed-on: https://gerrit.libreoffice.org/6257
Tested-by: Miklos Vajna vmik...@collabora.co.uk
Reviewed-by: Miklos Vajna vmik...@collabora.co.uk

diff --git a/sd/qa/unit/data/xml/n819614_0.xml 
b/sd/qa/unit/data/xml/n819614_0.xml
index 050ba3f..713ad74 100644
--- a/sd/qa/unit/data/xml/n819614_0.xml
+++ b/sd/qa/unit/data/xml/n819614_0.xml
@@ -21,12 +21,7 @@
Line2 column1=0.00 column2=101.00 column3=0.00/
Line3 column1=0.00 column2=0.00 column3=1.00/
   /Transformation
-  InteropGrabBag
-   PropertyValue name=OOXColor handle=0 propertyState=DIRECT_VALUE/
-   PropertyValue name=OOXData handle=0 propertyState=DIRECT_VALUE/
-   PropertyValue name=OOXLayout handle=0 propertyState=DIRECT_VALUE/
-   PropertyValue name=OOXStyle handle=0 propertyState=DIRECT_VALUE/
-  /InteropGrabBag
+  InteropGrabBag/
  /XShape
  XShape positionX=182 positionY=2544 sizeX=25125 sizeY=16293 
type=com.sun.star.drawing.GroupShape
   XShapes
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-06-21 Thread Jan Holesovsky
 sd/qa/unit/import-tests.cxx |   26 ++
 1 file changed, 22 insertions(+), 4 deletions(-)

New commits:
commit e2ba9b895b262dd16d452e8b461790beebb2dab3
Author: Jan Holesovsky ke...@suse.cz
Date:   Fri Jun 21 13:13:26 2013 +0200

Better description of the sd unit tests creation.

Change-Id: I7d3ac7997f54f4cb3fc826601d89248ea42549f4

diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index bebda14..c9dfd60 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -48,10 +48,28 @@ public:
 
 /** Test document against a reference XML dump of shapes.
 
-If you want to update one of these tests, set the nUpdateMe to the index of
-the test, the dump XML's will be created (or rewritten) instead of checking.
-Use with care - when the test is failing, first find out why, instead of just
-updating .xml's blindly.
+If you want to update one of these tests, or add a new one, set the nUpdateMe
+to the index of the test, and the dump XML's will be created (or rewritten)
+instead of checking. Use with care - when the test is failing, first find out
+why, instead of just updating .xml's blindly.
+
+Example: Let's say you are adding a test called fdoABCD.pptx.  You'll place it
+to the data/ subdirectory, and will add an entry to aFilesToCompare below,
+like:
+
+{ fdoABCD.pptx, xml/fdoABCD_ },
+
+and will count the index in the aFilesToCompare structure (1st is 0, 2nd is 1,
+etc.)  Temporarily you'll set nUpdateMe to this index (instead of -1), and run
+
+make sd
+
+This will generate the sd/qa/unit/data/xml/fdoABCD_*.xml for you.  Now you
+will change nUpdateMe back to -1, and commit your fdoABCD.pptx test, the
+xml/fdoABCD_*.xml dumps, and the aFilesToCompare addition in one commit.
+
+As the last step, you will revert your fix and do 'make sd' again, to check
+that without your fix, the unit test breaks.  Then clean up, and push :-)
 
 NOTE: This approach is suitable only for tests of fixes that actually change
 the layout - best to check by reverting your fix locally after having added
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-06-13 Thread Jan Holesovsky
 sd/qa/unit/data/n762695.pptx  |binary
 sd/qa/unit/data/xml/n762695_0.xml |  243 ++
 sd/qa/unit/data/xml/n762695_1.xml |  634 ++
 sd/qa/unit/import-tests.cxx   |1 
 4 files changed, 878 insertions(+)

New commits:
commit 90197a2375a77d02fcb70d74df318dc5f81288bb
Author: Jan Holesovsky ke...@suse.cz
Date:   Thu Jun 13 16:27:35 2013 +0200

Unit test to avoid the regression...

...that appeared thanks to the bnc#819614 fix.

Thanks Fridrich for constructing the document!

Change-Id: I780f65ca436caee83094a8591dd9e36b33d921e8

diff --git a/sd/qa/unit/data/n762695.pptx b/sd/qa/unit/data/n762695.pptx
new file mode 100644
index 000..cf547f3
Binary files /dev/null and b/sd/qa/unit/data/n762695.pptx differ
diff --git a/sd/qa/unit/data/xml/n762695_0.xml 
b/sd/qa/unit/data/xml/n762695_0.xml
new file mode 100644
index 000..dd0922f
--- /dev/null
+++ b/sd/qa/unit/data/xml/n762695_0.xml
@@ -0,0 +1,243 @@
+?xml version=1.0?
+XShapes
+ XShape positionX=5769 positionY=5160 sizeX=13390 sizeY=10855 
type=com.sun.star.drawing.CustomShape name=Freeform 3 
fontHeight=18.00 fontColor= textAutoGrowHeight=false 
textAutoGrowWidth=false textContourFrame=false textFitToSize=NONE 
textHorizontalAdjust=BLOCK textVerticalAdjust=CENTER textLeftDistance=250 
textRightDistance=250 textUpperDistance=125 textLowerDistance=125 
textMaximumFrameHeight=0 textMaximumFrameWidth=0 textMinimumFrameHeight=0 
textMinimumFrameWidth=0 textAnimationAmount=0 textAnimationCount=0 
textAnimationDelay=0 textAnimationDirection=LEFT textAnimationKind=NONE 
textAnimationStartInside=false textAnimationStopInside=false 
textWritingMode=LR_TB fillStyle=SOLID fillColor=c3d69b 
fillTransparence=0 fillTransparenceGradientName=
+  FillTransparenceGradient style=LINEAR startColor=00 
endColor=ff angle=0 border=0 xOffset=50 yOffset=50 
startIntensity=100 endIntensity=100 stepCount=0/
+  FillGradient style=LINEAR startColor=3465af endColor=ff angle=0 
border=0 xOffset=50 yOffset=50 startIntensity=100 endIntensity=100 
stepCount=0/
+  FillHatch style=SINGLE color=3465af distance=20 angle=0/
+  FillBitmap width=32 height=32/
+  LineDash style=RECT dots=1 dotLen=20 dashes=1 dashLen=20 
distance=20/
+  LineStart/
+  LineEnd/
+  Transformation
+   Line1 column1=13391.00 column2=0.00 column3=5769.00/
+   Line2 column1=0.00 column2=10856.00 column3=5160.00/
+   Line3 column1=0.00 column2=0.00 column3=1.00/
+  /Transformation
+  CustomShapeGeometry
+   PropertyValue name=AdjustmentValues
+AdjustmentValues/
+   /PropertyValue
+   PropertyValue name=Equations handle=0 propertyState=DIRECT_VALUE/
+   PropertyValue name=Handles
+Handles/
+   /PropertyValue
+   PropertyValue name=MirroredX value=false handle=0 
propertyState=DIRECT_VALUE/
+   PropertyValue name=MirroredY value=false handle=0 
propertyState=DIRECT_VALUE/
+   PropertyValue name=Path
+Path
+ PropertyValue name=Coordinates
+  Coordinates
+   EnhancedCustomShapeParameterPair
+First value=0 type=0/
+Second value=4572508 type=0/
+   /EnhancedCustomShapeParameterPair
+   EnhancedCustomShapeParameterPair
+First value=1524525 type=0/
+Second value=2755361 type=0/
+   /EnhancedCustomShapeParameterPair
+   EnhancedCustomShapeParameterPair
+First value=1521154 type=0/
+Second value=1860047 type=0/
+   /EnhancedCustomShapeParameterPair
+   EnhancedCustomShapeParameterPair
+First value=5441 type=0/
+Second value=0 type=0/
+   /EnhancedCustomShapeParameterPair
+   EnhancedCustomShapeParameterPair
+First value=4567067 type=0/
+Second value=0 type=0/
+   /EnhancedCustomShapeParameterPair
+   EnhancedCustomShapeParameterPair
+First value=3003587 type=0/
+Second value=1854731 type=0/
+   /EnhancedCustomShapeParameterPair
+   EnhancedCustomShapeParameterPair
+First value=3015827 type=0/
+Second value=2721006 type=0/
+   /EnhancedCustomShapeParameterPair
+   EnhancedCustomShapeParameterPair
+First value=4572508 type=0/
+Second value=4572508 type=0/
+   /EnhancedCustomShapeParameterPair
+   EnhancedCustomShapeParameterPair
+First value=0 type=0/
+Second value=4572508 type=0/
+   /EnhancedCustomShapeParameterPair
+  /Coordinates
+ /PropertyValue
+ PropertyValue name=Segments
+  Segments
+   EnhancedCustomShapeSegment command=1 count=1/
+   EnhancedCustomShapeSegment command=3 count=1/
+   EnhancedCustomShapeSegment command=2 count=1/
+   EnhancedCustomShapeSegment command=3 count=1/
+   EnhancedCustomShapeSegment command=2 count=1/
+   EnhancedCustomShapeSegment command=4 count=0/
+   EnhancedCustomShapeSegment command=5 count=0/
+  /Segments
+ /PropertyValue
+ PropertyValue name=SubViewSize handle=0 

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

2013-06-08 Thread Julien Nabet
 sd/qa/unit/data/xml/shapes-test_page1.xml |2 +-
 sd/qa/unit/data/xml/shapes-test_page2.xml |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit eaeaafbf20629e2e2eb111b71ddcc78ab81aec55
Author: Julien Nabet serval2...@yahoo.fr
Date:   Sat Jun 8 23:15:30 2013 +0200

Fix qa tests after non-primitive patch

Change-Id: I438a1b09d74a87858b23046cc34995a9fbab396a

diff --git a/sd/qa/unit/data/xml/shapes-test_page1.xml 
b/sd/qa/unit/data/xml/shapes-test_page1.xml
index cac158f..68964e0 100644
--- a/sd/qa/unit/data/xml/shapes-test_page1.xml
+++ b/sd/qa/unit/data/xml/shapes-test_page1.xml
@@ -1556,7 +1556,7 @@
PropertyValue name=ViewBox
 ViewBox x=0 y=0 width=14810 height=25050/
/PropertyValue
-   PropertyValue name=Type value=NonPrimitive handle=0 
propertyState=DIRECT_VALUE/
+   PropertyValue name=Type value=non-primitive handle=0 
propertyState=DIRECT_VALUE/
PropertyValue name=Path
 Path
  PropertyValue name=Coordinates
diff --git a/sd/qa/unit/data/xml/shapes-test_page2.xml 
b/sd/qa/unit/data/xml/shapes-test_page2.xml
index 57c64d5..d79f44f 100644
--- a/sd/qa/unit/data/xml/shapes-test_page2.xml
+++ b/sd/qa/unit/data/xml/shapes-test_page2.xml
@@ -1553,7 +1553,7 @@
PropertyValue name=ViewBox
 ViewBox x=0 y=0 width=20590 height=20590/
/PropertyValue
-   PropertyValue name=Type value=NonPrimitive handle=0 
propertyState=DIRECT_VALUE/
+   PropertyValue name=Type value=non-primitive handle=0 
propertyState=DIRECT_VALUE/
PropertyValue name=Path
 Path
  PropertyValue name=Coordinates
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-06-08 Thread Julien Nabet
 sd/qa/unit/data/xml/shapes-test_page1.xml |2 +-
 sd/qa/unit/data/xml/shapes-test_page2.xml |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 52a377585cd4877bf251b482ef016cd7d16846ad
Author: Julien Nabet serval2...@yahoo.fr
Date:   Sun Jun 9 01:23:51 2013 +0200

Revert Fix qa tests after non-primitive patch

This reverts commit eaeaafbf20629e2e2eb111b71ddcc78ab81aec55.
I must recognize I don't understand why it doesn't work but since most of 
the tinderboxes are red...

diff --git a/sd/qa/unit/data/xml/shapes-test_page1.xml 
b/sd/qa/unit/data/xml/shapes-test_page1.xml
index 68964e0..cac158f 100644
--- a/sd/qa/unit/data/xml/shapes-test_page1.xml
+++ b/sd/qa/unit/data/xml/shapes-test_page1.xml
@@ -1556,7 +1556,7 @@
PropertyValue name=ViewBox
 ViewBox x=0 y=0 width=14810 height=25050/
/PropertyValue
-   PropertyValue name=Type value=non-primitive handle=0 
propertyState=DIRECT_VALUE/
+   PropertyValue name=Type value=NonPrimitive handle=0 
propertyState=DIRECT_VALUE/
PropertyValue name=Path
 Path
  PropertyValue name=Coordinates
diff --git a/sd/qa/unit/data/xml/shapes-test_page2.xml 
b/sd/qa/unit/data/xml/shapes-test_page2.xml
index d79f44f..57c64d5 100644
--- a/sd/qa/unit/data/xml/shapes-test_page2.xml
+++ b/sd/qa/unit/data/xml/shapes-test_page2.xml
@@ -1553,7 +1553,7 @@
PropertyValue name=ViewBox
 ViewBox x=0 y=0 width=20590 height=20590/
/PropertyValue
-   PropertyValue name=Type value=non-primitive handle=0 
propertyState=DIRECT_VALUE/
+   PropertyValue name=Type value=NonPrimitive handle=0 
propertyState=DIRECT_VALUE/
PropertyValue name=Path
 Path
  PropertyValue name=Coordinates
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-05-18 Thread Armin Le Grand
 sd/qa/unit/data/xml/shapes-test_page3.xml |  230 +++---
 svx/source/svdraw/svdopath.cxx|4 
 2 files changed, 119 insertions(+), 115 deletions(-)

New commits:
commit 042717e05e2fea96e1e892b715f98dc00e7a881c
Author: Armin Le Grand a...@apache.org
Date:   Wed Aug 1 13:45:21 2012 +

Resolves: #i116244# need to reset rotation...

This reverts commit f47ed987388e4df58ba74b9aca574a7d1fba396a.

update layout tests

Change-Id: I8a9daaa78acc98bf497241ebce856d5798b187f5

diff --git a/sd/qa/unit/data/xml/shapes-test_page3.xml 
b/sd/qa/unit/data/xml/shapes-test_page3.xml
index 0e91ec3..d6c9692 100644
--- a/sd/qa/unit/data/xml/shapes-test_page3.xml
+++ b/sd/qa/unit/data/xml/shapes-test_page3.xml
@@ -53,8 +53,8 @@
   LineStart/
   LineEnd/
   Transformation
-   Line1 column1=0.00 column2=7591.681979 column3=8629.325587/
-   Line2 column1=-7398.48 column2=0.00 column3=7484.216507/
+   Line1 column1=7591.681979 column2=0.00 column3=8629.325587/
+   Line2 column1=0.00 column2=7398.48 column3=85.734286/
Line3 column1=0.00 column2=0.00 column3=1.00/
   /Transformation
   pointSequence
@@ -125,71 +125,71 @@
point positionX=14748 positionY=7070 polygonFlags=NORMAL/
   /pointSequence
   pointSequence
-   point positionX=197 positionY=3 polygonFlags=NORMAL/
-   point positionX=963 positionY=-42 polygonFlags=CONTROL/
-   point positionX=1624 positionY=496 polygonFlags=CONTROL/
-   point positionX=2410 positionY=480 polygonFlags=NORMAL/
-   point positionX=3123 positionY=465 polygonFlags=CONTROL/
-   point positionX=3832 positionY=623 polygonFlags=CONTROL/
-   point positionX=4535 positionY=740 polygonFlags=NORMAL/
-   point positionX=5103 positionY=834 polygonFlags=CONTROL/
-   point positionX=5621 positionY=1132 polygonFlags=CONTROL/
-   point positionX=6183 positionY=1261 polygonFlags=NORMAL/
-   point positionX=6865 positionY=1417 polygonFlags=CONTROL/
-   point positionX=7413 positionY=1959 polygonFlags=CONTROL/
-   point positionX=7398 positionY=2562 polygonFlags=NORMAL/
-   point positionX=7384 positionY=3139 polygonFlags=CONTROL/
-   point positionX=6674 positionY=3463 polygonFlags=CONTROL/
-   point positionX=6140 positionY=3646 polygonFlags=NORMAL/
-   point positionX=5689 positionY=3800 polygonFlags=CONTROL/
-   point positionX=5214 positionY=3768 polygonFlags=CONTROL/
-   point positionX=4752 positionY=3733 polygonFlags=NORMAL/
-   point positionX=4268 positionY=3696 polygonFlags=CONTROL/
-   point positionX=3851 positionY=3893 polygonFlags=CONTROL/
-   point positionX=3364 positionY=3820 polygonFlags=NORMAL/
-   point positionX=2849 positionY=3742 polygonFlags=CONTROL/
-   point positionX=2184 positionY=3373 polygonFlags=CONTROL/
-   point positionX=1802 positionY=3733 polygonFlags=NORMAL/
-   point positionX=1298 positionY=4208 polygonFlags=CONTROL/
-   point positionX=1653 positionY=5105 polygonFlags=CONTROL/
-   point positionX=1802 positionY=5772 polygonFlags=NORMAL/
-   point positionX=1942 positionY=6397 polygonFlags=CONTROL/
-   point positionX=2154 positionY=7177 polygonFlags=CONTROL/
-   point positionX=2800 positionY=7420 polygonFlags=NORMAL/
-   point positionX=3405 positionY=7647 polygonFlags=CONTROL/
-   point positionX=4082 positionY=7620 polygonFlags=CONTROL/
-   point positionX=4708 positionY=7507 polygonFlags=NORMAL/
-   point positionX=5190 positionY=7420 polygonFlags=CONTROL/
-   point positionX=6021 positionY=7963 polygonFlags=CONTROL/
-   point positionX=6140 positionY=7029 polygonFlags=NORMAL/
-   point positionX=6246 positionY=6202 polygonFlags=CONTROL/
-   point positionX=5466 positionY=6375 polygonFlags=CONTROL/
-   point positionX=5055 positionY=6205 polygonFlags=NORMAL/
-   point positionX=4498 positionY=5974 polygonFlags=CONTROL/
-   point positionX=3910 positionY=5763 polygonFlags=CONTROL/
-   point positionX=3494 positionY=5338 polygonFlags=NORMAL/
-   point positionX=3122 positionY=4958 polygonFlags=CONTROL/
-   point positionX=3099 positionY=4343 polygonFlags=CONTROL/
-   point positionX=3104 positionY=3820 polygonFlags=NORMAL/
-   point positionX=3109 positionY=3343 polygonFlags=CONTROL/
-   point positionX=3279 positionY=2893 polygonFlags=CONTROL/
-   point positionX=3451 positionY=2432 polygonFlags=NORMAL/
-   point positionX=3619 positionY=1983 polygonFlags=CONTROL/
-   point positionX=3366 positionY=1398 polygonFlags=CONTROL/
-   point positionX=2757 positionY=1217 polygonFlags=NORMAL/
-   point positionX=2249 positionY=1066 polygonFlags=CONTROL/
-   point positionX=1805 positionY=1010 polygonFlags=CONTROL/
-   point positionX=1325 positionY=1044 polygonFlags=NORMAL/
-   point positionX=594 positionY=1095 polygonFlags=CONTROL/
-   point positionX=411 positionY=1981 polygonFlags=CONTROL/
-   point positionX=241 positionY=2562 polygonFlags=NORMAL/
-   point positionX=49 positionY=3219 polygonFlags=CONTROL/
-   point positionX=-49 positionY=3889 polygonFlags=CONTROL/
- 

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

2013-05-17 Thread Thorsten Behrens
 sd/qa/unit/data/fdo64512.odp |binary
 sd/qa/unit/import-tests.cxx  |   52 +++
 2 files changed, 52 insertions(+)

New commits:
commit 8230290c98f9fd77c933e350ca6c861566fefec6
Author: Thorsten Behrens tbehr...@suse.com
Date:   Sat May 18 01:25:52 2013 +0200

Add unit test for xml:id loading.

Guard against xml:id load breakage, that cause fdo#64512 and
fdo#60075. Both connector shape and animation references need it
to work.

Change-Id: I7883d1d27eae02f605c83217a2e1b83934b31483

diff --git a/sd/qa/unit/data/fdo64512.odp b/sd/qa/unit/data/fdo64512.odp
new file mode 100644
index 000..ffb9f04
Binary files /dev/null and b/sd/qa/unit/data/fdo64512.odp differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 8ca2348..0acc91c 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -16,6 +16,14 @@
 #include editeng/fhgtitem.hxx
 
 #include svx/svdotext.hxx
+#include animations/animationnodehelper.hxx
+
+#include com/sun/star/drawing/XDrawPage.hpp
+#include com/sun/star/drawing/XDrawPagesSupplier.hpp
+#include com/sun/star/animations/XAnimationNodeSupplier.hpp
+#include com/sun/star/animations/XAnimationNode.hpp
+#include com/sun/star/animations/XAnimate.hpp
+#include com/sun/star/beans/XPropertySet.hpp
 
 using namespace ::com::sun::star;
 
@@ -27,12 +35,14 @@ public:
 void testSmoketest();
 void testN759180();
 void testN778859();
+void testFdo64512();
 
 CPPUNIT_TEST_SUITE(SdFiltersTest);
 CPPUNIT_TEST(testDocumentLayout);
 CPPUNIT_TEST(testSmoketest);
 CPPUNIT_TEST(testN759180);
 CPPUNIT_TEST(testN778859);
+CPPUNIT_TEST(testFdo64512);
 CPPUNIT_TEST_SUITE_END();
 };
 
@@ -154,6 +164,48 @@ void SdFiltersTest::testN778859()
 }
 }
 
+void SdFiltersTest::testFdo64512()
+{
+::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/fdo64512.odp));
+CPPUNIT_ASSERT_MESSAGE( failed to load, xDocShRef.Is() );
+CPPUNIT_ASSERT_MESSAGE( not in destruction, 
!xDocShRef-IsInDestruction() );
+
+uno::Reference drawing::XDrawPagesSupplier  xDoc(
+xDocShRef-GetDoc()-getUnoModel(), uno::UNO_QUERY_THROW );
+CPPUNIT_ASSERT_MESSAGE( not exactly one page, 
xDoc-getDrawPages()-getCount() == 1 );
+
+uno::Reference drawing::XDrawPage  xPage(
+xDoc-getDrawPages()-getByIndex(0), uno::UNO_QUERY_THROW );
+CPPUNIT_ASSERT_MESSAGE( no exactly three shapes, xPage-getCount() == 3 
);
+
+uno::Reference beans::XPropertySet  xConnectorShape(
+xPage-getByIndex(2), uno::UNO_QUERY );
+CPPUNIT_ASSERT_MESSAGE( no connector shape, xConnectorShape.is() );
+
+uno::Reference beans::XPropertySet  xSvgShape(
+xConnectorShape-getPropertyValue(StartShape), uno::UNO_QUERY );
+CPPUNIT_ASSERT_MESSAGE( no start shape, xSvgShape.is() );
+
+uno::Reference beans::XPropertySet  xCustomShape(
+xConnectorShape-getPropertyValue(EndShape), uno::UNO_QUERY );
+CPPUNIT_ASSERT_MESSAGE( no end shape, xCustomShape.is() );
+
+uno::Reference animations::XAnimationNodeSupplier  xAnimNodeSupplier(
+xPage, uno::UNO_QUERY_THROW );
+uno::Reference animations::XAnimationNode  xRootNode(
+xAnimNodeSupplier-getAnimationNode() );
+std::vector uno::Reference animations::XAnimationNode   aAnimVector;
+anim::create_deep_vector(xRootNode, aAnimVector);
+CPPUNIT_ASSERT_MESSAGE( not 8 animation nodes, aAnimVector.size() == 8 );
+
+uno::Reference animations::XAnimate  xNode(
+aAnimVector[7], uno::UNO_QUERY_THROW );
+uno::Reference drawing::XShape  xTargetShape(
+xNode-getTarget(), uno::UNO_QUERY_THROW );
+CPPUNIT_ASSERT_MESSAGE( inner node not referencing svg shape,
+xTargetShape != xSvgShape );
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SdFiltersTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


<    1   2   3   4   5   6