diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-01-23 20:52:54 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-01-23 20:52:54 +0000 |
commit | f878e2dda03154d36eef56c8b8abc3e226d60dfe (patch) | |
tree | 1e55a6e187f15e237b55dcc7afdbb3e311dbedd4 /sfx2 | |
parent | 94f84091a7869e16f57d7f082eb7b77932ce5d97 (diff) |
WaE: gcc 4.6.0 various warnings
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/inc/sfx2/docfile.hxx | 1 | ||||
-rw-r--r-- | sfx2/inc/sfx2/sfxhtml.hxx | 6 | ||||
-rw-r--r-- | sfx2/source/appl/appcfg.cxx | 7 | ||||
-rw-r--r-- | sfx2/source/appl/appserv.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/bastyp/progress.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/bastyp/sfxhtml.cxx | 17 | ||||
-rw-r--r-- | sfx2/source/control/dispatch.cxx | 9 | ||||
-rw-r--r-- | sfx2/source/control/statcach.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/control/unoctitm.cxx | 5 | ||||
-rw-r--r-- | sfx2/source/dialog/dinfdlg.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/dockwin.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/dialog/filedlghelper.cxx | 21 | ||||
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 38 | ||||
-rw-r--r-- | sfx2/source/doc/objcont.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/objxtor.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/doc/sfxbasemodel.cxx | 1 | ||||
-rw-r--r-- | sfx2/source/view/viewprn.cxx | 35 |
18 files changed, 7 insertions, 157 deletions
diff --git a/sfx2/inc/sfx2/docfile.hxx b/sfx2/inc/sfx2/docfile.hxx index 4c359cea4172..a397a6c5cada 100644 --- a/sfx2/inc/sfx2/docfile.hxx +++ b/sfx2/inc/sfx2/docfile.hxx @@ -188,7 +188,6 @@ public: void SetDataAvailableLink( const Link& rLink ); Link GetDataAvailableLink( ) const; - sal_uInt32 GetMIMEAndRedirect( String& ); sal_uInt32 GetErrorCode() const; sal_uInt32 GetError() const { return ERRCODE_TOERROR(GetErrorCode()); } diff --git a/sfx2/inc/sfx2/sfxhtml.hxx b/sfx2/inc/sfx2/sfxhtml.hxx index 14eab02d0a15..86c6f4243b71 100644 --- a/sfx2/inc/sfx2/sfxhtml.hxx +++ b/sfx2/inc/sfx2/sfxhtml.hxx @@ -99,12 +99,6 @@ protected: void StartFileDownload( const String& rURL, int nToken, SfxObjectShell *pSh=0 ); - // Ermittelnd des MIME-Types eines zuvor downloadeten Files. Kann nur - // unmittelbar vor FinishFileDownload aufgerufen werden, nie aber - // danach. - - BOOL GetFileDownloadMIME( String& rMime ); - // Beenden eines asynchronen File-Downloads. Gibt TRUE zurueck, wenn // der Download geklappt hat. Das gelesene File befindet sich dann in // dem uebergeben String. diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx index dfff1bd62ae0..7dcc83cbc7e9 100644 --- a/sfx2/source/appl/appcfg.cxx +++ b/sfx2/source/appl/appcfg.cxx @@ -524,7 +524,6 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet ) const SfxPoolItem *pItem = 0; SfxItemPool &rPool = GetPool(); BOOL bResetSession = FALSE; - BOOL bProxiesModified = FALSE; SvtSaveOptions aSaveOptions; SvtUndoOptions aUndoOptions; @@ -749,7 +748,6 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet ) DBG_ASSERT( pItem->ISA(SfxUInt16Item), "UInt16Item expected" ); aInetOptions.SetProxyType((SvtInetOptions::ProxyType)( (const SfxUInt16Item*)pItem )->GetValue()); bResetSession = TRUE; - bProxiesModified = TRUE; } if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_INET_HTTP_PROXY_NAME ), TRUE, &pItem ) ) @@ -757,35 +755,30 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet ) DBG_ASSERT( pItem->ISA(SfxStringItem), "StringItem expected" ); aInetOptions.SetProxyHttpName( ((const SfxStringItem *)pItem)->GetValue() ); bResetSession = TRUE; - bProxiesModified = TRUE; } if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_INET_HTTP_PROXY_PORT ), TRUE, &pItem ) ) { DBG_ASSERT( pItem->ISA(SfxInt32Item), "Int32Item expected" ); aInetOptions.SetProxyHttpPort( ( (const SfxInt32Item*)pItem )->GetValue() ); bResetSession = TRUE; - bProxiesModified = TRUE; } if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_INET_FTP_PROXY_NAME ), TRUE, &pItem ) ) { DBG_ASSERT( pItem->ISA(SfxStringItem), "StringItem expected" ); aInetOptions.SetProxyFtpName( ((const SfxStringItem *)pItem)->GetValue() ); bResetSession = TRUE; - bProxiesModified = TRUE; } if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_INET_FTP_PROXY_PORT ), TRUE, &pItem ) ) { DBG_ASSERT( pItem->ISA(SfxInt32Item), "Int32Item expected" ); aInetOptions.SetProxyFtpPort( ( (const SfxInt32Item*)pItem )->GetValue() ); bResetSession = TRUE; - bProxiesModified = TRUE; } if ( SFX_ITEM_SET == rSet.GetItemState(SID_INET_NOPROXY, TRUE, &pItem)) { DBG_ASSERT(pItem->ISA(SfxStringItem), "StringItem expected"); aInetOptions.SetProxyNoProxy(((const SfxStringItem *)pItem)->GetValue()); bResetSession = TRUE; - bProxiesModified = TRUE; } // Secure-Referers diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index ebe141b4c79a..4e7ad0cd4bf7 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -335,7 +335,6 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) case SID_SAVEDOCS: { BOOL bOK = TRUE; - BOOL bTmpDone = TRUE; for ( SfxObjectShell *pObjSh = SfxObjectShell::GetFirst(); pObjSh; pObjSh = SfxObjectShell::GetNext( *pObjSh ) ) @@ -345,7 +344,6 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) { pObjSh->ExecuteSlot( aReq ); SfxBoolItem *pItem = PTR_CAST( SfxBoolItem, aReq.GetReturnValue() ); - bTmpDone = aReq.IsDone(); if ( !pItem || !pItem->GetValue() ) bOK = FALSE; } diff --git a/sfx2/source/bastyp/progress.cxx b/sfx2/source/bastyp/progress.cxx index b1bb852679c7..48710912af79 100644 --- a/sfx2/source/bastyp/progress.cxx +++ b/sfx2/source/bastyp/progress.cxx @@ -366,8 +366,6 @@ BOOL SfxProgress::SetState if( pImp->pActiveProgress ) return TRUE; - // neuen Wert "ubernehmen - BOOL bOver=FALSE; nVal = nNewVal; // neuer Range? @@ -376,7 +374,6 @@ BOOL SfxProgress::SetState DBG( DbgOutf( "SfxProgress: range changed from %lu to %lu", pImp->nMax, nNewRange ) ); pImp->nMax = nNewRange; - bOver = TRUE; } if ( !pImp->xStatusInd.is() ) diff --git a/sfx2/source/bastyp/sfxhtml.cxx b/sfx2/source/bastyp/sfxhtml.cxx index 2cbf127a6a75..68b9252a3a25 100644 --- a/sfx2/source/bastyp/sfxhtml.cxx +++ b/sfx2/source/bastyp/sfxhtml.cxx @@ -288,12 +288,6 @@ void SfxHTMLParser::StartFileDownload( const String& rURL, int nToken, } } -BOOL SfxHTMLParser::GetFileDownloadMIME( String& rMIME ) -{ - return pDLMedium && pDLMedium->GetErrorCode()==0 && - pDLMedium->GetMIMEAndRedirect(rMIME)==0; -} - BOOL SfxHTMLParser::FinishFileDownload( String& rStr ) { String aStr; @@ -315,17 +309,6 @@ BOOL SfxHTMLParser::FinishFileDownload( String& rStr ) ? (xub_StrLen)aStream.Tell() : STRING_MAXLEN; - // TODO: untested!!! - rtl_TextEncoding eEnc = - GetExtendedCompatibilityTextEncoding( RTL_TEXTENCODING_ISO_8859_1 ); - String sMime; - if( pDLMedium->GetMIMEAndRedirect( sMime ) == 0 ) - { - rtl_TextEncoding eMimeEnc = GetEncodingByMIME( sMime ); - if( RTL_TEXTENCODING_DONTKNOW != eMimeEnc ) - eEnc = eMimeEnc; - } - ByteString sBuffer; sal_Char* pBuffer = sBuffer.AllocBuffer(nLen); aStream.Seek( 0 ); diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index 66550f2ece22..68dffad969c0 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -1112,7 +1112,6 @@ sal_uInt16 SfxDispatcher::ExecuteFunction( sal_uInt16 nSlot, SfxPoolItem **pArgs eCall = SFX_CALLMODE_ASYNCHRON; else if ( pSlot->GetMode() & SFX_SLOT_ASYNCHRON ) eCall = SFX_CALLMODE_ASYNCHRON; - sal_Bool bDone = sal_False; if ( pArgs && *pArgs ) { SfxAllItemSet aSet( pShell->GetPool() ); @@ -1120,13 +1119,11 @@ sal_uInt16 SfxDispatcher::ExecuteFunction( sal_uInt16 nSlot, SfxPoolItem **pArgs MappedPut_Impl( aSet, **pArg ); SfxRequest aReq( nSlot, eCall, aSet ); _Execute( *pShell, *pSlot, aReq, eCall ); - bDone = aReq.IsDone(); } else { SfxRequest aReq( nSlot, eCall, pShell->GetPool() ); _Execute( *pShell, *pSlot, aReq, eCall ); - bDone = aReq.IsDone(); } } @@ -1169,10 +1166,8 @@ sal_uInt16 SfxDispatcher::ExecuteFunction( sal_uInt16 nSlot, const SfxItemSet& r eCall = SFX_CALLMODE_ASYNCHRON; else if ( pSlot->GetMode() & SFX_SLOT_ASYNCHRON ) eCall = SFX_CALLMODE_ASYNCHRON; - sal_Bool bDone = sal_False; - SfxRequest aReq( nSlot, eCall, rArgs ); - _Execute( *pShell, *pSlot, aReq, eCall ); - bDone = aReq.IsDone(); + SfxRequest aReq( nSlot, eCall, rArgs ); + _Execute( *pShell, *pSlot, aReq, eCall ); } return nRet; diff --git a/sfx2/source/control/statcach.cxx b/sfx2/source/control/statcach.cxx index 5e7b672537f6..efb7aa4b7855 100644 --- a/sfx2/source/control/statcach.cxx +++ b/sfx2/source/control/statcach.cxx @@ -388,7 +388,6 @@ void SfxStateCache::SetVisibleState( BOOL bShow ) { SfxItemState eState( SFX_ITEM_AVAILABLE ); const SfxPoolItem* pState( NULL ); - sal_Bool bNotify( sal_False ); sal_Bool bDeleteItem( sal_False ); if ( bShow != bItemVisible ) @@ -405,7 +404,6 @@ void SfxStateCache::SetVisibleState( BOOL bShow ) pState = pLastItem; eState = eLastState; - bNotify = ( pState != 0 ); } else { diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index 5bbe37d06341..33184a0b2606 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -743,7 +743,6 @@ void SAL_CALL SfxDispatchController_Impl::dispatch( const ::com::sun::star::util aInternalSet.Put( SfxUnoFrameItem( SID_FILLFRAME, xFrameRef ) ); sal_Bool bSuccess = sal_False; - sal_Bool bFailure = sal_False; const SfxPoolItem* pItem = NULL; SfxShell* pShell( 0 ); // #i102619# Retrieve metric from shell before execution - the shell could be destroyed after execution @@ -784,7 +783,6 @@ void SAL_CALL SfxDispatchController_Impl::dispatch( const ::com::sun::star::util pDispatcher->GetBindings()->Execute_Impl( aReq, pSlot, pShell ); pItem = aReq.GetReturnValue(); bSuccess = aReq.IsDone() || pItem != NULL; - bFailure = aReq.IsCancelled(); if ( bVBARequest ) { SFX_REQUEST_ARG( aReq, pDlgRet, SfxBoolItem, SID_DIALOG_RETURN, FALSE ); @@ -834,11 +832,8 @@ void SAL_CALL SfxDispatchController_Impl::dispatch( const ::com::sun::star::util ::com::sun::star::frame::DispatchResultEvent aEvent; if ( bSuccess ) aEvent.State = com::sun::star::frame::DispatchResultState::SUCCESS; -// else if ( bFailure ) else aEvent.State = com::sun::star::frame::DispatchResultState::FAILURE; -// else -// aEvent.State = com::sun::star::frame::DispatchResultState::DONTKNOW; aEvent.Source = (::com::sun::star::frame::XDispatch*) pDispatch; if ( bSuccess && pItem && !pItem->ISA(SfxVoidItem) ) diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 166f80d8a23b..b603c51b4645 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -2077,7 +2077,7 @@ void CustomPropertiesWindow::AddLine( const ::rtl::OUString& sName, Any& rAny ) SvtSysLocale aSysLocale; const LocaleDataWrapper& rLocaleWrapper = aSysLocale.GetLocaleData(); pNewLine->m_aNameBox.SetText( sName ); - sal_Int32 nType = CUSTOM_TYPE_UNKNOWN; + sal_IntPtr nType = CUSTOM_TYPE_UNKNOWN; String sValue; if ( rAny >>= nTmpValue ) diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx index 36839a3eac2e..38bc20b47edf 100644 --- a/sfx2/source/dialog/dockwin.cxx +++ b/sfx2/source/dialog/dockwin.cxx @@ -823,11 +823,8 @@ void SfxDockingWindow::EndDocking( const Rectangle& rRect, BOOL bFloatMode ) SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl(); BOOL bReArrange = FALSE; - SfxChildIdentifier eIdent = SFX_CHILDWIN_DOCKINGWINDOW; if ( pImp->bSplitable ) { - eIdent = SFX_CHILDWIN_SPLITWINDOW; - // Wenn sich das Alignment "andert und das Fenster befindet sich // im angedockten Zustand in einem SplitWindow, mu\s umgemeldet werden // Wenn neu angedockt wird, machen PrepareToggleFloatingMode() diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index 340843dcc234..ebc187bc6669 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -2298,30 +2298,9 @@ void FileDialogHelper_Impl::SetContext( FileDialogHelper::Context _eNewContext ) { meContext = _eNewContext; - sal_Int32 nNewHelpId = 0; - OUString aConfigId; - - switch( _eNewContext ) - { -// #104952# dependency to SVX not allowed! When used again, another solution has to be found -// case FileDialogHelper::SW_INSERT_GRAPHIC: -// case FileDialogHelper::SC_INSERT_GRAPHIC: -// case FileDialogHelper::SD_INSERT_GRAPHIC: nNewHelpId = SID_INSERT_GRAPHIC; break; - case FileDialogHelper::SW_INSERT_SOUND: - case FileDialogHelper::SC_INSERT_SOUND: - case FileDialogHelper::SD_INSERT_SOUND: nNewHelpId = SID_INSERT_SOUND; break; - case FileDialogHelper::SW_INSERT_VIDEO: - case FileDialogHelper::SC_INSERT_VIDEO: - case FileDialogHelper::SD_INSERT_VIDEO: nNewHelpId = SID_INSERT_VIDEO; break; - default: break; - } - const OUString* pConfigId = GetLastFilterConfigId( _eNewContext ); if( pConfigId ) LoadLastUsedFilter( *pConfigId ); - -// if( nNewHelpId ) -// this->setDialogHelpId( nNewHelpId ); } // ------------------------------------------------------------------------ diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 4bc2cb63305c..d08e096733db 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -2358,7 +2358,8 @@ void SfxMedium::GetMedium_Impl() pImp->bDownloadDone = sal_True; pImp->aDoneLink.ClearPendingCall(); - pImp->aDoneLink.Call( (void*) GetError() ); + sal_uIntPtr nError = GetError(); + pImp->aDoneLink.Call( (void*)nError ); } } @@ -2967,12 +2968,10 @@ SfxMedium::SfxMedium( const ::com::sun::star::uno::Sequence< ::com::sun::star::b aFilterName = pFilterNameItem->GetValue(); pFilter = SFX_APP()->GetFilterMatcher().GetFilter4FilterName( aFilterName ); - sal_Bool bSalvage = sal_False; SFX_ITEMSET_ARG( pSet, pSalvageItem, SfxStringItem, SID_DOC_SALVAGE, sal_False ); if( pSalvageItem ) { // QUESTION: there is some treatment of Salvage in Init_Impl; align! - bSalvage = sal_True; if ( pSalvageItem->GetValue().Len() ) { // if an URL is provided in SalvageItem that means that the FileName refers to a temporary file @@ -3095,39 +3094,6 @@ const String& SfxMedium::GetPreRedirectedURL() const { return pImp->aPreRedirectionURL; } -//---------------------------------------------------------------- - -sal_uInt32 SfxMedium::GetMIMEAndRedirect( String& /*rName*/ ) -{ -/* dv !!!! not needed any longer ? - INetProtocol eProt = GetURLObject().GetProtocol(); - if( eProt == INET_PROT_FTP && SvBinding::ShouldUseFtpProxy( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) ) ) - { - Any aAny( UCB_Helper::GetProperty( GetContent(), WID_FLAG_IS_FOLDER ) ); - sal_Bool bIsFolder = FALSE; - if ( ( aAny >>= bIsFolder ) && bIsFolder ) - return ERRCODE_NONE; - } - - GetMedium_Impl(); - if( !eError && pImp->xBinding.Is() ) - { - eError = pImp->xBinding->GetMimeType( rName ); - - // Wir koennen keine Parameter wie CharSets usw. - rName = rName.GetToken( 0, ';' ); - if( !eError ) - { - if( !pImp->aPreRedirectionURL.Len() ) - pImp->aPreRedirectionURL = aLogicName; - SetName( pImp->xBinding->GetRedirectedURL() ); - } - pImp->aExpireTime = pImp->xBinding->GetExpireDateTime(); - } - return eError; -*/ - return 0; -} //---------------------------------------------------------------- diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx index dc0428659f9d..f0fbbcbb8660 100644 --- a/sfx2/source/doc/objcont.cxx +++ b/sfx2/source/doc/objcont.cxx @@ -683,7 +683,6 @@ BOOL SfxObjectShell::Print SetOrganizerSearchMask(pStylePool); SfxStyleSheetIterator* pIter = pStylePool->CreateIterator( pStylePool->GetSearchFamily(), pStylePool->GetSearchMask() ); - USHORT nStyles = pIter->Count(); SfxStyleSheetBase *pStyle = pIter->First(); if ( !pStyle ) return TRUE; @@ -713,7 +712,6 @@ BOOL SfxObjectShell::Print aOutPos.Y() += nTextHeight; aOutPos.Y() += nTextHeight/2; aFont.SetSize(Size(0, 35)); // 10pt - nStyles = 1; while(pStyle) { // print template name diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 6a09dd7cb205..7eea5371296c 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -2587,6 +2587,7 @@ sal_Bool SfxObjectShell::DoSave_Impl( const SfxItemSet* pArgs ) sal_Bool bOpen( sal_False ); bOpen = DoSaveCompleted( pMediumTmp ); DBG_ASSERT(bOpen,"Fehlerbehandlung fuer DoSaveCompleted nicht implementiert"); + (void)bOpen; } else { @@ -2915,6 +2916,7 @@ sal_Bool SfxObjectShell::PreDoSaveAs_Impl BOOL bRet( FALSE ); bRet = DoSaveCompleted( pMedium ); DBG_ASSERT( bRet, "Error in DoSaveCompleted, can't be handled!"); + (void)bRet; } // TODO/LATER: disconnect the new file from the storage for the case when pure saving is done diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx index 47f90b602a7f..c97d3f601811 100644 --- a/sfx2/source/doc/objxtor.cxx +++ b/sfx2/source/doc/objxtor.cxx @@ -616,7 +616,6 @@ sal_uInt16 SfxObjectShell::PrepareClose SfxViewFrame *pFrame = SfxObjectShell::Current() == this ? SfxViewFrame::Current() : SfxViewFrame::GetFirst( this ); - sal_Bool bClose = sal_False; if ( bUI && IsModified() && pFrame ) { // minimierte restoren @@ -663,8 +662,6 @@ sal_uInt16 SfxObjectShell::PrepareClose if ( !pPoolItem || pPoolItem->ISA(SfxVoidItem) || ( pPoolItem->ISA(SfxBoolItem) && !( (const SfxBoolItem*) pPoolItem )->GetValue() ) ) return sal_False; - else - bClose = sal_True; } else if ( RET_CANCEL == nRet ) // abgebrochen @@ -673,11 +670,6 @@ sal_uInt16 SfxObjectShell::PrepareClose { return RET_NEWTASK; } - else - { - // Bei Nein nicht noch Informationlost - bClose = sal_True; - } } pImp->bPreparedForClose = sal_True; diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 61c276bd8ab4..360fcccce408 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -3362,7 +3362,6 @@ void SAL_CALL SfxBaseModel::setVisualAreaSize( sal_Int64 nAspect, const awt::Siz Size aWinSize = pWindow->GetSizePixel(); awt::Size aCurrent = getVisualAreaSize( nAspect ); Size aDiff( aSize.Width-aCurrent.Width, aSize.Height-aCurrent.Height ); - Size aWrongDiff = OutputDevice::LogicToLogic( aDiff , m_pData->m_pObjectShell->GetMapUnit(), pWindow->GetMapMode() ); aDiff = pViewFrm->GetViewShell()->GetWindow()->LogicToPixel( aDiff ); aWinSize.Width() += aDiff.Width(); aWinSize.Height() += aDiff.Height(); diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx index 132a25b708e7..c75a0365c2a5 100644 --- a/sfx2/source/view/viewprn.cxx +++ b/sfx2/source/view/viewprn.cxx @@ -490,34 +490,6 @@ IMPL_LINK( SfxDialogExecutor_Impl, Execute, void *, EMPTYARG ) //------------------------------------------------------------------------- -BOOL UseStandardPrinter_Impl( Window* /*pParent*/, SfxPrinter* pDocPrinter ) -{ - // Optionen abfragen, ob gewarnt werden soll (Doc uebersteuert App) - BOOL bWarn = FALSE; - const SfxItemSet *pDocOptions = &pDocPrinter->GetOptions(); - if ( pDocOptions ) - { - USHORT nWhich = pDocOptions->GetPool()->GetWhich(SID_PRINTER_NOTFOUND_WARN); - const SfxBoolItem* pBoolItem = NULL; - pDocPrinter->GetOptions().GetItemState( nWhich, FALSE, (const SfxPoolItem**) &pBoolItem ); - if ( pBoolItem ) - bWarn = pBoolItem->GetValue(); - } -/* - // ggf. den User fragen - if ( bWarn ) - { - // Geht nicht mehr ohne OrigJobSetup! - String aTmp( SfxResId( STR_PRINTER_NOTAVAIL ) ); - QueryBox aBox( pParent, WB_OK_CANCEL | WB_DEF_OK, aTmp ); - return RET_OK == aBox.Execute(); - } -*/ - // nicht gewarnt => einfach so den StandardDrucker nehmen - return TRUE; -} -//------------------------------------------------------------------------- - SfxPrinter* SfxViewShell::SetPrinter_Impl( SfxPrinter *pNewPrinter ) /* Interne Methode zum Setzen der Unterschiede von 'pNewPrinter' zum @@ -824,13 +796,6 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq ) ErrorBox( NULL, WB_OK | WB_DEF_OK, String( SfxResId( STR_NODEFPRINTER ) ) ).Execute(); } - if ( !pPrinter->IsOriginal() && rReq.GetArgs() && !UseStandardPrinter_Impl( NULL, pPrinter ) ) - { - // printer is not available, but standard printer should not be used - rReq.SetReturnValue(SfxBoolItem(0,FALSE)); - break; - } - // FIXME: printer isn't used for printing anymore! if( pPrinter->IsPrinting() ) { |