replacing OUString::valueOf(static_cast<sal_Int32>) ??

Noel Grandin noel at peralex.com
Wed Jan 9 06:10:27 PST 2013


maybe we need
    OUString::valueOfInt32(sal_Int32)
that does the cast for us?

At least it'll be less noisy, and we can document in one place why it's 
necessary.


>
> -------- Original Message --------
> Subject: 	[Libreoffice-commits] .: 2 commits - sc/qa sd/source
> Date: 	Wed, 9 Jan 2013 05:02:08 -0800 (PST)
> From: 	logerrit at kemper.freedesktop.org (Libreoffice Gerrit user)
> Reply-To: 	libreoffice at lists.freedesktop.org
> To: 	libreoffice-commits at lists.freedesktop.org
>
>
>
>   sc/qa/unit/subsequent_filters-test.cxx |   10 ++++++++++
>   sd/source/ui/dlg/prltempl.cxx          |    3 ++-
>   sd/source/ui/func/fuprobjs.cxx         |    2 +-
>   3 files changed, 13 insertions(+), 2 deletions(-)
>
> New commits:
> commit 004c72330a132bbff09267459b35decdea3d8cf6
> Author: Michael Meeks<michael.meeks at suse.com>
> Date:   Wed Jan 9 13:02:42 2013 +0000
>
>      lame_OUString_valueOf_sal_Int32_casts += 2;
>
> diff --git a/sd/source/ui/dlg/prltempl.cxx b/sd/source/ui/dlg/prltempl.cxx
> index 787d717..625c191 100644
> --- a/sd/source/ui/dlg/prltempl.cxx
> +++ b/sd/source/ui/dlg/prltempl.cxx
> @@ -213,7 +213,8 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell* pDocSh,
>           case PO_OUTLINE_7:
>           case PO_OUTLINE_8:
>           case PO_OUTLINE_9:
> -            aTitle = OUString(SdResId( STR_PSEUDOSHEET_OUTLINE )) + " " + OUString::valueOf( ePO - PO_OUTLINE_1 + 1 );
> +            aTitle = OUString(SdResId( STR_PSEUDOSHEET_OUTLINE )) + " " +
> +                OUString::valueOf( static_cast<sal_Int32>( ePO - PO_OUTLINE_1 + 1 ) );
>           break;
>   
>           case PO_NOTES:
> diff --git a/sd/source/ui/func/fuprobjs.cxx b/sd/source/ui/func/fuprobjs.cxx
> index 0f46566..5ce8eb5 100644
> --- a/sd/source/ui/func/fuprobjs.cxx
> +++ b/sd/source/ui/func/fuprobjs.cxx
> @@ -138,7 +138,7 @@ void FuPresentationObjects::DoExecute( SfxRequest& )
>               String aStr(SdResId( STR_LAYOUT_OUTLINE ));
>               aStyleName.Append( aStr );
>               aStyleName.Append( sal_Unicode(' ') );
> -            aStyleName.Append( OUString::valueOf( nDepth ) );
> +            aStyleName.Append( OUString::valueOf( static_cast<sal_Int32>( nDepth ) ) );
>           }
>   
>           SfxStyleSheetBasePool* pStyleSheetPool = mpDocSh->GetStyleSheetPool();
> commit 2be3423657ddb067d17b4af0869b2300a0f0bc3e
> Author: Michael Meeks<michael.meeks at suse.com>
> Date:   Wed Jan 9 12:44:25 2013 +0000
>
>      re-apply calc /tmp unit test file leakage.
>
> diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
> index f56bd66..a7ec15b 100644
> --- a/sc/qa/unit/subsequent_filters-test.cxx
> +++ b/sc/qa/unit/subsequent_filters-test.cxx
> @@ -926,6 +926,8 @@ void ScFiltersTest::testBordersOoo33()
>               }
>           }
>       }
> +
> +    xDocSh->DoClose();
>   }
>   
>   void ScFiltersTest::testBugFixesODS()
> @@ -1768,6 +1770,8 @@ void ScFiltersTest::testColorScaleODS()
>       rtl::OUStringBuffer aBuffer(getSrcRootPath());
>       aBuffer.append(m_aBaseString).append(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/reference/")));
>       testColorScale_Impl(pDoc, aBuffer.makeStringAndClear());
> +
> +    xDocSh->DoClose();
>   }
>   
>   void ScFiltersTest::testColorScaleXLSX()
> @@ -1792,6 +1796,8 @@ void ScFiltersTest::testColorScaleXLSX()
>       rtl::OUStringBuffer aBuffer(getSrcRootPath());
>       aBuffer.append(m_aBaseString).append(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/reference/")));
>       testColorScale_Impl(pDoc, aBuffer.makeStringAndClear());
> +
> +    xDocSh->DoClose();
>   }
>   
>   void ScFiltersTest::testDataBarODS()
> @@ -1821,6 +1827,8 @@ void ScFiltersTest::testNewCondFormat()
>       rtl::OUString aCSVPath;
>       createCSVPath( aCSVFile, aCSVPath );
>       testCondFile(aCSVPath, pDoc, 0);
> +
> +    xDocSh->DoClose();
>   }
>   
>   void ScFiltersTest::testFormulaDependency()
> @@ -1849,6 +1857,8 @@ void ScFiltersTest::testFormulaDependency()
>   
>       // check that the number format is implicity inherited
>       // CPPUNIT_ASSERT_EQUAL(pDoc->GetString(0,4,0), pDoc->GetString(0,5,0));
> +
> +    xDocSh->DoClose();
>   }
>   
>   ScFiltersTest::ScFiltersTest()
> _______________________________________________
> Libreoffice-commits mailing list
> Libreoffice-commits at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
>
>
>
>


Disclaimer: http://www.peralex.com/disclaimer.html


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20130109/b2ede4ef/attachment-0001.html>


More information about the LibreOffice mailing list