[Libreoffice-commits] .: 3 commits - binfilter/bf_svtools binfilter/bf_sw binfilter/bf_xmloff binfilter/inc
Caolán McNamara
caolan at kemper.freedesktop.org
Mon Aug 22 01:45:58 PDT 2011
binfilter/bf_svtools/source/config/svt_itemholder1.cxx | 2
binfilter/bf_svtools/source/filter.vcl/filter/svt_FilterConfigCache.cxx | 4
binfilter/bf_svtools/source/filter.vcl/filter/svt_sgvtext.cxx | 43 +++++-----
binfilter/bf_sw/source/core/unocore/sw_unodraw.cxx | 10 --
binfilter/bf_xmloff/source/core/xmloff_XMLEmbeddedObjectImportContext.cxx | 2
binfilter/bf_xmloff/source/core/xmloff_xmlehelp.cxx | 2
binfilter/inc/bf_svtools/sgvmain.hxx | 2
binfilter/inc/bf_sw/redlenum.hxx | 8 -
8 files changed, 33 insertions(+), 40 deletions(-)
New commits:
commit cfa01f5528d7add45cc117090318c398622b41c6
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Aug 22 09:02:44 2011 +0100
get rid of trailing RegOptions spam
diff --git a/binfilter/bf_svtools/source/config/svt_itemholder1.cxx b/binfilter/bf_svtools/source/config/svt_itemholder1.cxx
index 57a87b5..fa18956 100644
--- a/binfilter/bf_svtools/source/config/svt_itemholder1.cxx
+++ b/binfilter/bf_svtools/source/config/svt_itemholder1.cxx
@@ -260,7 +260,6 @@ void ItemHolder1::impl_newItem(TItemInfo& rItem)
break;
case E_REGOPTIONS :
-// no ref count rItem.pItem = new ::svt::RegOptions();
break;
case E_SAVEOPTIONS :
@@ -268,7 +267,6 @@ void ItemHolder1::impl_newItem(TItemInfo& rItem)
break;
case E_SEARCHOPT :
-// no ref count rItem.pItem = new SvtSearchOptions();
break;
case E_SECURITYOPTIONS :
commit b4495e79c75a822503ad8e71fdeead52ce78295c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Aug 21 23:50:20 2011 +0100
various warnings
diff --git a/binfilter/bf_sw/source/core/unocore/sw_unodraw.cxx b/binfilter/bf_sw/source/core/unocore/sw_unodraw.cxx
index b654be2..a64433c 100644
--- a/binfilter/bf_sw/source/core/unocore/sw_unodraw.cxx
+++ b/binfilter/bf_sw/source/core/unocore/sw_unodraw.cxx
@@ -385,15 +385,9 @@ uno::Any SwXDrawPage::getByIndex(sal_Int32 nIndex)
if(!pDoc)
throw uno::RuntimeException();
if(!pDoc->GetDrawModel())
- {
throw IndexOutOfBoundsException();
- }
- else
- {
- ((SwXDrawPage*)this)->GetSvxPage();
- return pDrawPage->getByIndex( nIndex);
- }
- return uno::Any();
+ ((SwXDrawPage*)this)->GetSvxPage();
+ return pDrawPage->getByIndex( nIndex);
}
uno::Type SwXDrawPage::getElementType(void) throw( uno::RuntimeException )
diff --git a/binfilter/bf_xmloff/source/core/xmloff_XMLEmbeddedObjectImportContext.cxx b/binfilter/bf_xmloff/source/core/xmloff_XMLEmbeddedObjectImportContext.cxx
index cbda018..1424f6d 100644
--- a/binfilter/bf_xmloff/source/core/xmloff_XMLEmbeddedObjectImportContext.cxx
+++ b/binfilter/bf_xmloff/source/core/xmloff_XMLEmbeddedObjectImportContext.cxx
@@ -306,7 +306,7 @@ void XMLEmbeddedObjectImportContext::EndElement()
{
xStorable->store();
}
- catch( ::com::sun::star::beans::PropertyVetoException& e )
+ catch (const ::com::sun::star::beans::PropertyVetoException&)
{
Sequence<OUString> aSeq( 0 );
GetImport().SetError( XMLERROR_FLAG_WARNING |
diff --git a/binfilter/bf_xmloff/source/core/xmloff_xmlehelp.cxx b/binfilter/bf_xmloff/source/core/xmloff_xmlehelp.cxx
index 941d427..b83a9c1 100644
--- a/binfilter/bf_xmloff/source/core/xmloff_xmlehelp.cxx
+++ b/binfilter/bf_xmloff/source/core/xmloff_xmlehelp.cxx
@@ -157,7 +157,7 @@ void SvXMLExportHelper::AddLength( sal_Int32 nValue, MapUnit eValueUnit,
}
- sal_Int32 nLongVal;
+ sal_Int32 nLongVal(0);
BOOL bOutLongVal = TRUE;
if( nValue > SAL_MAX_INT32 / nMul )
{
diff --git a/binfilter/inc/bf_sw/redlenum.hxx b/binfilter/inc/bf_sw/redlenum.hxx
index e4e235c..fa6a65c 100644
--- a/binfilter/inc/bf_sw/redlenum.hxx
+++ b/binfilter/inc/bf_sw/redlenum.hxx
@@ -70,20 +70,20 @@ enum SwRedlineMode
REDLINE_DONTCOMBINE_REDLINES = 0x400
};
-inline int IsShowChanges( const USHORT eM )
+inline bool IsShowChanges( const USHORT eM )
{
return (REDLINE_SHOW_INSERT | REDLINE_SHOW_DELETE) ==
(eM & REDLINE_SHOW_MASK);
}
-inline int IsHideChanges( const USHORT eM )
+inline bool IsHideChanges( const USHORT eM )
{
return REDLINE_SHOW_INSERT == (eM & REDLINE_SHOW_MASK);
}
-inline int IsShowOriginal( const USHORT eM )
+inline bool IsShowOriginal( const USHORT eM )
{
return REDLINE_SHOW_DELETE == (eM & REDLINE_SHOW_MASK);
}
-inline int IsRedlineOn( const USHORT eM )
+inline bool IsRedlineOn( const USHORT eM )
{
return REDLINE_ON == (eM & (REDLINE_ON | REDLINE_IGNORE ));
}
commit 73e942b2ec1799e21bfcb2084c675ce6ac0ee0a5
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Aug 20 23:23:35 2011 +0100
mirror these changes in
diff --git a/binfilter/bf_svtools/source/filter.vcl/filter/svt_FilterConfigCache.cxx b/binfilter/bf_svtools/source/filter.vcl/filter/svt_FilterConfigCache.cxx
index 11ba4e6..3845da5 100644
--- a/binfilter/bf_svtools/source/filter.vcl/filter/svt_FilterConfigCache.cxx
+++ b/binfilter/bf_svtools/source/filter.vcl/filter/svt_FilterConfigCache.cxx
@@ -325,8 +325,8 @@ void FilterConfigCache::ImplInitSmart()
aEntry.sType = sExtension;
aEntry.sUIName = sExtension;
- ByteString sFlags( *pPtr++ );
- aEntry.nFlags = sFlags.ToInt32();
+ rtl::OString sFlags( *pPtr++ );
+ aEntry.nFlags = sFlags.toInt32();
OUString sUserData( OUString::createFromAscii( *pPtr ) );
aEntry.CreateFilterName( sUserData );
diff --git a/binfilter/bf_svtools/source/filter.vcl/filter/svt_sgvtext.cxx b/binfilter/bf_svtools/source/filter.vcl/filter/svt_sgvtext.cxx
index ec17f1b..6e10d8d 100644
--- a/binfilter/bf_svtools/source/filter.vcl/filter/svt_sgvtext.cxx
+++ b/binfilter/bf_svtools/source/filter.vcl/filter/svt_sgvtext.cxx
@@ -1158,10 +1158,10 @@ SgfFontOne::SgfFontOne()
SVWidth=40;
}
-void SgfFontOne::ReadOne( ByteString& ID, ByteString& Dsc )
+void SgfFontOne::ReadOne( const rtl::OString& rID, ByteString& Dsc )
{
USHORT i,j,n;
- ByteString s;
+ rtl::OString s;
if ( Dsc.Len() < 4 || ( Dsc.GetChar( 0 ) != '(' ) )
return;
@@ -1182,30 +1182,31 @@ void SgfFontOne::ReadOne( ByteString& ID, ByteString& Dsc )
SVFName=String(Dsc,i+1,j); // SV-Fontname rausholen
Dsc.Erase(i,j);
- IFID = (UINT32)ID.ToInt32();
+ IFID = (UINT32)rID.toInt32();
n=Dsc.GetTokenCount(' ');
for (i=0;i<n;i++)
{
s = Dsc.GetToken( i,' ' );
- if ( s.Len() )
+ if (!s.isEmpty())
{
- s.ToUpperAscii();
- if ( s.CompareTo( "BOLD", 4 ) == COMPARE_EQUAL ) Bold=TRUE;
- else if ( s.CompareTo( "ITAL", 4 ) == COMPARE_EQUAL ) Ital=TRUE;
- else if ( s.CompareTo( "SERF", 4 ) == COMPARE_EQUAL ) Serf=TRUE;
- else if ( s.CompareTo( "SANS", 4 ) == COMPARE_EQUAL ) Sans=TRUE;
- else if ( s.CompareTo( "FIXD", 4 ) == COMPARE_EQUAL ) Fixd=TRUE;
- else if ( s.CompareTo( "ROMAN", 5 ) == COMPARE_EQUAL ) SVFamil=FAMILY_ROMAN;
- else if ( s.CompareTo( "SWISS", 5 ) == COMPARE_EQUAL ) SVFamil=FAMILY_SWISS;
- else if ( s.CompareTo( "MODERN", 6 ) == COMPARE_EQUAL ) SVFamil=FAMILY_MODERN;
- else if ( s.CompareTo( "SCRIPT", 6 ) == COMPARE_EQUAL ) SVFamil=FAMILY_SCRIPT;
- else if ( s.CompareTo( "DECORA", 6 ) == COMPARE_EQUAL ) SVFamil=FAMILY_DECORATIVE;
- else if ( s.CompareTo( "ANSI", 4 ) == COMPARE_EQUAL ) SVChSet=RTL_TEXTENCODING_MS_1252;
- else if ( s.CompareTo( "IBMPC", 5 ) == COMPARE_EQUAL ) SVChSet=RTL_TEXTENCODING_IBM_850;
- else if ( s.CompareTo( "MAC", 3 ) == COMPARE_EQUAL ) SVChSet=RTL_TEXTENCODING_APPLE_ROMAN;
- else if ( s.CompareTo( "SYMBOL", 6 ) == COMPARE_EQUAL ) SVChSet=RTL_TEXTENCODING_SYMBOL;
- else if ( s.CompareTo( "SYSTEM", 6 ) == COMPARE_EQUAL ) SVChSet = gsl_getSystemTextEncoding();
- else if ( comphelper::string::isAsciiDecimalString(s) ) SVWidth=sal::static_int_cast< USHORT >(s.ToInt32());
+ s = s.toAsciiUpperCase();
+ using comphelper::string::matchL;
+ if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("BOLD"))) Bold=sal_True;
+ else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("ITAL"))) Ital=sal_True;
+ else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("SERF"))) Serf=sal_True;
+ else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("SANS"))) Sans=sal_True;
+ else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("FIXD"))) Fixd=sal_True;
+ else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("ROMAN"))) SVFamil=FAMILY_ROMAN;
+ else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("SWISS"))) SVFamil=FAMILY_SWISS;
+ else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("MODERN"))) SVFamil=FAMILY_MODERN;
+ else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("SCRIPT"))) SVFamil=FAMILY_SCRIPT;
+ else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("DECORA"))) SVFamil=FAMILY_DECORATIVE;
+ else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("ANSI"))) SVChSet=RTL_TEXTENCODING_MS_1252;
+ else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("IBMPC"))) SVChSet=RTL_TEXTENCODING_IBM_850;
+ else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("MAC"))) SVChSet=RTL_TEXTENCODING_APPLE_ROMAN;
+ else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("SYMBOL"))) SVChSet=RTL_TEXTENCODING_SYMBOL;
+ else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("SYSTEM"))) SVChSet = gsl_getSystemTextEncoding();
+ else if (comphelper::string::isAsciiDecimalString(s) ) SVWidth=sal::static_int_cast< sal_uInt16 >(s.toInt32());
}
}
}
diff --git a/binfilter/inc/bf_svtools/sgvmain.hxx b/binfilter/inc/bf_svtools/sgvmain.hxx
index a7d9938..94feeac 100644
--- a/binfilter/inc/bf_svtools/sgvmain.hxx
+++ b/binfilter/inc/bf_svtools/sgvmain.hxx
@@ -335,7 +335,7 @@ public:
String SVFName; // z.B. "Times New Roman" = 15 Chars
USHORT SVWidth; // Durchschnittliche Zeichenbreite in %
SgfFontOne();
- void ReadOne( ByteString& ID, ByteString& Dsc);
+ void ReadOne( const rtl::OString& ID, ByteString& Dsc);
};
class SgfFontLst {
More information about the Libreoffice-commits
mailing list