[Libreoffice-commits] .: vcl/unx
David Tardon
dtardon at kemper.freedesktop.org
Mon Jan 3 23:23:46 PST 2011
vcl/unx/kde/salnativewidgets-kde.cxx | 4 ++++
vcl/unx/source/fontmanager/fontmanager.cxx | 2 +-
vcl/unx/source/fontmanager/parseAFM.cxx | 3 ++-
vcl/unx/source/gdi/cdeint.cxx | 2 +-
vcl/unx/source/gdi/makefile.mk | 1 +
vcl/unx/source/gdi/salbmp.cxx | 2 +-
vcl/unx/source/gdi/xlfd_attr.cxx | 12 +++++++++++-
vcl/unx/source/printer/cupsmgr.cxx | 5 ++---
vcl/unx/source/printer/ppdparser.cxx | 3 ++-
vcl/unx/source/printergfx/printerjob.cxx | 8 ++++----
10 files changed, 29 insertions(+), 13 deletions(-)
New commits:
commit 0125f70ada5cefa51687f5b06f39ed1f68b53cb9
Author: David Tardon <dtardon at redhat.com>
Date: Wed Dec 15 08:08:30 2010 +0100
remove reference to sun bugtracker
diff --git a/vcl/unx/kde/salnativewidgets-kde.cxx b/vcl/unx/kde/salnativewidgets-kde.cxx
index c15e617..010ba59 100644
--- a/vcl/unx/kde/salnativewidgets-kde.cxx
+++ b/vcl/unx/kde/salnativewidgets-kde.cxx
@@ -394,7 +394,11 @@ WidgetPainter::WidgetPainter( void )
m_pToolBarVert( NULL ),
m_pToolButton( NULL ),
m_pMenuBar( NULL ),
+ m_nMenuBarEnabledItem( 0 ),
+ m_nMenuBarDisabledItem( 0 ),
m_pPopupMenu( NULL ),
+ m_nPopupMenuEnabledItem( 0 ),
+ m_nPopupMenuDisabledItem( 0 ),
m_pProgressBar( NULL )
{
}
diff --git a/vcl/unx/source/fontmanager/fontmanager.cxx b/vcl/unx/source/fontmanager/fontmanager.cxx
index c226a99..640648f 100644
--- a/vcl/unx/source/fontmanager/fontmanager.cxx
+++ b/vcl/unx/source/fontmanager/fontmanager.cxx
@@ -755,7 +755,6 @@ bool PrintFontManager::PrintFont::readAfmMetrics( const OString& rFileName, Mult
{
PrintFontManager& rManager( PrintFontManager::get() );
- int i;
FontInfo* pInfo = NULL;
parseFile( rFileName.getStr(), &pInfo, P_ALL );
if( ! pInfo || ! pInfo->numOfChars )
@@ -969,6 +968,7 @@ bool PrintFontManager::PrintFont::readAfmMetrics( const OString& rFileName, Mult
// note: this only works with single byte encodings
sal_Unicode* pUnicodes = (sal_Unicode*)alloca( pInfo->numOfChars * sizeof(sal_Unicode));
CharMetricInfo* pChar = pInfo->cmi;
+ int i;
for( i = 0; i < pInfo->numOfChars; i++, pChar++ )
{
diff --git a/vcl/unx/source/fontmanager/parseAFM.cxx b/vcl/unx/source/fontmanager/parseAFM.cxx
index bc35b29..2076b74 100644
--- a/vcl/unx/source/fontmanager/parseAFM.cxx
+++ b/vcl/unx/source/fontmanager/parseAFM.cxx
@@ -1421,7 +1421,7 @@ int parseFile( const char* pFilename, FontInfo** fi, FLAGS flags)
void
freeFontInfo (FontInfo *fi)
{
- int i, j;
+ int i;
if (fi->gfi)
{
@@ -1475,6 +1475,7 @@ freeFontInfo (FontInfo *fi)
for (i = 0; i < fi->numOfComps; i++)
{
free (fi->ccd[i].ccName);
+ int j;
for (j = 0; j < fi->ccd[i].numOfPieces; j++)
free (fi->ccd[i].pieces[j].pccName);
diff --git a/vcl/unx/source/gdi/cdeint.cxx b/vcl/unx/source/gdi/cdeint.cxx
index a1b43fe..e18554a 100644
--- a/vcl/unx/source/gdi/cdeint.cxx
+++ b/vcl/unx/source/gdi/cdeint.cxx
@@ -73,7 +73,6 @@ void CDEIntegrator::GetSystemLook( AllSettings& rSettings )
int nStringCount;
XTextProperty aTextProperty;
aTextProperty.value = 0;
- int i;
static Atom nResMgrAtom = XInternAtom( mpDisplay, "RESOURCE_MANAGER", False );
@@ -89,6 +88,7 @@ void CDEIntegrator::GetSystemLook( AllSettings& rSettings )
// *n*ColorPalette: palettefile
ByteString aLines;
+ int i;
for( i=0; i < nStringCount; i++ )
aLines += ppStringList[i];
for( i = aLines.GetTokenCount( '\n' )-1; i >= 0; i-- )
diff --git a/vcl/unx/source/gdi/makefile.mk b/vcl/unx/source/gdi/makefile.mk
index 65d775b..871d12a 100644
--- a/vcl/unx/source/gdi/makefile.mk
+++ b/vcl/unx/source/gdi/makefile.mk
@@ -73,6 +73,7 @@ EXCEPTIONSFILES=\
$(SLO)$/salgdi3.obj \
$(SLO)$/salvd.obj \
$(SLO)$/xfont.obj \
+ $(SLO)$/xlfd_attr.obj \
$(SLO)$/xlfd_extd.obj
.IF "$(USE_XPRINT)" == "TRUE"
diff --git a/vcl/unx/source/gdi/salbmp.cxx b/vcl/unx/source/gdi/salbmp.cxx
index 1dadfdb..59a9d64 100644
--- a/vcl/unx/source/gdi/salbmp.cxx
+++ b/vcl/unx/source/gdi/salbmp.cxx
@@ -783,11 +783,11 @@ bool X11SalBitmap::Create( const ::com::sun::star::uno::Reference< ::com::sun::s
{
::com::sun::star::uno::Reference< ::com::sun::star::beans::XFastPropertySet > xFastPropertySet( xBitmapCanvas, ::com::sun::star::uno::UNO_QUERY );
if( xFastPropertySet.get() ) {
- long pixmapHandle;
sal_Int32 depth;
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > args;
if( xFastPropertySet->getFastPropertyValue(bMask ? 2 : 1) >>= args ) {
+ long pixmapHandle;
if( ( args[1] >>= pixmapHandle ) && ( args[2] >>= depth ) ) {
mbGrey = bMask;
diff --git a/vcl/unx/source/gdi/xlfd_attr.cxx b/vcl/unx/source/gdi/xlfd_attr.cxx
index 787832e..4146590 100644
--- a/vcl/unx/source/gdi/xlfd_attr.cxx
+++ b/vcl/unx/source/gdi/xlfd_attr.cxx
@@ -28,6 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
+#include <memory>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -542,7 +543,16 @@ AttributeStorage::Enlarge()
else
{
mnSize = mnSize < 32768 ? (mnSize * 2) : 65535;
- mpList = (Attribute*) realloc( mpList, mnSize * sizeof(Attribute) );
+ Attribute* pTemp;
+ pTemp = (Attribute*) realloc( mpList, mnSize * sizeof(Attribute) );
+ if (pTemp)
+ {
+ mpList = pTemp;
+ }
+ else
+ {
+ throw std::bad_alloc();
+ }
}
}
diff --git a/vcl/unx/source/printer/cupsmgr.cxx b/vcl/unx/source/printer/cupsmgr.cxx
index acfabf1..1e750f5 100644
--- a/vcl/unx/source/printer/cupsmgr.cxx
+++ b/vcl/unx/source/printer/cupsmgr.cxx
@@ -440,7 +440,6 @@ void CUPSManager::runDests()
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "starting cupsGetDests\n" );
#endif
- int nDests = 0;
cups_dest_t* pDests = NULL;
// #i86306# prepare against really broken CUPS installations / missing servers
@@ -460,7 +459,7 @@ void CUPSManager::runDests()
// prepare against a signal during FcInit or FcConfigGetCurrent
if( sigsetjmp( aViolationBuffer, ~0 ) == 0 )
{
- nDests = m_pCUPSWrapper->cupsGetDests( &pDests );
+ int nDests = m_pCUPSWrapper->cupsGetDests( &pDests );
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "came out of cupsGetDests\n" );
#endif
@@ -855,7 +854,6 @@ void CUPSManager::getOptionsFromDocumentSetup( const JobData& rJob, int& rNumOpt
{
rNumOptions = 0;
*rOptions = NULL;
- int i;
// emit features ordered to OrderDependency
// ignore features that are set to default
@@ -863,6 +861,7 @@ void CUPSManager::getOptionsFromDocumentSetup( const JobData& rJob, int& rNumOpt
// sanity check
if( rJob.m_pParser == rJob.m_aContext.getParser() && rJob.m_pParser )
{
+ int i;
int nKeys = rJob.m_aContext.countValuesModified();
::std::vector< const PPDKey* > aKeys( nKeys );
for( i = 0; i < nKeys; i++ )
diff --git a/vcl/unx/source/printer/ppdparser.cxx b/vcl/unx/source/printer/ppdparser.cxx
index a9bed0b..5fee6f9 100644
--- a/vcl/unx/source/printer/ppdparser.cxx
+++ b/vcl/unx/source/printer/ppdparser.cxx
@@ -1490,13 +1490,14 @@ void PPDParser::getResolutionFromString(
const String& rString,
int& rXRes, int& rYRes ) const
{
- int nPos = 0, nDPIPos;
+ int nDPIPos;
rXRes = rYRes = 300;
nDPIPos = rString.SearchAscii( "dpi" );
if( nDPIPos != STRING_NOTFOUND )
{
+ int nPos = 0;
if( ( nPos = rString.Search( 'x' ) ) != STRING_NOTFOUND )
{
rXRes = rString.Copy( 0, nPos ).ToInt32();
diff --git a/vcl/unx/source/printergfx/printerjob.cxx b/vcl/unx/source/printergfx/printerjob.cxx
index d5dd983..a3788d5 100644
--- a/vcl/unx/source/printergfx/printerjob.cxx
+++ b/vcl/unx/source/printergfx/printerjob.cxx
@@ -327,12 +327,12 @@ createSpoolDir ()
PrinterJob::~PrinterJob ()
{
std::list< osl::File* >::iterator pPage;
- for (pPage = maPageList.begin(); pPage != maPageList.end(); pPage++)
+ for (pPage = maPageList.begin(); pPage != maPageList.end(); ++pPage)
{
//(*pPage)->remove();
delete *pPage;
}
- for (pPage = maHeaderList.begin(); pPage != maHeaderList.end(); pPage++)
+ for (pPage = maHeaderList.begin(); pPage != maHeaderList.end(); ++pPage)
{
//(*pPage)->remove();
delete *pPage;
@@ -575,7 +575,7 @@ PrinterJob::EndJob ()
std::list< osl::File* >::iterator pPageHead;
for (pPageBody = maPageList.begin(), pPageHead = maHeaderList.begin();
pPageBody != maPageList.end() && pPageHead != maHeaderList.end();
- pPageBody++, pPageHead++)
+ ++pPageBody, ++pPageHead)
{
if( *pPageHead )
{
@@ -806,7 +806,6 @@ static bool writeFeature( osl::File* pFile, const PPDKey* pKey, const PPDValue*
bool PrinterJob::writeFeatureList( osl::File* pFile, const JobData& rJob, bool bDocumentSetup )
{
bool bSuccess = true;
- int i;
// emit features ordered to OrderDependency
// ignore features that are set to default
@@ -817,6 +816,7 @@ bool PrinterJob::writeFeatureList( osl::File* pFile, const JobData& rJob, bool b
( m_aLastJobData.m_pParser == rJob.m_pParser || m_aLastJobData.m_pParser == NULL )
)
{
+ int i;
int nKeys = rJob.m_aContext.countValuesModified();
::std::vector< const PPDKey* > aKeys( nKeys );
for( i = 0; i < nKeys; i++ )
More information about the Libreoffice-commits
mailing list