[Libreoffice-commits] .: 2 commits - sd/qa sw/qa

Michael Stahl mst at kemper.freedesktop.org
Mon Jul 16 01:35:27 PDT 2012


 sd/qa/unit/regression-test.cxx           |    2 +-
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx |   12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit e35246c71ff08167e430d7e113cb139fe210e23c
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Jul 16 10:29:11 2012 +0200

    warning C4928: illegal copy-initialization:
    
    more than one user-defined conversion has been implicitly applied.
    
    Change-Id: I5a6b4b9aacdc6cc38119185da6bc94334a809c0b

diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index cfbd45f..f8cd74e 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -269,7 +269,7 @@ para = enum.NextElement
 xray para.String
 xray para.PageStyleName
 */
-    uno::Reference<uno::XInterface> paragraph = getParagraph( 2, "TEXT1" );
+    uno::Reference<uno::XInterface> paragraph(getParagraph( 2, "TEXT1" ));
     // we want to test the paragraph is on the first page (it was put onto another page without the fix),
     // use a small trick and instead of checking the page layout, check the page style
     OUString pageStyle = getProperty< OUString >( paragraph, "PageStyleName" );
@@ -374,8 +374,8 @@ xray para2.String
 xray para2.PageStyleName
 */
     // get the 2nd and 3rd paragraph
-    uno::Reference<uno::XInterface> paragraph1 = getParagraph( 2, "one" );
-    uno::Reference<uno::XInterface> paragraph2 = getParagraph( 3, "two" );
+    uno::Reference<uno::XInterface> paragraph1(getParagraph( 2, "one" ));
+    uno::Reference<uno::XInterface> paragraph2(getParagraph( 3, "two" ));
     OUString pageStyle1 = getProperty< OUString >( paragraph1, "PageStyleName" );
     OUString pageStyle2 = getProperty< OUString >( paragraph2, "PageStyleName" );
     CPPUNIT_ASSERT_EQUAL( OUString( "Converted1" ), pageStyle1 );
@@ -400,8 +400,8 @@ xray para2.String
 xray para2.PageStyleName
 */
     // get the 2nd and 4th paragraph
-    uno::Reference<uno::XInterface> paragraph1 = getParagraph( 2, "text1" );
-    uno::Reference<uno::XInterface> paragraph2 = getParagraph( 4, "text2" );
+    uno::Reference<uno::XInterface> paragraph1(getParagraph( 2, "text1" ));
+    uno::Reference<uno::XInterface> paragraph2(getParagraph( 4, "text2" ));
     OUString pageStyle1 = getProperty< OUString >( paragraph1, "PageStyleName" );
     OUString pageStyle2 = getProperty< OUString >( paragraph2, "PageStyleName" );
     // "Standard" is the style for the first page (2nd is "Converted1").
@@ -656,7 +656,7 @@ xray numbering(11)  - should be 4, arabic
 note that the indexes may get off as the implementation evolves, C++ code seaches in loops
 */
     uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
-    uno::Reference< text::XTextRange > paragraph = getParagraph( 1, "Text1." );
+    uno::Reference< text::XTextRange > paragraph(getParagraph( 1, "Text1." ));
     OUString numberingStyleName = getProperty< OUString >( paragraph, "NumberingStyleName" );
     uno::Reference<text::XNumberingRulesSupplier> xNumberingRulesSupplier(mxComponent, uno::UNO_QUERY);
     uno::Reference<container::XIndexAccess> numberingRules(xNumberingRulesSupplier->getNumberingRules(), uno::UNO_QUERY);
commit 0c803b1cddb273434d1f102a91f650cd20bbb0e0
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Jul 16 10:23:46 2012 +0200

    warning C4701: potentially uninitialized local variable used
    
    Change-Id: I8e8dec18e1bec67154304b8c96ff034d6ab5d791

diff --git a/sd/qa/unit/regression-test.cxx b/sd/qa/unit/regression-test.cxx
index 0b1dee1..d9ce42c 100644
--- a/sd/qa/unit/regression-test.cxx
+++ b/sd/qa/unit/regression-test.cxx
@@ -139,7 +139,7 @@ FileFormat aFileFormats[] = {
 
 ::sd::DrawDocShellRef SdFiltersTest::loadURL( const rtl::OUString &rURL )
 {
-    FileFormat *pFmt;
+    FileFormat *pFmt(0);
 
     for (size_t i = 0; i < SAL_N_ELEMENTS (aFileFormats); i++)
     {


More information about the Libreoffice-commits mailing list