[Libreoffice-commits] .: 8 commits - binfilter/bf_forms binfilter/bf_sfx2 binfilter/bf_sw binfilter/bf_xmloff filter/source unoxml/source writerfilter/source
Caolán McNamara
caolan at kemper.freedesktop.org
Tue Mar 1 12:40:10 PST 2011
binfilter/bf_forms/source/misc/forms_services.cxx | 2 -
binfilter/bf_sfx2/source/appl/sfx2_app.cxx | 3 --
binfilter/bf_sw/source/core/docnode/sw_section.cxx | 9 ++++---
binfilter/bf_sw/source/core/swg/sw_rdtox.cxx | 6 ++---
binfilter/bf_sw/source/filter/xml/sw_swxml.cxx | 6 ++---
binfilter/bf_sw/source/filter/xml/sw_xmlimp.cxx | 2 -
binfilter/bf_sw/source/filter/xml/sw_xmltbli.cxx | 2 -
binfilter/bf_xmloff/source/core/xmloff_DocumentSettingsContext.cxx | 2 -
binfilter/bf_xmloff/source/core/xmloff_XMLBase64ImportContext.cxx | 2 -
binfilter/bf_xmloff/source/draw/xmloff_ximpstyl.cxx | 6 ++---
binfilter/bf_xmloff/source/text/xmloff_XMLTextFrameContext.cxx | 2 -
filter/source/msfilter/eschesdo.hxx | 3 ++
filter/source/svg/svgreader.cxx | 12 +++++-----
unoxml/source/dom/characterdata.cxx | 8 +++---
writerfilter/source/dmapper/PropertyMap.cxx | 2 -
15 files changed, 35 insertions(+), 32 deletions(-)
New commits:
commit 60385e7001b3ac6f6d7b439174d7d5f9c0ed177f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Mar 1 16:36:53 2011 +0000
throw out some warnings
diff --git a/binfilter/bf_sw/source/core/docnode/sw_section.cxx b/binfilter/bf_sw/source/core/docnode/sw_section.cxx
index 6d296f2..ff489ea 100644
--- a/binfilter/bf_sw/source/core/docnode/sw_section.cxx
+++ b/binfilter/bf_sw/source/core/docnode/sw_section.cxx
@@ -102,8 +102,9 @@ namespace binfilter {
/*N*/ SwSection::SwSection( SectionType eTyp, const String& rName,
/*N*/ SwSectionFmt* pFmt )
-/*N*/ : SwClient( pFmt ),
-/*N*/ eType( eTyp ), sSectionNm( rName )
+/*N*/ : SwClient( pFmt )
+/*N*/ , sSectionNm( rName )
+/*N*/ , eType( eTyp )
/*N*/ {
/*N*/ bHidden = FALSE;
/*N*/ bHiddenFlag = FALSE;
@@ -205,12 +206,12 @@ namespace binfilter {
/*N*/ }
-void SwSection::_SetHiddenFlag( int bHidden, int bCondition )
+void SwSection::_SetHiddenFlag( int bInHidden, int bCondition )
{
SwSectionFmt* pFmt = GetFmt();
if( pFmt )
{
- int bHide = bHidden && bCondition;
+ int bHide = bInHidden && bCondition;
if( bHide ) // die Nodes also "verstecken"
{
commit a440d7c019b087258a647d4a7e5a7c4ef8da211c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Mar 1 16:34:36 2011 +0000
throw out some warnings
diff --git a/binfilter/bf_sw/source/core/swg/sw_rdtox.cxx b/binfilter/bf_sw/source/core/swg/sw_rdtox.cxx
index 676f40a..cffcff1 100644
--- a/binfilter/bf_sw/source/core/swg/sw_rdtox.cxx
+++ b/binfilter/bf_sw/source/core/swg/sw_rdtox.cxx
@@ -154,9 +154,9 @@ SwTOXBase* SwSwgReader::InTOXBase()
switch( eType )
{
case TOX_INDEX: {
- USHORT nOptions;
- r >> nOptions;
- pBase->SetOptions( nOptions );
+ USHORT nLclOptions;
+ r >> nLclOptions;
+ pBase->SetOptions( nLclOptions );
} break;
case TOX_CONTENT: {
USHORT nLevel;
commit 8d23bc512ebeaa63f70542173aa19fd11bdf9911
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Mar 1 14:55:03 2011 +0000
pointless to go from char* to OString to char*
diff --git a/binfilter/bf_sfx2/source/appl/sfx2_app.cxx b/binfilter/bf_sfx2/source/appl/sfx2_app.cxx
index e1b1185..8b6226c 100644
--- a/binfilter/bf_sfx2/source/appl/sfx2_app.cxx
+++ b/binfilter/bf_sfx2/source/appl/sfx2_app.cxx
@@ -166,8 +166,7 @@ SfxApplication* SfxApplication::pApp = NULL;
/*N*/ ResMgr* SfxApplication::CreateResManager( const char *pPrefix )
/*N*/ {
-/*N*/ String aMgrName = String::CreateFromAscii( pPrefix );
-/*N*/ return ResMgr::CreateResMgr(U2S(aMgrName));
+/*N*/ return ResMgr::CreateResMgr(pPrefix);
/*N*/ }
//------------------------------------------------------------------------
commit 53b7f58055b2d8f0879ceb124139186dd6a66bab
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Mar 1 14:54:42 2011 +0000
avoid implicit cast
diff --git a/binfilter/bf_forms/source/misc/forms_services.cxx b/binfilter/bf_forms/source/misc/forms_services.cxx
index 015db3c..67094f7 100644
--- a/binfilter/bf_forms/source/misc/forms_services.cxx
+++ b/binfilter/bf_forms/source/misc/forms_services.cxx
@@ -556,7 +556,7 @@ void* SAL_CALL component_getFactory(const sal_Char* _pImplName, XMultiServiceFac
for (sal_Int32 i=0; i<nClasses; ++i, ++pClasses, ++pServices, ++pFunctionsAsInts)
{
- if (rtl_ustr_ascii_compare(*pClasses, _pImplName) == 0)
+ if (rtl_ustr_ascii_compare(pClasses->getStr(), _pImplName) == 0)
{
::cppu::ComponentInstantiation aCurrentCreateFunction =
reinterpret_cast< ::cppu::ComponentInstantiation>(*pFunctionsAsInts);
diff --git a/binfilter/bf_xmloff/source/core/xmloff_DocumentSettingsContext.cxx b/binfilter/bf_xmloff/source/core/xmloff_DocumentSettingsContext.cxx
index 1a66c0e..b6b6f23 100644
--- a/binfilter/bf_xmloff/source/core/xmloff_DocumentSettingsContext.cxx
+++ b/binfilter/bf_xmloff/source/core/xmloff_DocumentSettingsContext.cxx
@@ -504,7 +504,7 @@ void XMLConfigItemContext::Characters( const ::rtl::OUString& rChars )
if( sTrimmedChars.getLength() )
{
::rtl::OUString sChars;
- if( sValue )
+ if( sValue.getLength() )
{
sChars = sValue;
sChars += sTrimmedChars;
diff --git a/binfilter/bf_xmloff/source/core/xmloff_XMLBase64ImportContext.cxx b/binfilter/bf_xmloff/source/core/xmloff_XMLBase64ImportContext.cxx
index 172ffba..63e5a69 100644
--- a/binfilter/bf_xmloff/source/core/xmloff_XMLBase64ImportContext.cxx
+++ b/binfilter/bf_xmloff/source/core/xmloff_XMLBase64ImportContext.cxx
@@ -70,7 +70,7 @@ void XMLBase64ImportContext::Characters( const ::rtl::OUString& rChars )
if( sTrimmedChars.getLength() )
{
OUString sChars;
- if( sBase64CharsLeft )
+ if( sBase64CharsLeft.getLength() )
{
sChars = sBase64CharsLeft;
sChars += sTrimmedChars;
diff --git a/binfilter/bf_xmloff/source/draw/xmloff_ximpstyl.cxx b/binfilter/bf_xmloff/source/draw/xmloff_ximpstyl.cxx
index a20c614..8e87e57 100644
--- a/binfilter/bf_xmloff/source/draw/xmloff_ximpstyl.cxx
+++ b/binfilter/bf_xmloff/source/draw/xmloff_ximpstyl.cxx
@@ -1161,7 +1161,7 @@ void SdXMLStylesContext::EndElement()
//
void SdXMLStylesContext::SetMasterPageStyles(SdXMLMasterPageContext& rMaster) const
{
- UniString sPrefix(rMaster.GetName(), (sal_uInt16)rMaster.GetName().getLength());
+ UniString sPrefix(rMaster.GetName());
sPrefix += sal_Unicode('-');
if(GetSdImport().GetLocalDocStyleFamilies().is() && GetSdImport().GetLocalDocStyleFamilies()->hasByName(rMaster.GetName()))
@@ -1229,7 +1229,7 @@ void SdXMLStylesContext::ImpSetGraphicStyles(
if(nFamily == pStyle->GetFamily() && !pStyle->IsDefaultStyle())
{
- const UniString aStyleName(pStyle->GetName(), (sal_uInt16)pStyle->GetName().getLength());
+ const UniString aStyleName(pStyle->GetName());
sal_uInt16 nStylePrefLen = aStyleName.SearchBackward( sal_Unicode('-') ) + 1;
if(!nPrefLen || ((nPrefLen == nStylePrefLen) && aStyleName.Equals(rPrefix, 0, nPrefLen)))
@@ -1323,7 +1323,7 @@ void SdXMLStylesContext::ImpSetGraphicStyles(
if(pStyle && nFamily == pStyle->GetFamily())
{
- const UniString aStyleName(pStyle->GetName(), (sal_uInt16)pStyle->GetName().getLength());
+ const UniString aStyleName(pStyle->GetName());
sal_uInt16 nStylePrefLen = aStyleName.SearchBackward( sal_Unicode('-') ) + 1;
if(pStyle->GetName().getLength() && (!nPrefLen || ((nPrefLen == nStylePrefLen) && aStyleName.Equals(rPrefix, 0, nPrefLen))))
diff --git a/binfilter/bf_xmloff/source/text/xmloff_XMLTextFrameContext.cxx b/binfilter/bf_xmloff/source/text/xmloff_XMLTextFrameContext.cxx
index 7fb4b64..e6fadaa 100644
--- a/binfilter/bf_xmloff/source/text/xmloff_XMLTextFrameContext.cxx
+++ b/binfilter/bf_xmloff/source/text/xmloff_XMLTextFrameContext.cxx
@@ -1099,7 +1099,7 @@ void XMLTextFrameContext::Characters( const OUString& rChars )
if( bOwnBase64Stream && xBase64Stream.is() )
{
OUString sChars;
- if( sBase64CharsLeft )
+ if( sBase64CharsLeft.getLength() )
{
sChars = sBase64CharsLeft;
sChars += sTrimmedChars;
diff --git a/unoxml/source/dom/characterdata.cxx b/unoxml/source/dom/characterdata.cxx
index 7e9c532..3b4f754 100644
--- a/unoxml/source/dom/characterdata.cxx
+++ b/unoxml/source/dom/characterdata.cxx
@@ -80,7 +80,7 @@ namespace DOM
{
// get current data
OString aData((const sal_Char*)xmlNodeGetContent(m_aNodePtr));
- OUString tmp(aData, aData.getLength(), RTL_TEXTENCODING_UTF8);
+ OUString tmp(rtl::OStringToOUString(aData, RTL_TEXTENCODING_UTF8));
if (offset > tmp.getLength() || offset < 0 || count < 0) {
DOMException e;
e.Code = DOMExceptionType_INDEX_SIZE_ERR;
@@ -142,7 +142,7 @@ namespace DOM
{
// get current data
OString aData((const sal_Char*)xmlNodeGetContent(m_aNodePtr));
- OUString tmp(aData, aData.getLength(), RTL_TEXTENCODING_UTF8);
+ OUString tmp(rtl::OStringToOUString(aData, RTL_TEXTENCODING_UTF8));
if (offset > tmp.getLength() || offset < 0) {
DOMException e;
e.Code = DOMExceptionType_INDEX_SIZE_ERR;
@@ -172,7 +172,7 @@ namespace DOM
{
// get current data
OString aData((const sal_Char*)xmlNodeGetContent(m_aNodePtr));
- OUString tmp(aData, aData.getLength(), RTL_TEXTENCODING_UTF8);
+ OUString tmp(rtl::OStringToOUString(aData, RTL_TEXTENCODING_UTF8));
if (offset > tmp.getLength() || offset < 0 || count < 0){
DOMException e;
e.Code = DOMExceptionType_INDEX_SIZE_ERR;
@@ -218,7 +218,7 @@ namespace DOM
{
// get current data
OString aData((const sal_Char*)xmlNodeGetContent(m_aNodePtr));
- OUString tmp(aData, aData.getLength(), RTL_TEXTENCODING_UTF8);
+ OUString tmp(rtl::OStringToOUString(aData, RTL_TEXTENCODING_UTF8));
if (offset > tmp.getLength() || offset < 0 || count < 0) {
DOMException e;
e.Code = DOMExceptionType_INDEX_SIZE_ERR;
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index 1d07cb4..ea3de14 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -325,7 +325,7 @@ void SectionPropertyMap::SetPageStyleName( bool bFirst, const ::rtl::OUString&
for( sal_Int32 nStyle = 0; nStyle < rPageStyleNames.getLength(); ++nStyle)
{
if( pStyleNames[nStyle].getLength() > nDefaultLength &&
- !rtl_ustr_compare_WithLength( sDefaultStyle, nDefaultLength, pStyleNames[nStyle], nDefaultLength))
+ !rtl_ustr_compare_WithLength( sDefaultStyle.getStr(), nDefaultLength, pStyleNames[nStyle].getStr(), nDefaultLength))
{
sal_Int32 nIndex = pStyleNames[nStyle].copy( nDefaultLength ).toInt32();
if( nIndex > nMaxIndex)
commit 83905c6dba836ecfb571019251f6ac8c45076b65
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Mar 1 13:25:55 2011 +0000
avoid implicit casting
diff --git a/filter/source/msfilter/eschesdo.hxx b/filter/source/msfilter/eschesdo.hxx
index c26c11f..a196616 100644
--- a/filter/source/msfilter/eschesdo.hxx
+++ b/filter/source/msfilter/eschesdo.hxx
@@ -62,9 +62,12 @@ public:
~ImplEESdrObject();
BOOL ImplGetPropertyValue( const sal_Unicode* pString );
+ BOOL ImplGetPropertyValue( const rtl::OUString& rString ) { return ImplGetPropertyValue(rString.getStr()); }
INT32 ImplGetInt32PropertyValue( const sal_Unicode* pStr, UINT32 nDef = 0 )
{ return ImplGetPropertyValue( pStr ) ? *(INT32*)mAny.getValue() : nDef; }
+ INT32 ImplGetInt32PropertyValue( const rtl::OUString& rStr, UINT32 nDef = 0 )
+ { return ImplGetInt32PropertyValue(rStr.getStr(), nDef); }
const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& GetShapeRef() const { return mXShape; }
const ::com::sun::star::uno::Any& GetUsrAny() const { return mAny; }
commit 49bcf05ccf98a551028d63902c99d83a24ce4954
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Mar 1 13:20:25 2011 +0000
avoid implicit casting
diff --git a/filter/source/svg/svgreader.cxx b/filter/source/svg/svgreader.cxx
index b909155..b502906 100644
--- a/filter/source/svg/svgreader.cxx
+++ b/filter/source/svg/svgreader.cxx
@@ -881,7 +881,7 @@ struct AnnotatingVisitor
{
// TODO(F1): preserveAspectRatio
parseViewBox(
- aValueUtf8,
+ aValueUtf8.getStr(),
maCurrState.maViewBox);
break;
}
@@ -1003,7 +1003,7 @@ struct AnnotatingVisitor
if( aValueUtf8 == "inherit" )
maCurrState.maCurrentColor = maParentStates.back().maCurrentColor;
else
- parseColor(aValueUtf8, maCurrState.maCurrentColor);
+ parseColor(aValueUtf8.getStr(), maCurrState.maCurrentColor);
break;
}
case XML_TRANSFORM:
@@ -1035,7 +1035,7 @@ struct AnnotatingVisitor
if( maGradientVector.empty() ||
maGradientVector.back().maStops.empty() )
break;
- parseColor( aValueUtf8,
+ parseColor( aValueUtf8.getStr(),
maGradientStopVector[
maGradientVector.back().maStops.back()].maStopColor );
break;
@@ -1043,7 +1043,7 @@ struct AnnotatingVisitor
if( maGradientVector.empty() ||
maGradientVector.back().maStops.empty() )
break;
- parseOpacity( aValueUtf8,
+ parseOpacity( aValueUtf8.getStr(),
maGradientStopVector[
maGradientVector.back().maStops.back()].maStopColor );
break;
@@ -1475,7 +1475,7 @@ struct ShapeWritingVisitor
// collect text from all TEXT_NODE children into sText
rtl::OUStringBuffer sText;
visitChildren(boost::bind(
- (rtl::OUStringBuffer& (rtl::OUStringBuffer::*)(const sal_Unicode* str))&rtl::OUStringBuffer::append,
+ (rtl::OUStringBuffer& (rtl::OUStringBuffer::*)(const rtl::OUString& str))&rtl::OUStringBuffer::append,
boost::ref(sText),
boost::bind(&xml::dom::XNode::getNodeValue,
_1)),
@@ -2385,7 +2385,7 @@ struct ShapeRenderingVisitor
// collect text from all TEXT_NODE children into sText
rtl::OUStringBuffer sText;
visitChildren(boost::bind(
- (rtl::OUStringBuffer& (rtl::OUStringBuffer::*)(const sal_Unicode* str))&rtl::OUStringBuffer::append,
+ (rtl::OUStringBuffer& (rtl::OUStringBuffer::*)(const rtl::OUString& str))&rtl::OUStringBuffer::append,
boost::ref(sText),
boost::bind(&xml::dom::XNode::getNodeValue,
_1)),
commit 3a15dc9d9e810437fcfb1f530120e9cc1f58d139
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Mar 1 12:12:27 2011 +0000
avoid implicit casting
diff --git a/binfilter/bf_sw/source/filter/xml/sw_xmlimp.cxx b/binfilter/bf_sw/source/filter/xml/sw_xmlimp.cxx
index 6557104..3d8b5c8 100644
--- a/binfilter/bf_sw/source/filter/xml/sw_xmlimp.cxx
+++ b/binfilter/bf_sw/source/filter/xml/sw_xmlimp.cxx
@@ -1069,7 +1069,7 @@ void main()
if( !bIsUserSetting )
{
// test over the hash value if the entry is in the table.
- const sal_Unicode* p = pValues->Name;
+ const sal_Unicode* p = pValues->Name.getStr();
for( ULONG nLen = pValues->Name.getLength(); nLen; --nLen, ++p )
nHash = (nHash * nPrime) ^ ( *p - nSub );
nHash %= SAL_N_ELEMENTS( aNotSetArr );
diff --git a/binfilter/bf_sw/source/filter/xml/sw_xmltbli.cxx b/binfilter/bf_sw/source/filter/xml/sw_xmltbli.cxx
index cc865f1..156dd42 100644
--- a/binfilter/bf_sw/source/filter/xml/sw_xmltbli.cxx
+++ b/binfilter/bf_sw/source/filter/xml/sw_xmltbli.cxx
@@ -1960,7 +1960,7 @@ SwTableBox *SwXMLTableContext::MakeTableBox(
{
// set style
const SfxItemSet *pAutoItemSet = 0;
- if( pCell->GetStartNode() && sStyleName &&
+ if( pCell->GetStartNode() && sStyleName.getLength() &&
GetSwImport().FindAutomaticStyle(
XML_STYLE_FAMILY_TABLE_CELL, sStyleName, &pAutoItemSet ) )
{
commit c3043e1dad25db33465dfd77443d9e5401931756
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Mar 1 12:11:35 2011 +0000
remove some warnings
diff --git a/binfilter/bf_sw/source/filter/xml/sw_swxml.cxx b/binfilter/bf_sw/source/filter/xml/sw_swxml.cxx
index 40434bb..3bc0365 100644
--- a/binfilter/bf_sw/source/filter/xml/sw_swxml.cxx
+++ b/binfilter/bf_sw/source/filter/xml/sw_swxml.cxx
@@ -655,17 +655,17 @@ ULONG XMLReader::Read( SwDoc &rDoc, SwPaM &rPaM, const String & rName )
USHORT XMLReader::GetSectionList( SfxMedium& rMedium,
SvStrings& rStrings ) const
{
- SvStorage* pStg;
+ SvStorage* pLclStg;
Reference< lang::XMultiServiceFactory > xServiceFactory =
::legacy_binfilters::getLegacyProcessServiceFactory();
OSL_ENSURE( xServiceFactory.is(),
"XMLReader::Read: got no service manager" );
- if( xServiceFactory.is() && 0 != ( pStg = rMedium.GetStorage() ) )
+ if( xServiceFactory.is() && 0 != ( pLclStg = rMedium.GetStorage() ) )
{
xml::sax::InputSource aParserInput;
OUString sDocName( RTL_CONSTASCII_USTRINGPARAM( "content.xml" ) );
aParserInput.sSystemId = sDocName;
- SvStorageStreamRef xDocStream = pStg->OpenStream( sDocName,
+ SvStorageStreamRef xDocStream = pLclStg->OpenStream( sDocName,
( STREAM_READ | STREAM_SHARE_DENYWRITE | STREAM_NOCREATE ) );
aParserInput.aInputStream = xDocStream->GetXInputStream();
More information about the Libreoffice-commits
mailing list