[Libreoffice-commits] .: 2 commits - comphelper/inc svtools/source toolkit/source unotools/inc vcl/source vcl/unx

Caolán McNamara caolan at kemper.freedesktop.org
Tue Jan 25 02:34:56 PST 2011


 comphelper/inc/comphelper/oslfile2streamwrap.hxx |   26 +----------------------
 svtools/source/table/tablecontrol_impl.cxx       |    3 --
 toolkit/source/controls/unocontrolmodel.cxx      |    1 
 toolkit/source/helper/unopropertyarrayhelper.cxx |    4 +--
 unotools/inc/unotools/streamwrap.hxx             |    8 -------
 vcl/source/control/scrbar.cxx                    |    1 
 vcl/source/control/spinbtn.cxx                   |    2 -
 vcl/source/fontsubset/cff.cxx                    |    6 ++---
 vcl/source/fontsubset/sft.cxx                    |    4 +--
 vcl/source/gdi/bitmapex.cxx                      |    1 
 vcl/source/gdi/cvtsvm.cxx                        |    2 -
 vcl/source/gdi/outdev.cxx                        |    2 -
 vcl/source/gdi/outdev3.cxx                       |    4 ---
 vcl/source/gdi/pdfextoutdevdata.cxx              |    4 ---
 vcl/source/gdi/pdfwriter_impl.cxx                |    6 -----
 vcl/source/gdi/print3.cxx                        |    5 ----
 vcl/source/glyphs/graphite_layout.cxx            |    3 --
 vcl/source/window/printdlg.cxx                   |    2 -
 vcl/source/window/window.cxx                     |   14 +++---------
 vcl/unx/gtk/window/gtkframe.cxx                  |    6 -----
 vcl/unx/source/gdi/salprnpsp.cxx                 |   11 ---------
 21 files changed, 17 insertions(+), 98 deletions(-)

New commits:
commit bb35dab1d6e2193d38a6908bfc06cfacb13bcadc
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jan 25 10:23:14 2011 +0000

    WaE: gcc 4.6.0 various warnings

diff --git a/comphelper/inc/comphelper/oslfile2streamwrap.hxx b/comphelper/inc/comphelper/oslfile2streamwrap.hxx
index d636666..4d6c454 100644
--- a/comphelper/inc/comphelper/oslfile2streamwrap.hxx
+++ b/comphelper/inc/comphelper/oslfile2streamwrap.hxx
@@ -44,10 +44,7 @@ namespace comphelper
 // FmUnoIOStream,
 // stream zum schreiben un lesen von Daten, basieren  auf File
 //==================================================================
-struct InputStreamWrapper_Base : public ::cppu::WeakImplHelper1<stario::XInputStream> 
-{};
-
-class COMPHELPER_DLLPUBLIC OSLInputStreamWrapper : public InputStreamWrapper_Base
+class COMPHELPER_DLLPUBLIC OSLInputStreamWrapper : public ::cppu::WeakImplHelper1<stario::XInputStream>
 {
     ::osl::Mutex	m_aMutex;
     ::osl::File*	m_pFile;
@@ -58,14 +55,6 @@ public:
     OSLInputStreamWrapper(::osl::File* pStream, sal_Bool bOwner=sal_False);
     virtual ~OSLInputStreamWrapper();
 
-// UNO Anbindung
-    virtual void			SAL_CALL acquire() throw()
-        { InputStreamWrapper_Base::acquire(); }
-    virtual void			SAL_CALL release() throw()
-        { InputStreamWrapper_Base::release(); }
-    virtual ::com::sun::star::uno::Any	SAL_CALL queryInterface(const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException)
-        { return InputStreamWrapper_Base::queryInterface(_rType); }
-
 // stario::XInputStream
     virtual sal_Int32	SAL_CALL	readBytes(staruno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead) throw(stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException);
     virtual sal_Int32	SAL_CALL	readSomeBytes(staruno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead) throw(stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException);
@@ -78,24 +67,13 @@ public:
 // FmUnoOutStream,
 // Datensenke fuer Files
 //==================================================================
-struct OutputStreamWrapper_Base : public ::cppu::WeakImplHelper1<stario::XOutputStream> 
-{};
-
-class COMPHELPER_DLLPUBLIC OSLOutputStreamWrapper : public OutputStreamWrapper_Base
+class COMPHELPER_DLLPUBLIC OSLOutputStreamWrapper : public ::cppu::WeakImplHelper1<stario::XOutputStream>
 {
     ::osl::File&		rFile;
 
 public:
     OSLOutputStreamWrapper(::osl::File& _rFile) :rFile(_rFile) { }
 
-// UNO Anbindung
-    virtual void			SAL_CALL acquire() throw()
-        { OutputStreamWrapper_Base::acquire(); }
-    virtual void			SAL_CALL release() throw()
-        { OutputStreamWrapper_Base::release(); }
-    virtual ::com::sun::star::uno::Any	SAL_CALL queryInterface(const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException)
-        { return OutputStreamWrapper_Base::queryInterface(_rType); }
-
 // stario::XOutputStream
     virtual void SAL_CALL writeBytes(const staruno::Sequence< sal_Int8 >& aData) throw(stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException);
     virtual void SAL_CALL flush() throw(stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException);
diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx
index e7f6c1d..469261f 100644
--- a/svtools/source/table/tablecontrol_impl.cxx
+++ b/svtools/source/table/tablecontrol_impl.cxx
@@ -2005,9 +2005,6 @@ namespace svt { namespace table
     void TableControl_Impl::resizeColumn(const Point& rPoint)
     {
         Pointer aNewPointer(POINTER_ARROW);
-        int headerRowWidth = 0;
-        if(m_pModel->hasRowHeaders())
-            headerRowWidth = m_rAntiImpl.LogicToPixel( Size(m_pModel->getRowHeaderWidth(), 0 ), MAP_APPFONT ).Width();
         int resizingColumn=m_nCurColumn-m_nLeftColumn;
         PColumnModel pColumn = m_pModel->getColumnModel(m_nCurColumn);
         impl_ni_getAccVisibleColWidths();
diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx
index 4c1763f..b6617db 100644
--- a/toolkit/source/controls/unocontrolmodel.cxx
+++ b/toolkit/source/controls/unocontrolmodel.cxx
@@ -438,6 +438,7 @@ sal_Bool UnoControlModel::ImplHasProperty( sal_uInt16 nPropId ) const
                                 break;
                         }
                     DBG_ASSERT( bLegacy || pAllCurrencies != pAllCurrenciesEnd, "UnoControlModel::ImplGetDefaultValue: did not find the given bank symbol!" );
+                    (void)bLegacy;
                 }
 
                 aDefault <<= sCurrencySymbol;
diff --git a/toolkit/source/helper/unopropertyarrayhelper.cxx b/toolkit/source/helper/unopropertyarrayhelper.cxx
index 3f8c814..60a5e2a 100644
--- a/toolkit/source/helper/unopropertyarrayhelper.cxx
+++ b/toolkit/source/helper/unopropertyarrayhelper.cxx
@@ -84,13 +84,13 @@ sal_Bool UnoPropertyArrayHelper::fillPropertyMembersByHandle( ::rtl::OUString *
     {
         sal_uInt16 nId = sal::static_int_cast< sal_uInt16 >(
             maIDs.GetObjectKey( s ));
-        aSortedPropsIds.Insert( 1+GetPropertyOrderNr( nId ), (void*)(sal_uInt32)nId );
+        aSortedPropsIds.Insert( 1+GetPropertyOrderNr( nId ), (void*)(sal_uIntPtr)nId );
 
         if ( nId == BASEPROPERTY_FONTDESCRIPTOR )
         {
             // Einzelproperties...
             for ( sal_uInt16 i = BASEPROPERTY_FONTDESCRIPTORPART_START; i <= BASEPROPERTY_FONTDESCRIPTORPART_END; i++ )
-                aSortedPropsIds.Insert( 1+GetPropertyOrderNr( i ), (void*)(sal_uInt32)i );
+                aSortedPropsIds.Insert( 1+GetPropertyOrderNr( i ), (void*)(sal_uIntPtr)i );
         }
     }
 
diff --git a/unotools/inc/unotools/streamwrap.hxx b/unotools/inc/unotools/streamwrap.hxx
index 80cde76..4b53500 100644
--- a/unotools/inc/unotools/streamwrap.hxx
+++ b/unotools/inc/unotools/streamwrap.hxx
@@ -51,7 +51,7 @@ namespace utl
 //==================================================================
 typedef ::cppu::WeakImplHelper1	<	stario::XInputStream
                                 > InputStreamWrapper_Base;
-    // needed for some compilers
+// needed for some compilers
 /// helper class for wrapping an SvStream into an <type scope="com.sun.star.io">XInputStream</type>
 class UNOTOOLS_DLLPUBLIC OInputStreamWrapper : public InputStreamWrapper_Base
 {
@@ -69,9 +69,6 @@ public:
     OInputStreamWrapper(SvStream* pStream, sal_Bool bOwner=sal_False);
     virtual ~OInputStreamWrapper();
 
-// UNO Anbindung
-    DECLARE_UNO3_AGG_DEFAULTS(OInputStreamWrapper, InputStreamWrapper_Base);
-
 // stario::XInputStream
     virtual sal_Int32	SAL_CALL	readBytes(staruno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead) throw(stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException);
     virtual sal_Int32	SAL_CALL	readSomeBytes(staruno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead) throw(stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException);
@@ -122,9 +119,6 @@ protected:
 public:
     OOutputStreamWrapper(SvStream& _rStream) :rStream(_rStream) { }
 
-// UNO Anbindung
-    DECLARE_UNO3_AGG_DEFAULTS(OOutputStreamWrapper, OutputStreamWrapper_Base);
-
 // stario::XOutputStream
     virtual void SAL_CALL writeBytes(const staruno::Sequence< sal_Int8 >& aData) throw(stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException);
     virtual void SAL_CALL flush() throw(stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException);
diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx
index eacb6ed..4967813 100644
--- a/vcl/source/control/scrbar.cxx
+++ b/vcl/source/control/scrbar.cxx
@@ -245,7 +245,6 @@ void ScrollBar::ImplUpdateRects( BOOL bUpdate )
     }
     else
     {
-        Size aScrBarSize = GetOutputSizePixel();
         if ( GetStyle() & WB_HORZ )
         {
             const long nSpace = maTrackRect.Right() - maTrackRect.Left();
diff --git a/vcl/source/control/spinbtn.cxx b/vcl/source/control/spinbtn.cxx
index 703733c..cedcb47 100644
--- a/vcl/source/control/spinbtn.cxx
+++ b/vcl/source/control/spinbtn.cxx
@@ -323,8 +323,6 @@ void SpinButton::MouseMove( const MouseEvent& rMEvt )
 
 void SpinButton::KeyInput( const KeyEvent& rKEvt )
 {
-    KeyCode aCode = rKEvt.GetKeyCode();
-
     if ( !rKEvt.GetKeyCode().GetModifier() )
     {
         switch ( rKEvt.GetKeyCode().GetCode() )
diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx
index 8536961..96581da 100644
--- a/vcl/source/fontsubset/cff.cxx
+++ b/vcl/source/fontsubset/cff.cxx
@@ -1306,13 +1306,12 @@ void CffSubsetterContext::callType2Subr( bool bGlobal, int nSubrNumber)
     const U8* const pOldReadPtr = mpReadPtr;
     const U8* const pOldReadEnd = mpReadEnd;
 
-    int nLen = 0;
     if( bGlobal ) {
         nSubrNumber += mnGlobalSubrBias;
-        nLen = seekIndexData( mnGlobalSubrBase, nSubrNumber);
+        seekIndexData( mnGlobalSubrBase, nSubrNumber);
     } else {
         nSubrNumber += mpCffLocal->mnLocalSubrBias;
-        nLen = seekIndexData( mpCffLocal->mnLocalSubrBase, nSubrNumber);
+        seekIndexData( mpCffLocal->mnLocalSubrBase, nSubrNumber);
     }
 
     while( mpReadPtr < mpReadEnd)
@@ -1754,6 +1753,7 @@ int CffSubsetterContext::getFDSelect( int nGlyphIndex) const
                 assert( nRangeCount <= mnCharStrCount);
                 U16 nPrev = (pReadPtr[2]<<8) + pReadPtr[3];
                 assert( nPrev == 0);
+                (void)nPrev;
                 pReadPtr += 4;
                 // TODO? binary search
                 for( int i = 0; i < nRangeCount; ++i) {
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index d13e559..038e569 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -1333,7 +1333,7 @@ static sal_uInt32 getGlyph4(const sal_uInt8 *cmap, sal_uInt32 c) {
     sal_uInt16 * idDelta;
     /* sal_uInt16 * glyphIdArray; */
     sal_uInt16 * idRangeOffset;
-    sal_uInt16 * glyphIndexArray;
+    /*sal_uInt16 * glyphIndexArray;*/
     sal_uInt16  *CMAP4 = (sal_uInt16 *) cmap;
     /* sal_uInt16  GEbinsearch(sal_uInt16 *ar, sal_uInt16 length, sal_uInt16 toSearch); */
 
@@ -1351,7 +1351,7 @@ static sal_uInt32 getGlyph4(const sal_uInt8 *cmap, sal_uInt32 c) {
     }
     idDelta = startCode + segCount;
     idRangeOffset = idDelta + segCount;
-    glyphIndexArray = idRangeOffset + segCount;
+    /*glyphIndexArray = idRangeOffset + segCount;*/
 
     if(Int16FromMOTA(idRangeOffset[i]) != 0) {
         c = Int16FromMOTA(*(&(idRangeOffset[i]) + (Int16FromMOTA(idRangeOffset[i])/2 + (c - Int16FromMOTA(startCode[i])))));
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index f63c0fe..ccd2672 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -793,7 +793,6 @@ BitmapEx BitmapEx:: AutoScaleBitmap(BitmapEx & aBitmap, const long aStandardSize
         imgposY = (aStandardSize - imgOldHeight) / 2 + 0.5;
     }
 
-    Size aBmpSize = aRet.GetSizePixel();
     Size aStdSize( aStandardSize, aStandardSize );
     Rectangle aRect(aEmptyPoint, aStdSize );
 
diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx
index a2bbd6e..19bbd7e 100644
--- a/vcl/source/gdi/cvtsvm.cxx
+++ b/vcl/source/gdi/cvtsvm.cxx
@@ -1380,7 +1380,6 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
 
 void SVMConverter::ImplConvertToSVM1( SvStream& rOStm, GDIMetaFile& rMtf )
 {
-    ULONG				nPos;
     ULONG				nCountPos;
     Font				aSaveFont;
     const USHORT		nOldFormat = rOStm.GetNumberFormatInt();
@@ -1395,7 +1394,6 @@ void SVMConverter::ImplConvertToSVM1( SvStream& rOStm, GDIMetaFile& rMtf )
 
     //MagicCode schreiben
     rOStm << "SVGDI";                                   // Kennung
-    nPos = rOStm.Tell();
     rOStm << (INT16) 42;								// HeaderSize
     rOStm << (INT16) 200;								// VERSION
     rOStm << (INT32) aPrefSize.Width();
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index ecb29ff..567a63a 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -4376,7 +4376,6 @@ void OutputDevice::ImplDrawEmphasisMark( long nBaseX, long nX, long nY,
 
 void OutputDevice::ImplDrawEmphasisMarks( SalLayout& rSalLayout )
 {
-    Color               aOldColor       = GetTextColor();
     Color               aOldLineColor   = GetLineColor();
     Color               aOldFillColor   = GetFillColor();
     BOOL                bOldMap         = mbMap;
@@ -4793,7 +4792,6 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,
                         if ( xHyph.is() )
                         {
                             sal_Unicode cAlternateReplChar = 0;
-                            sal_Unicode cAlternateExtraChar = 0;
                             i18n::Boundary aBoundary = xBI->getWordBoundary( aText, nBreakPos, rDefLocale, ::com::sun::star::i18n::WordType::DICTIONARY_WORD, sal_True );
                 //		    sal_uInt16 nWordStart = nBreakPos;
                 //		    sal_uInt16 nBreakPos_OLD = nBreakPos;
@@ -4867,8 +4865,6 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,
 
                                             if ( nTxtEnd > nTxtStart )
                                                 cAlternateReplChar = aAlt.GetChar( nAltStart );
-                                            else
-                                                cAlternateExtraChar = aAlt.GetChar( nAltStart );
 
                                             nBreakPos = nWordStart + nTxtStart;
                                             if ( cAlternateReplChar )
diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx
index 9dcc7d9..b04d460 100644
--- a/vcl/source/gdi/pdfextoutdevdata.cxx
+++ b/vcl/source/gdi/pdfextoutdevdata.cxx
@@ -411,13 +411,11 @@ sal_Bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIM
             break;
             case PDFExtOutDevDataSync::EndGroupGfxLink :
             {
-                sal_Int32 nTransparency;
                 Rectangle aOutputRect, aVisibleOutputRect;
                 Graphic   aGraphic( mGraphics.front() );
 
                 mGraphics.pop_front();
-                nTransparency = mParaInts.front();
-                mParaInts.pop_front();
+                mParaInts.pop_front(); //Transparency
                 aOutputRect = mParaRects.front();
                 mParaRects.pop_front();
                 aVisibleOutputRect = mParaRects.front();
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 1551182..d5d3a89 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -3200,7 +3200,6 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
         return aRet;
     }
 
-    sal_Int32 nFontObject = 0;
     sal_Int32 nStreamObject = 0;
     sal_Int32 nFontDescriptor = 0;
 
@@ -3655,8 +3654,6 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
             if( ! writeBuffer( aLine.getStr(), aLine.getLength() ) )
                 throw FontException();
             
-            nFontObject = nObject;
-            
             aRet[ rEmbed.m_nNormalFontID ] = nObject;
             
             // write additional encodings
@@ -4629,7 +4626,6 @@ we check in the following sequence:
                     bSetRelative = true;
 
                 rtl::OUString aFragment = aTargetURL.GetMark( INetURLObject::NO_DECODE /*DECODE_WITH_CHARSET*/ ); //fragment as is,
-                bool bIsURI=false; //URI: 12.6.4.7, URI Actions, URI must be encoded in 7-bit-ASCII
                 if( nSetGoToRMode == 0 )
                 {
                     switch( m_aContext.DefaultLinkAction )
@@ -4638,7 +4634,6 @@ we check in the following sequence:
                     case PDFWriter::URIAction :
                     case PDFWriter::URIActionDestination :
                         aLine.append( "/URI/URI" );
-                        bIsURI=true;
                         break;
                     case PDFWriter::LaunchAction:
 // now:
@@ -4652,7 +4647,6 @@ we check in the following sequence:
                                         eTargetProtocol != INET_PROT_FILE )
                         {
                             aLine.append( "/URI/URI" );
-                            bIsURI=true;
                         }
                         else
                         {
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index e2f3d82..ce14bce 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -76,13 +76,8 @@ class ImplPageCache
     {
         if( maCacheRanking[0] != nLastHit )
         {
-            bool bMove = false;
             for( sal_Int32 i = nCacheSize-1; i > 0; i-- )
-            {
-                if( maCacheRanking[i] == nLastHit )
-                    bMove = true;
                 maCacheRanking[i] = maCacheRanking[i-1];
-            }
             maCacheRanking[0] = nLastHit;
         }
     }
diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx
index 7428f1d..af97115 100644
--- a/vcl/source/glyphs/graphite_layout.cxx
+++ b/vcl/source/glyphs/graphite_layout.cxx
@@ -179,7 +179,6 @@ GraphiteLayout::Glyphs::fill_from(gr::Segment & rSegment, ImplLayoutArgs &rArgs,
     int nChar = rArgs.mnEndCharPos - rArgs.mnMinCharPos;
     glyph_range_t iGlyphs = rSegment.glyphs();
     int nGlyphs = iGlyphs.second - iGlyphs.first;
-    gr::GlyphIterator prevBase = iGlyphs.second;
     float fSegmentAdvance = rSegment.advanceWidth();
     float fMinX = fSegmentAdvance;
     float fMaxX = 0.0f;
@@ -1349,12 +1348,10 @@ void GraphiteLayout::GetCaretPositions( int nArraySize, sal_Int32* pCaretXArray
                     break;
                 }
             }
-            long nGWidth = gi.mnNewWidth;
             // if no match position at end of cluster
             if (nGlyph == static_cast<int>(mvGlyphs.size()) ||
                 mvGlyphs[nGlyph].IsClusterStart())
             {
-                nGWidth = prevClusterWidth;
                 if (bRtl)
                 {
                     pCaretXArray[i+1] = gi.maLinearPos.X();
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 0cb19c5..4b3b0ec 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -1095,7 +1095,6 @@ void PrintDialog::setupOptionalUI()
         rOptions[i].Value >>= aOptProp;
 
         // extract ui element
-        bool bEnabled = true;
         rtl::OUString aCtrlType;
         rtl::OUString aText;
         rtl::OUString aPropertyName;
@@ -1133,7 +1132,6 @@ void PrintDialog::setupOptionalUI()
             {
                 sal_Bool bValue = sal_True;
                 rEntry.Value >>= bValue;
-                bEnabled = bValue;
             }
             else if( rEntry.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "GroupingHint" ) ) )
             {
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index bd893bf..a019cdc 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -1287,7 +1287,10 @@ void Window::ImplLoadRes( const ResId& rResId )
     if ( nObjMask & WINDOW_QUICKTEXT )
         SetQuickHelpText( ReadStringRes() );
     if ( nObjMask & WINDOW_EXTRALONG )
-        SetData( (void*)ReadLongRes() );
+    {
+        sal_uIntPtr nRes = ReadLongRes();
+        SetData( (void*)nRes );
+    }
     if ( nObjMask & WINDOW_UNIQUEID )
         SetUniqueId( (ULONG)ReadLongRes() );
 
@@ -3182,7 +3185,6 @@ void Window::ImplPosSizeWindow( long nX, long nY,
 {
     BOOL    bNewPos         = FALSE;
     BOOL    bNewSize        = FALSE;
-    BOOL    bNewWidth       = FALSE;
     BOOL    bCopyBits       = FALSE;
     long    nOldOutOffX     = mnOutOffX;
     long    nOldOutOffY     = mnOutOffY;
@@ -3225,7 +3227,6 @@ void Window::ImplPosSizeWindow( long nX, long nY,
             mnOutWidth = nWidth;
             bNewSize = TRUE;
             bCopyBits = FALSE;
-            bNewWidth = TRUE;
         }
     }
     if ( nFlags & WINDOW_POSSIZE_HEIGHT )
@@ -5941,8 +5942,6 @@ void Window::SetWindowRegionPixel( const Region& rRegion )
     }
     else
     {
-        BOOL bInvalidate = FALSE;
-
         if ( rRegion.GetType() == REGION_NULL )
         {
             if ( mpWindowImpl->mbWinRegion )
@@ -5950,7 +5949,6 @@ void Window::SetWindowRegionPixel( const Region& rRegion )
                 mpWindowImpl->maWinRegion = Region( REGION_NULL );
                 mpWindowImpl->mbWinRegion = FALSE;
                 ImplSetClipFlag();
-                bInvalidate = TRUE;
             }
         }
         else
@@ -5958,7 +5956,6 @@ void Window::SetWindowRegionPixel( const Region& rRegion )
             mpWindowImpl->maWinRegion = rRegion;
             mpWindowImpl->mbWinRegion = TRUE;
             ImplSetClipFlag();
-            bInvalidate = TRUE;
         }
 
         if ( IsReallyVisible() )
@@ -9788,9 +9785,6 @@ void Window::PaintToDevice( OutputDevice* pDev, const Point& rPos, const Size& /
     DBG_ASSERT( ! pDev->ImplHasMirroredGraphics(), "PaintToDevice to mirroring graphics" );
     DBG_ASSERT( ! pDev->IsRTLEnabled(), "PaintToDevice to mirroring device" );
 
-
-    Point       aPos  = pDev->LogicToPixel( rPos );
-
     Window* pRealParent = NULL;
     if( ! mpWindowImpl->mbVisible )
     {
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 636450c..cfd8b3b 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -1610,8 +1610,6 @@ void GtkSalFrame::SetWindowState( const SalFrameState* pState )
         USHORT nPosSizeFlags = 0;
         long nX			= pState->mnX - (m_pParent ? m_pParent->maGeometry.nX : 0);
         long nY			= pState->mnY - (m_pParent ? m_pParent->maGeometry.nY : 0);
-        long nWidth		= pState->mnWidth;
-        long nHeight	= pState->mnHeight;
         if( pState->mnMask & SAL_FRAMESTATE_MASK_X )
             nPosSizeFlags |= SAL_FRAME_POSSIZE_X;
         else
@@ -1622,12 +1620,8 @@ void GtkSalFrame::SetWindowState( const SalFrameState* pState )
             nY = maGeometry.nY - (m_pParent ? m_pParent->maGeometry.nY : 0);
         if( pState->mnMask & SAL_FRAMESTATE_MASK_WIDTH )
             nPosSizeFlags |= SAL_FRAME_POSSIZE_WIDTH;
-        else
-            nWidth = maGeometry.nWidth;
         if( pState->mnMask & SAL_FRAMESTATE_MASK_HEIGHT )
             nPosSizeFlags |= SAL_FRAME_POSSIZE_HEIGHT;
-        else
-            nHeight = maGeometry.nHeight;
         SetPosSize( nX, nY, pState->mnWidth, pState->mnHeight, nPosSizeFlags );
     }
     if( pState->mnMask & SAL_FRAMESTATE_MASK_STATE && ! isChild() )
diff --git a/vcl/unx/source/gdi/salprnpsp.cxx b/vcl/unx/source/gdi/salprnpsp.cxx
index 16872f9..13633bc 100644
--- a/vcl/unx/source/gdi/salprnpsp.cxx
+++ b/vcl/unx/source/gdi/salprnpsp.cxx
@@ -674,17 +674,6 @@ BOOL PspSalInfoPrinter::SetData(
         // merge papersize if necessary
         if( nSetDataFlags & SAL_JOBSET_PAPERSIZE )
         {
-            int nWidth, nHeight;
-            if( pJobSetup->meOrientation == ORIENTATION_PORTRAIT )
-            {
-                nWidth	= pJobSetup->mnPaperWidth;
-                nHeight	= pJobSetup->mnPaperHeight;
-            }
-            else
-            {
-                nWidth	= pJobSetup->mnPaperHeight;
-                nHeight	= pJobSetup->mnPaperWidth;
-            }
             String aPaper;
 
             if( pJobSetup->mePaperFormat == PAPER_USER )
commit 656bbe9a1ec296180cd0082f77ec78ee2cc3472f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jan 24 16:37:47 2011 +0000

    this looks wrong

diff --git a/vcl/source/gdi/outdev.cxx b/vcl/source/gdi/outdev.cxx
index 5fe5755..addc044 100644
--- a/vcl/source/gdi/outdev.cxx
+++ b/vcl/source/gdi/outdev.cxx
@@ -1863,7 +1863,7 @@ void OutputDevice::SetTriangleClipRegion( const PolyPolygon &rPolyPolygon )
     // play nice with the rest of the system and provide an old-style region.
     // the rest of this method does not rely on this.
     maRegion = Region::GetRegionFromPolyPolygon( LogicToPixel(rPolyPolygon) );
-    maRegion.Move(offset_x,offset_x);
+    maRegion.Move(offset_x,offset_y);
 
     // feed region to metafile
     if ( mpMetaFile )


More information about the Libreoffice-commits mailing list