diff options
34 files changed, 148 insertions, 295 deletions
diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx index 8a933ad240a1..4a7b468adea8 100644 --- a/chart2/source/controller/dialogs/DataBrowser.cxx +++ b/chart2/source/controller/dialogs/DataBrowser.cxx @@ -1299,7 +1299,7 @@ IMPL_LINK_TYPED( DataBrowser, SeriesHeaderGotFocus, Control&, rControl, void ) GoToCell( 0, 0 ); else { - MakeFieldVisible( GetCurRow(), static_cast< sal_uInt16 >( pEdit->getStartColumn()), true /* bComplete */ ); + MakeFieldVisible( GetCurRow(), static_cast< sal_uInt16 >( pEdit->getStartColumn()) ); ActivateCell(); m_aCursorMovedHdlLink.Call( this ); } diff --git a/cui/source/options/optmemory.cxx b/cui/source/options/optmemory.cxx index 344a66cefd7c..0ca6699ed953 100644 --- a/cui/source/options/optmemory.cxx +++ b/cui/source/options/optmemory.cxx @@ -190,7 +190,7 @@ bool OfaMemoryOptionsPage::FillItemSet( SfxItemSet* rSet ) GraphicManager& rGrfMgr = aDummyObject.GetGraphicManager(); rGrfMgr.SetMaxCacheSize(totalCacheSize); - rGrfMgr.SetMaxObjCacheSize(std::min(totalCacheSize, objectCacheSize), true); + rGrfMgr.SetMaxObjCacheSize(std::min(totalCacheSize, objectCacheSize)); rGrfMgr.SetCacheTimeout(objectReleaseTime); // OLECache diff --git a/include/svtools/asynclink.hxx b/include/svtools/asynclink.hxx index 2c1421cd1c49..abb3308755ec 100644 --- a/include/svtools/asynclink.hxx +++ b/include/svtools/asynclink.hxx @@ -66,7 +66,7 @@ public: void CreateMutex(); void operator=( const Link<void*,void>& rLink ) { _aLink = rLink; } - void Call( void* pObj, bool bAllowDoubles = false, bool bUseTimer = false ); + void Call( void* pObj, bool bAllowDoubles = false ); void ClearPendingCall( ); }; diff --git a/include/svtools/brwbox.hxx b/include/svtools/brwbox.hxx index 0dcc075855a5..edd86df02004 100644 --- a/include/svtools/brwbox.hxx +++ b/include/svtools/brwbox.hxx @@ -481,7 +481,7 @@ public: // movement of visible area long ScrollColumns( long nColumns ); long ScrollRows( long nRows ); - void MakeFieldVisible( long nRow, sal_uInt16 nColId, bool bComplete = false ); + void MakeFieldVisible( long nRow, sal_uInt16 nColId ); // access and movement of cursor long GetCurRow() const { return nCurRow; } diff --git a/include/svtools/calendar.hxx b/include/svtools/calendar.hxx index 8a11638676e1..362019ecd8fe 100644 --- a/include/svtools/calendar.hxx +++ b/include/svtools/calendar.hxx @@ -229,7 +229,7 @@ private: sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear, DayOfWeek eDayOfWeek, bool bBack = true, bool bOther = false, sal_uLong nToday = 0); - SVT_DLLPRIVATE void ImplDraw(vcl::RenderContext& rRenderContext, bool bPaint = false); + SVT_DLLPRIVATE void ImplDraw(vcl::RenderContext& rRenderContext); SVT_DLLPRIVATE void ImplUpdateDate( const Date& rDate ); SVT_DLLPRIVATE void ImplUpdateSelection( IntDateSet* pOld ); SVT_DLLPRIVATE void ImplMouseSelect( const Date& rDate, sal_uInt16 nHitTest, diff --git a/include/svtools/contextmenuhelper.hxx b/include/svtools/contextmenuhelper.hxx index f0927967883e..b200691de223 100644 --- a/include/svtools/contextmenuhelper.hxx +++ b/include/svtools/contextmenuhelper.hxx @@ -52,8 +52,7 @@ class SVT_DLLPUBLIC ContextMenuHelper public: // create context menu helper // ARGS: xFrame = frame defines the context of the context menu - // bAutoRefresh = specifies that the context will be constant or not - ContextMenuHelper( const css::uno::Reference< css::frame::XFrame >& xFrame, bool bAutoRefresh=true ); + ContextMenuHelper( const css::uno::Reference< css::frame::XFrame >& xFrame ); ~ContextMenuHelper(); // methods to complete a popup menu (set images, labels, enable/disable states) diff --git a/include/svtools/fmtfield.hxx b/include/svtools/fmtfield.hxx index c6ff30c82eba..ef04c004c44e 100644 --- a/include/svtools/fmtfield.hxx +++ b/include/svtools/fmtfield.hxx @@ -95,7 +95,7 @@ protected: bool m_bUseInputStringForFormatting; public: - FormattedField(vcl::Window* pParent, WinBits nStyle = 0, SvNumberFormatter* pInitialFormatter = nullptr, sal_Int32 nFormatKey = 0); + FormattedField(vcl::Window* pParent, WinBits nStyle = 0, SvNumberFormatter* pInitialFormatter = nullptr); // Min-/Max-management bool HasMinValue() const { return m_bHasMin; } diff --git a/include/svtools/grfmgr.hxx b/include/svtools/grfmgr.hxx index 7b31fd5860c3..f5e94b278be0 100644 --- a/include/svtools/grfmgr.hxx +++ b/include/svtools/grfmgr.hxx @@ -606,10 +606,7 @@ public: void SetMaxCacheSize( sal_uLong nNewCacheSize ); sal_uLong GetMaxCacheSize() const; - void SetMaxObjCacheSize( - sal_uLong nNewMaxObjSize, - bool bDestroyGreaterCached = false - ); + void SetMaxObjCacheSize( sal_uLong nNewMaxObjSize ); void SetCacheTimeout( sal_uLong nTimeoutSeconds ); diff --git a/include/svtools/headbar.hxx b/include/svtools/headbar.hxx index b2ccc9594659..60f05ec53882 100644 --- a/include/svtools/headbar.hxx +++ b/include/svtools/headbar.hxx @@ -261,7 +261,7 @@ private: SVT_DLLPRIVATE void ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos, bool bHigh = false, bool bDrag = false, const Rectangle* pRect = nullptr); SVT_DLLPRIVATE void ImplUpdate( sal_uInt16 nPos, - bool bEnd = false, bool bDirect = false ); + bool bEnd = false ); SVT_DLLPRIVATE void ImplStartDrag( const Point& rPos, bool bCommand ); SVT_DLLPRIVATE void ImplDrag( const Point& rPos ); SVT_DLLPRIVATE void ImplEndDrag( bool bCancel ); diff --git a/include/svtools/javacontext.hxx b/include/svtools/javacontext.hxx index 59ed720e880d..c4732c234547 100644 --- a/include/svtools/javacontext.hxx +++ b/include/svtools/javacontext.hxx @@ -38,14 +38,13 @@ namespace svt { public: - /** The parameter bShowErrorsOnce controls whether a message box is + /** A message box is only displayed once for a recurring Java error. That is only the first time JavaInteractionHandler.handle is called with a particular Request then the message box is shown. Afterwards nothing happens. */ - JavaContext( const css::uno::Reference< css::uno::XCurrentContext> & ctx, - bool bReportErrorOnce = true ); + JavaContext( const css::uno::Reference< css::uno::XCurrentContext> & ctx ); virtual ~JavaContext(); // XInterface diff --git a/include/svtools/parhtml.hxx b/include/svtools/parhtml.hxx index e4f38e27614a..6a2d65201aba 100644 --- a/include/svtools/parhtml.hxx +++ b/include/svtools/parhtml.hxx @@ -102,8 +102,7 @@ public: sal_uInt32 GetNumber() const; // ... as number sal_Int32 GetSNumber() const; // ... as number - void GetNumbers( std::vector<sal_uInt32> &rNumbers, // ... as numbers - bool bSpaceDelim=false ) const; + void GetNumbers( std::vector<sal_uInt32> &rNumbers ) const; // ... as numbers void GetColor( Color& ) const; // ... as color // ... as enum; pOptEnums is an HTMLOptionEnum array diff --git a/include/svtools/ruler.hxx b/include/svtools/ruler.hxx index 740e4427ff2f..775f26dbc288 100644 --- a/include/svtools/ruler.hxx +++ b/include/svtools/ruler.hxx @@ -672,9 +672,9 @@ private: SVT_DLLPRIVATE void ImplCalc(); SVT_DLLPRIVATE void ImplFormat(vcl::RenderContext& rRenderContext); SVT_DLLPRIVATE void ImplInitExtraField( bool bUpdate ); - SVT_DLLPRIVATE void ImplInvertLines(vcl::RenderContext& rRenderContext, bool bErase = false); + SVT_DLLPRIVATE void ImplInvertLines(vcl::RenderContext& rRenderContext); SVT_DLLPRIVATE void ImplDraw(vcl::RenderContext& rRenderContext); - SVT_DLLPRIVATE void ImplDrawExtra(vcl::RenderContext& rRenderContext, bool bPaint = false); + SVT_DLLPRIVATE void ImplDrawExtra(vcl::RenderContext& rRenderContext); SVT_DLLPRIVATE void ImplUpdate( bool bMustCalc = false ); virtual void ApplySettings(vcl::RenderContext& rRenderContext) override; diff --git a/include/svtools/toolbarmenu.hxx b/include/svtools/toolbarmenu.hxx index 86eca3e9d155..53ad67319749 100644 --- a/include/svtools/toolbarmenu.hxx +++ b/include/svtools/toolbarmenu.hxx @@ -118,7 +118,7 @@ private: void implPaint(vcl::RenderContext& rRenderContext, ToolbarMenuEntry* pThisOnly = nullptr, bool bHighlight = false); - void implHighlightEntry(vcl::RenderContext& rRenderContext, int nHighlightEntry, bool bHighlight); + void implHighlightEntry(vcl::RenderContext& rRenderContext, int nHighlightEntry); void implHighlightAtPosition(const MouseEvent& rMEvt, bool bMBDown); void implChangeHighlightEntry( int nEntry ); diff --git a/include/svtools/transfer.hxx b/include/svtools/transfer.hxx index 61d8cd12e75c..806c5350815e 100644 --- a/include/svtools/transfer.hxx +++ b/include/svtools/transfer.hxx @@ -100,12 +100,11 @@ struct AcceptDropEvent AcceptDropEvent( sal_Int8 nAction, const Point& rPosPixel, - const css::datatransfer::dnd::DropTargetDragEvent& rDragEvent, - bool bLeaving = false ) : + const css::datatransfer::dnd::DropTargetDragEvent& rDragEvent ) : mnAction( nAction ), maPosPixel( rPosPixel ), maDragEvent( rDragEvent ), - mbLeaving( bLeaving ), + mbLeaving( false ), mbDefault( false ) {} }; @@ -256,8 +255,7 @@ public: void CopyToClipboard( vcl::Window *pWindow ) const; void CopyToSelection( vcl::Window *pWindow ) const; void StartDrag( vcl::Window* pWindow, sal_Int8 nDragSourceActions, - sal_Int32 nDragPointer = DND_POINTER_NONE, - sal_Int32 nDragImage = DND_IMAGE_NONE ); + sal_Int32 nDragPointer = DND_POINTER_NONE ); static void ClearSelection( vcl::Window *pWindow ); diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx index 9c45ffef51df..3ca4500444f0 100644 --- a/include/svtools/treelistbox.hxx +++ b/include/svtools/treelistbox.hxx @@ -305,8 +305,7 @@ protected: bool CheckDragAndDropMode( SvTreeListBox* pSource, sal_Int8 ); void ImplShowTargetEmphasis( SvTreeListEntry* pEntry, bool bShow); - void EnableSelectionAsDropTarget( bool bEnable = true, - bool bWithChildren = true ); + void EnableSelectionAsDropTarget( bool bEnable = true ); // Standard impl returns 0; derived classes which support D'n'D must override using Window::GetDropTarget; virtual SvTreeListEntry* GetDropTarget( const Point& ); @@ -564,12 +563,10 @@ protected: SVT_DLLPRIVATE void ImpEntryInserted( SvTreeListEntry* pEntry ); SVT_DLLPRIVATE void PaintEntry1( SvTreeListEntry&, long nLine, vcl::RenderContext& rRenderContext, - SvLBoxTabFlags nTabFlagMask = SvLBoxTabFlags::ALL, - bool bHasClipRegion=false ); + SvLBoxTabFlags nTabFlagMask = SvLBoxTabFlags::ALL ); SVT_DLLPRIVATE void InitTreeView(); - SVT_DLLPRIVATE SvLBoxItem* GetItem_Impl( SvTreeListEntry*, long nX, SvLBoxTab** ppTab, - sal_uInt16 nEmptyWidth ); + SVT_DLLPRIVATE SvLBoxItem* GetItem_Impl( SvTreeListEntry*, long nX, SvLBoxTab** ppTab ); SVT_DLLPRIVATE void ImplInitStyle(); protected: diff --git a/include/svtools/valueset.hxx b/include/svtools/valueset.hxx index 3a0cd0b9459e..7b6d0970a36c 100644 --- a/include/svtools/valueset.hxx +++ b/include/svtools/valueset.hxx @@ -282,8 +282,8 @@ protected: virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override; public: - ValueSet( vcl::Window* pParent, WinBits nWinStyle, bool bDisableTransientChildren = false ); - ValueSet( vcl::Window* pParent, const ResId& rResId, bool bDisableTransientChildren = false ); + ValueSet( vcl::Window* pParent, WinBits nWinStyle ); + ValueSet( vcl::Window* pParent, const ResId& rResId ); virtual ~ValueSet(); virtual void dispose() override; diff --git a/sfx2/source/bastyp/sfxhtml.cxx b/sfx2/source/bastyp/sfxhtml.cxx index 6d3c57479e25..3c38b4e1bd13 100644 --- a/sfx2/source/bastyp/sfxhtml.cxx +++ b/sfx2/source/bastyp/sfxhtml.cxx @@ -136,7 +136,7 @@ bool SfxHTMLParser::ParseAreaOptions(ImageMap * pImageMap, const OUString& rBase rOption.GetEnum( nShape, aAreaShapeOptEnums ); break; case HTML_O_COORDS: - rOption.GetNumbers( aCoords, true ); + rOption.GetNumbers( aCoords ); break; case HTML_O_HREF: aHRef = INetURLObject::GetAbsURL( rBaseURL, rOption.GetString() ); diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index 97ed49b0890f..9b906c9b96b6 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -360,8 +360,7 @@ void SAL_CALL SfxOfficeDispatch::dispatch( const css::util::URL& aURL, const css // user selects a menu entry than they may get only one notification that // a JRE is not selected. css::uno::ContextLayer layer( - new svt::JavaContext( css::uno::getCurrentContext(), - true) ); + new svt::JavaContext( css::uno::getCurrentContext() ) ); #endif pControllerItem->dispatch( aURL, aArgs, css::uno::Reference < css::frame::XDispatchResultListener >() ); } @@ -376,7 +375,7 @@ void SAL_CALL SfxOfficeDispatch::dispatchWithNotification( const css::util::URL& { #if HAVE_FEATURE_JAVA // see comment for SfxOfficeDispatch::dispatch - css::uno::ContextLayer layer( new svt::JavaContext( css::uno::getCurrentContext(), true) ); + css::uno::ContextLayer layer( new svt::JavaContext( css::uno::getCurrentContext() ) ); #endif pControllerItem->dispatch( aURL, aArgs, rListener ); } diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx index 385eb089303f..1f23ddc3ec20 100644 --- a/svtools/source/brwbox/brwbox1.cxx +++ b/svtools/source/brwbox/brwbox1.cxx @@ -1899,15 +1899,13 @@ bool BrowseBox::IsColumnSelected( sal_uInt16 nColumnId ) const void BrowseBox::MakeFieldVisible ( long nRow, // line number of the field (starting with 0) - sal_uInt16 nColId, // column ID of the field - bool bComplete // (== false), true => make visible in its entirety + sal_uInt16 nColId // column ID of the field ) /* [Description] Makes visible the field described in 'nRow' and 'nColId' by scrolling - accordingly. If 'bComplete' is set, the field should become visible in its - entirety. + accordingly. */ @@ -1919,7 +1917,7 @@ void BrowseBox::MakeFieldVisible return; // is it visible already? - bool bVisible = IsFieldVisible( nRow, nColId, bComplete ); + bool bVisible = IsFieldVisible( nRow, nColId, true/*bComplete*/ ); if ( bVisible ) return; @@ -1934,9 +1932,7 @@ void BrowseBox::MakeFieldVisible ScrollColumns( nColPos - nFirstCol ); // while outside on the right - while ( aDataRect.Right() < ( bComplete - ? aFieldRect.Right() - : aFieldRect.Left()+aFieldRect.GetWidth()/2 ) ) + while ( aDataRect.Right() < aFieldRect.Right() ) { // => scroll to the left if ( ScrollColumns( 1 ) != 1 ) diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx index e178fb02918f..e6d2b1ac08ba 100644 --- a/svtools/source/brwbox/brwbox2.cxx +++ b/svtools/source/brwbox/brwbox2.cxx @@ -1915,7 +1915,7 @@ void BrowseBox::Dispatch( sal_uInt16 nId ) { SetColumnPos( nColId, nNewPos ); ColumnMoved( nColId ); - MakeFieldVisible(GetCurRow(), nColId, true); + MakeFieldVisible(GetCurRow(), nColId); if ( bColumnSelected ) SelectColumnId(nColId); } diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx index 8d72e3105eaf..d151d45a7a0b 100644 --- a/svtools/source/contnr/svimpbox.cxx +++ b/svtools/source/contnr/svimpbox.cxx @@ -940,7 +940,7 @@ void SvImpLBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect for(sal_uInt16 n=0; n< nCount && pEntry; n++) { /*long nMaxRight=*/ - pView->PaintEntry1(*pEntry, nY, rRenderContext, SvLBoxTabFlags::ALL, true ); + pView->PaintEntry1(*pEntry, nY, rRenderContext ); nY += nEntryHeight; pEntry = pView->NextVisible(pEntry); } diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index 833810ac3780..a20724e64550 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -930,7 +930,7 @@ void SvTreeListBox::InitViewData( SvViewDataEntry* pData, SvTreeListEntry* pEntr } } -void SvTreeListBox::EnableSelectionAsDropTarget( bool bEnable, bool bWithChildren ) +void SvTreeListBox::EnableSelectionAsDropTarget( bool bEnable ) { sal_uInt16 nRefDepth; SvTreeListEntry* pTemp; @@ -941,29 +941,23 @@ void SvTreeListBox::EnableSelectionAsDropTarget( bool bEnable, bool bWithChildre if ( !bEnable ) { pSelEntry->nEntryFlags |= SvTLEntryFlags::DISABLE_DROP; - if ( bWithChildren ) + nRefDepth = pModel->GetDepth( pSelEntry ); + pTemp = Next( pSelEntry ); + while( pTemp && pModel->GetDepth( pTemp ) > nRefDepth ) { - nRefDepth = pModel->GetDepth( pSelEntry ); - pTemp = Next( pSelEntry ); - while( pTemp && pModel->GetDepth( pTemp ) > nRefDepth ) - { - pTemp->nEntryFlags |= SvTLEntryFlags::DISABLE_DROP; - pTemp = Next( pTemp ); - } + pTemp->nEntryFlags |= SvTLEntryFlags::DISABLE_DROP; + pTemp = Next( pTemp ); } } else { pSelEntry->nEntryFlags &= (~SvTLEntryFlags::DISABLE_DROP); - if ( bWithChildren ) + nRefDepth = pModel->GetDepth( pSelEntry ); + pTemp = Next( pSelEntry ); + while( pTemp && pModel->GetDepth( pTemp ) > nRefDepth ) { - nRefDepth = pModel->GetDepth( pSelEntry ); - pTemp = Next( pSelEntry ); - while( pTemp && pModel->GetDepth( pTemp ) > nRefDepth ) - { - pTemp->nEntryFlags &= (~SvTLEntryFlags::DISABLE_DROP); - pTemp = Next( pTemp ); - } + pTemp->nEntryFlags &= (~SvTLEntryFlags::DISABLE_DROP); + pTemp = Next( pTemp ); } } pSelEntry = NextSelected( pSelEntry ); @@ -2817,7 +2811,7 @@ void SvTreeListBox::InvalidateEntry(SvTreeListEntry* pEntry) } void SvTreeListBox::PaintEntry1(SvTreeListEntry& rEntry, long nLine, vcl::RenderContext& rRenderContext, - SvLBoxTabFlags nTabFlags, bool bHasClipRegion) + SvLBoxTabFlags nTabFlags) { Rectangle aRect; // multi purpose @@ -2850,7 +2844,7 @@ void SvTreeListBox::PaintEntry1(SvTreeListEntry& rEntry, long nLine, vcl::Render bool bInUse = rEntry.HasInUseEmphasis(); // if a ClipRegion was set from outside, we don't have to reset it const WinBits nWindowStyle = GetStyle(); - const bool bResetClipRegion = !bHasClipRegion; + const bool bResetClipRegion = false; const bool bHideSelection = (nWindowStyle & WB_HIDESELECTION) !=0 && !HasFocus(); const StyleSettings& rSettings = rRenderContext.GetSettings().GetStyleSettings(); @@ -2860,12 +2854,6 @@ void SvTreeListBox::PaintEntry1(SvTreeListEntry& rEntry, long nLine, vcl::Render Size aRectSize(0, nTempEntryHeight); - if (!bHasClipRegion && nWindowStyle & WB_HSCROLL) - { - rRenderContext.SetClipRegion(vcl::Region(pImp->GetClipRegionRect())); - bHasClipRegion = true; - } - SvViewDataEntry* pViewDataEntry = GetViewDataEntry( &rEntry ); sal_uInt16 nTabCount = aTabs.size(); @@ -2903,11 +2891,6 @@ void SvTreeListBox::PaintEntry1(SvTreeListEntry& rEntry, long nLine, vcl::Render if (nFlags & nTabFlags) { - if (!bHasClipRegion && nX + aSize.Width() >= nMaxRight) - { - rRenderContext.SetClipRegion(vcl::Region(pImp->GetClipRegionRect())); - bHasClipRegion = true; - } aEntryPos.X() = nX; aEntryPos.Y() = nLine; @@ -3134,7 +3117,7 @@ void SvTreeListBox::PaintEntry1(SvTreeListEntry& rEntry, long nLine, vcl::Render } } - if (bHasClipRegion && bResetClipRegion) + if (bResetClipRegion) rRenderContext.SetClipRegion(); } @@ -3251,7 +3234,7 @@ sal_IntPtr SvTreeListBox::GetTabPos( SvTreeListEntry* pEntry, SvLBoxTab* pTab) } SvLBoxItem* SvTreeListBox::GetItem_Impl( SvTreeListEntry* pEntry, long nX, - SvLBoxTab** ppTab, sal_uInt16 nEmptyWidth ) + SvLBoxTab** ppTab ) { SvLBoxItem* pItemClicked = nullptr; sal_uInt16 nTabCount = aTabs.size(); @@ -3288,9 +3271,6 @@ SvLBoxItem* SvTreeListBox::GetItem_Impl( SvTreeListEntry* pEntry, long nX, nLen = nTabWidth; } - if( !nLen ) - nLen = nEmptyWidth; - if( nX >= nStart && nX < (nStart+nLen ) ) { pItemClicked = pItem; @@ -3391,13 +3371,13 @@ void SvTreeListBox::SetAlternatingRowColors( bool bEnable ) SvLBoxItem* SvTreeListBox::GetItem(SvTreeListEntry* pEntry,long nX,SvLBoxTab** ppTab) { - return GetItem_Impl( pEntry, nX, ppTab, 0 ); + return GetItem_Impl( pEntry, nX, ppTab ); } SvLBoxItem* SvTreeListBox::GetItem(SvTreeListEntry* pEntry,long nX ) { SvLBoxTab* pDummyTab; - return GetItem_Impl( pEntry, nX, &pDummyTab, 0 ); + return GetItem_Impl( pEntry, nX, &pDummyTab ); } void SvTreeListBox::AddTab(long nTabPos, SvLBoxTabFlags nFlags, void* pUserData ) diff --git a/svtools/source/control/asynclink.cxx b/svtools/source/control/asynclink.cxx index c2803024c0aa..0c6f05370e35 100644 --- a/svtools/source/control/asynclink.cxx +++ b/svtools/source/control/asynclink.cxx @@ -33,10 +33,10 @@ void AsynchronLink::CreateMutex() if( !_pMutex ) _pMutex = new osl::Mutex; } -void AsynchronLink::Call( void* pObj, bool bAllowDoubles, bool bUseTimer ) +void AsynchronLink::Call( void* pObj, bool bAllowDoubles ) { #ifdef DBG_UTIL - if ( bUseTimer || !_bInCall ) + if ( !_bInCall ) SAL_INFO( "svtools", "Recursives Call. Eher ueber Timer. TLX Fragen" ); #endif if( _aLink.IsSet() ) @@ -46,23 +46,9 @@ void AsynchronLink::Call( void* pObj, bool bAllowDoubles, bool bUseTimer ) ( !_nEventId && ( !_pIdle || !_pIdle->IsActive() ) ), "Schon ein Call unterwegs" ); ClearPendingCall(); - if( bUseTimer ) - { - if( !_pIdle ) - { - _pIdle = new Idle; - _pIdle->SetPriority( SchedulerPriority::HIGHEST ); - _pIdle->SetIdleHdl( LINK( - this, AsynchronLink, HandleCall_Idle) ); - } - _pIdle->Start(); - } - else - { - if( _pMutex ) _pMutex->acquire(); - _nEventId = Application::PostUserEvent( LINK( this, AsynchronLink, HandleCall_PostUserEvent) ); - if( _pMutex ) _pMutex->release(); - } + if( _pMutex ) _pMutex->acquire(); + _nEventId = Application::PostUserEvent( LINK( this, AsynchronLink, HandleCall_PostUserEvent) ); + if( _pMutex ) _pMutex->release(); } } diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx index 3f2437520ca4..56ab8f54dd48 100644 --- a/svtools/source/control/calendar.cxx +++ b/svtools/source/control/calendar.cxx @@ -764,7 +764,7 @@ void Calendar::ImplDrawDate(vcl::RenderContext& rRenderContext, ImplInvertDropPos(); } -void Calendar::ImplDraw(vcl::RenderContext& rRenderContext, bool bPaint) +void Calendar::ImplDraw(vcl::RenderContext& rRenderContext) { ImplFormat(); @@ -793,36 +793,21 @@ void Calendar::ImplDraw(vcl::RenderContext& rRenderContext, bool bPaint) rRenderContext.SetLineColor(); rRenderContext.SetFillColor(rStyleSettings.GetFaceColor()); Rectangle aTitleRect(0, nY, aOutSize.Width() - 1, nY + mnDayHeight - DAY_OFFY + TITLE_BORDERY * 2); - if (!bPaint) - { - Rectangle aTempRect(1, aTitleRect.Top() + TITLE_BORDERY, - aOutSize.Width() - 2, - aTitleRect.Bottom() - TITLE_BORDERY); - if (!i) - { - aTempRect.Left() = maPrevRect.Right() + 1; - aTempRect.Right() = maNextRect.Left() - 1; - } - rRenderContext.DrawRect(aTempRect); - } - else - { - rRenderContext.DrawRect(aTitleRect); - Point aTopLeft1(aTitleRect.Left(), aTitleRect.Top()); - Point aTopLeft2(aTitleRect.Left(), aTitleRect.Top() + 1); - Point aBottomRight1(aTitleRect.Right(), aTitleRect.Bottom()); - Point aBottomRight2(aTitleRect.Right(), aTitleRect.Bottom() - 1); - rRenderContext.SetLineColor(rStyleSettings.GetDarkShadowColor()); - rRenderContext.DrawLine(aTopLeft1, Point(aBottomRight1.X(), aTopLeft1.Y())); - rRenderContext.SetLineColor(rStyleSettings.GetLightColor() ); - rRenderContext.DrawLine(aTopLeft2, Point(aBottomRight2.X(), aTopLeft2.Y())); - rRenderContext.DrawLine(aTopLeft2, Point(aTopLeft2.X(), aBottomRight2.Y())); - rRenderContext.SetLineColor(rStyleSettings.GetShadowColor() ); - rRenderContext.DrawLine(Point(aTopLeft2.X(), aBottomRight2.Y()), aBottomRight2); - rRenderContext.DrawLine(Point(aBottomRight2.X(), aTopLeft2.Y()), aBottomRight2); - rRenderContext.SetLineColor(rStyleSettings.GetDarkShadowColor()); - rRenderContext.DrawLine(Point(aTopLeft1.X(), aBottomRight1.Y()), aBottomRight1); - } + rRenderContext.DrawRect(aTitleRect); + Point aTopLeft1(aTitleRect.Left(), aTitleRect.Top()); + Point aTopLeft2(aTitleRect.Left(), aTitleRect.Top() + 1); + Point aBottomRight1(aTitleRect.Right(), aTitleRect.Bottom()); + Point aBottomRight2(aTitleRect.Right(), aTitleRect.Bottom() - 1); + rRenderContext.SetLineColor(rStyleSettings.GetDarkShadowColor()); + rRenderContext.DrawLine(aTopLeft1, Point(aBottomRight1.X(), aTopLeft1.Y())); + rRenderContext.SetLineColor(rStyleSettings.GetLightColor() ); + rRenderContext.DrawLine(aTopLeft2, Point(aBottomRight2.X(), aTopLeft2.Y())); + rRenderContext.DrawLine(aTopLeft2, Point(aTopLeft2.X(), aBottomRight2.Y())); + rRenderContext.SetLineColor(rStyleSettings.GetShadowColor() ); + rRenderContext.DrawLine(Point(aTopLeft2.X(), aBottomRight2.Y()), aBottomRight2); + rRenderContext.DrawLine(Point(aBottomRight2.X(), aTopLeft2.Y()), aBottomRight2); + rRenderContext.SetLineColor(rStyleSettings.GetDarkShadowColor()); + rRenderContext.DrawLine(Point(aTopLeft1.X(), aBottomRight1.Y()), aBottomRight1); Point aSepPos1(0, aTitleRect.Top() + TITLE_BORDERY); Point aSepPos2(0, aTitleRect.Bottom() - TITLE_BORDERY); for (j = 0; j < mnMonthPerLine-1; j++) @@ -883,18 +868,15 @@ void Calendar::ImplDraw(vcl::RenderContext& rRenderContext, bool bPaint) rRenderContext.SetTextColor(rStyleSettings.GetWindowTextColor()); // display week bar - if (bPaint) - { - nDayX = nX + mnDaysOffX; - nDayY = nY + mnWeekDayOffY; - nDeltaY = nDayY + mnDayHeight; - rRenderContext.SetLineColor(rStyleSettings.GetWindowTextColor()); - Point aStartPos(nDayX, nDeltaY); - if (mnWinStyle & WB_WEEKNUMBER) - aStartPos.X() -= WEEKNUMBER_OFFX - 2; - rRenderContext.DrawLine(aStartPos, Point(nDayX + (7 * mnDayWidth), nDeltaY)); - rRenderContext.DrawTextArray(Point(nDayX + mnDayOfWeekAry[0], nDayY), maDayOfWeekText, &(mnDayOfWeekAry[1])); - } + nDayX = nX + mnDaysOffX; + nDayY = nY + mnWeekDayOffY; + nDeltaY = nDayY + mnDayHeight; + rRenderContext.SetLineColor(rStyleSettings.GetWindowTextColor()); + Point aStartPos(nDayX, nDeltaY); + if (mnWinStyle & WB_WEEKNUMBER) + aStartPos.X() -= WEEKNUMBER_OFFX - 2; + rRenderContext.DrawLine(aStartPos, Point(nDayX + (7 * mnDayWidth), nDeltaY)); + rRenderContext.DrawTextArray(Point(nDayX + mnDayOfWeekAry[0], nDayY), maDayOfWeekText, &(mnDayOfWeekAry[1])); // display weeknumbers if (mnWinStyle & WB_WEEKNUMBER) @@ -903,16 +885,8 @@ void Calendar::ImplDraw(vcl::RenderContext& rRenderContext, bool bPaint) nDayY = nY + mnWeekDayOffY; nDeltaY = nDayY + mnDayHeight; long nMonthHeight = mnDayHeight * 6; - if (bPaint) - { - rRenderContext.DrawLine(Point(nDayX - WEEKNUMBER_OFFX + 2, nDeltaY), - Point(nDayX - WEEKNUMBER_OFFX + 2, nDeltaY + nMonthHeight)); - } - else - { - rRenderContext.Erase(Rectangle(nDayX - mnWeekWidth - WEEKNUMBER_OFFX, nDeltaY, - nDayX - WEEKNUMBER_OFFX - 1, nDeltaY + nMonthHeight)); - } + rRenderContext.DrawLine(Point(nDayX - WEEKNUMBER_OFFX + 2, nDeltaY), + Point(nDayX - WEEKNUMBER_OFFX + 2, nDeltaY + nMonthHeight)); vcl::Font aOldFont = rRenderContext.GetFont(); vcl::Font aTempFont = aOldFont; ImplGetWeekFont(aTempFont); @@ -937,12 +911,6 @@ void Calendar::ImplDraw(vcl::RenderContext& rRenderContext, bool bPaint) sal_uInt16 nDaysInMonth = aDate.GetDaysInMonth(); nDayX = nX + mnDaysOffX; nDayY = nY + mnDaysOffY; - if (!bPaint) - { - Rectangle aClearRect(nDayX, nDayY, - nDayX + (7 * mnDayWidth) - 1, nDayY + (6 * mnDayHeight) - 1); - rRenderContext.Erase(aClearRect); - } sal_uInt16 nDayIndex = (sal_uInt16) aDate.GetDayOfWeek(); nDayIndex = (nDayIndex + (7 - (sal_uInt16)eStartDay)) % 7; if (i == 0 && j == 0) @@ -1003,8 +971,7 @@ void Calendar::ImplDraw(vcl::RenderContext& rRenderContext, bool bPaint) } // draw spin buttons - if (bPaint) - ImplDrawSpin(rRenderContext); + ImplDrawSpin(rRenderContext); } void Calendar::ImplUpdateDate( const Date& rDate ) @@ -1553,7 +1520,7 @@ void Calendar::KeyInput( const KeyEvent& rKEvt ) void Calendar::Paint( vcl::RenderContext& rRenderContext, const Rectangle& ) { - ImplDraw(rRenderContext, true); + ImplDraw(rRenderContext); } void Calendar::GetFocus() diff --git a/svtools/source/control/fmtfield.cxx b/svtools/source/control/fmtfield.cxx index 31aa1c8e5844..b92e52d171dc 100644 --- a/svtools/source/control/fmtfield.cxx +++ b/svtools/source/control/fmtfield.cxx @@ -296,7 +296,7 @@ FormattedField::StaticFormatter::~StaticFormatter() } -FormattedField::FormattedField(vcl::Window* pParent, WinBits nStyle, SvNumberFormatter* pInitialFormatter, sal_Int32 nFormatKey) +FormattedField::FormattedField(vcl::Window* pParent, WinBits nStyle, SvNumberFormatter* pInitialFormatter) :SpinField(pParent, nStyle) ,m_aLastSelection(0,0) ,m_dMinValue(0) @@ -323,7 +323,7 @@ FormattedField::FormattedField(vcl::Window* pParent, WinBits nStyle, SvNumberFor if (pInitialFormatter) { m_pFormatter = pInitialFormatter; - m_nFormatKey = nFormatKey; + m_nFormatKey = 0; } } diff --git a/svtools/source/control/headbar.cxx b/svtools/source/control/headbar.cxx index b0d6192d115b..99e0d5c7b25d 100644 --- a/svtools/source/control/headbar.cxx +++ b/svtools/source/control/headbar.cxx @@ -622,7 +622,7 @@ void HeaderBar::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos ImplDrawItem(rRenderContext, nPos, bHigh, bDrag, aRect, pRect, DrawFlags::NONE ); } -void HeaderBar::ImplUpdate(sal_uInt16 nPos, bool bEnd, bool /*bDirect*/) +void HeaderBar::ImplUpdate(sal_uInt16 nPos, bool bEnd) { if (IsVisible() && IsUpdateMode()) { diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index 7491da7f4427..5af99b7f18bb 100644 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -403,7 +403,7 @@ void Ruler::ImplVDrawText(vcl::RenderContext& rRenderContext, long nX, long nY, } } -void Ruler::ImplInvertLines(vcl::RenderContext& rRenderContext, bool bErase) +void Ruler::ImplInvertLines(vcl::RenderContext& rRenderContext) { // Position lines if (!mpData->pLines.empty() && mbActive && !mbDrag && !mbFormat && !(mnUpdateFlags & RULER_UPDATE_LINES) ) @@ -436,29 +436,26 @@ void Ruler::ImplInvertLines(vcl::RenderContext& rRenderContext, bool bErase) aRect.Top() = n; aRect.Bottom() = n; } - if (bErase) - { - Rectangle aTempRect = aRect; + Rectangle aTempRect = aRect; - if (mnWinStyle & WB_HORZ) - aTempRect.Bottom() = RULER_OFF - 1; - else - aTempRect.Right() = RULER_OFF - 1; + if (mnWinStyle & WB_HORZ) + aTempRect.Bottom() = RULER_OFF - 1; + else + aTempRect.Right() = RULER_OFF - 1; - rRenderContext.Erase(aTempRect); + rRenderContext.Erase(aTempRect); - if (mnWinStyle & WB_HORZ) - { - aTempRect.Bottom() = aRect.Bottom(); - aTempRect.Top() = aTempRect.Bottom() - RULER_OFF + 1; - } - else - { - aTempRect.Right() = aRect.Right(); - aTempRect.Left() = aTempRect.Right() - RULER_OFF + 1; - } - rRenderContext.Erase(aTempRect); + if (mnWinStyle & WB_HORZ) + { + aTempRect.Bottom() = aRect.Bottom(); + aTempRect.Top() = aTempRect.Bottom() - RULER_OFF + 1; } + else + { + aTempRect.Right() = aRect.Right(); + aTempRect.Left() = aTempRect.Right() - RULER_OFF + 1; + } + rRenderContext.Erase(aTempRect); Invert(aRect); } } @@ -1395,11 +1392,11 @@ void Ruler::ImplDraw(vcl::RenderContext& rRenderContext) rRenderContext.DrawOutDev(aOffPos, aVirDevSize, Point(), aVirDevSize, *maVirDev.get()); // redraw positionlines - ImplInvertLines(rRenderContext, true); + ImplInvertLines(rRenderContext); } } -void Ruler::ImplDrawExtra(vcl::RenderContext& rRenderContext, bool bPaint) +void Ruler::ImplDrawExtra(vcl::RenderContext& rRenderContext) { const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); Rectangle aRect = maExtraRect; @@ -1410,19 +1407,11 @@ void Ruler::ImplDrawExtra(vcl::RenderContext& rRenderContext, bool bPaint) aRect.Right() -= 2; aRect.Bottom() -= 2; - if (!bPaint && !(mnExtraStyle & RULER_STYLE_HIGHLIGHT)) + if (mnExtraStyle & RULER_STYLE_HIGHLIGHT) { - rRenderContext.SetFillColor(rStyleSettings.GetWorkspaceColor()); + rRenderContext.SetFillColor(rStyleSettings.GetCheckedColor()); bEraseRect = true; } - else - { - if (mnExtraStyle & RULER_STYLE_HIGHLIGHT) - { - rRenderContext.SetFillColor(rStyleSettings.GetCheckedColor()); - bEraseRect = true; - } - } if (bEraseRect) { @@ -2145,7 +2134,7 @@ void Ruler::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) // consider extra field if (mnWinStyle & WB_EXTRAFIELD) - ImplDrawExtra(rRenderContext, true); + ImplDrawExtra(rRenderContext); } void Ruler::Resize() diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx index 4cac6fe225fb..67a0843f7235 100644 --- a/svtools/source/control/toolbarmenu.cxx +++ b/svtools/source/control/toolbarmenu.cxx @@ -800,7 +800,7 @@ ToolbarMenuEntry* ToolbarMenu::implSearchEntry( int nEntryId ) const } -void ToolbarMenu::implHighlightEntry(vcl::RenderContext& rRenderContext, int nHighlightEntry, bool bHighlight) +void ToolbarMenu::implHighlightEntry(vcl::RenderContext& rRenderContext, int nHighlightEntry) { Size aSz(GetOutputSizePixel()); long nX = 0; @@ -816,14 +816,6 @@ void ToolbarMenu::implHighlightEntry(vcl::RenderContext& rRenderContext, int nHi // no highlights for controls only items if (pEntry->mpControl) { - if (!bHighlight) - { - ValueSet* pValueSet = dynamic_cast<ValueSet*>(pEntry->mpControl.get()); - if (pValueSet) - { - pValueSet->SetNoSelection(); - } - } break; } @@ -846,45 +838,38 @@ void ToolbarMenu::implHighlightEntry(vcl::RenderContext& rRenderContext, int nHi Rectangle aCtrlRect(Point(nX, 0), Size(aPxSize.Width() - nX, aPxSize.Height())); rRenderContext.DrawNativeControl(CTRL_MENU_POPUP, PART_ENTIRE_CONTROL, aCtrlRect, ControlState::ENABLED, ImplControlValue(), OUString()); - if (bHighlight && rRenderContext.IsNativeControlSupported(CTRL_MENU_POPUP, PART_MENU_ITEM)) + if (rRenderContext.IsNativeControlSupported(CTRL_MENU_POPUP, PART_MENU_ITEM)) { bDrawItemRect = false; ControlState eState = ControlState::SELECTED | (pEntry->mbEnabled ? ControlState::ENABLED : ControlState::NONE); if (!rRenderContext.DrawNativeControl(CTRL_MENU_POPUP, PART_MENU_ITEM, aItemRect, eState, ImplControlValue(), OUString())) { - bDrawItemRect = bHighlight; + bDrawItemRect = true; } } else { - bDrawItemRect = bHighlight; + bDrawItemRect = true; } rRenderContext.Pop(); } if (bDrawItemRect) { - if (bHighlight) + if (pEntry->mbEnabled) { - if (pEntry->mbEnabled) - { - rRenderContext.SetFillColor(rRenderContext.GetSettings().GetStyleSettings().GetMenuHighlightColor()); - } - else - { - rRenderContext.SetFillColor(); - oldLineColor = rRenderContext.GetLineColor(); - rRenderContext.SetLineColor(rRenderContext.GetSettings().GetStyleSettings().GetMenuHighlightColor()); - bRestoreLineColor = true; - } + rRenderContext.SetFillColor(rRenderContext.GetSettings().GetStyleSettings().GetMenuHighlightColor()); } else { - rRenderContext.SetFillColor(rRenderContext.GetSettings().GetStyleSettings().GetMenuColor()); + rRenderContext.SetFillColor(); + oldLineColor = rRenderContext.GetLineColor(); + rRenderContext.SetLineColor(rRenderContext.GetSettings().GetStyleSettings().GetMenuHighlightColor()); + bRestoreLineColor = true; } rRenderContext.DrawRect(aItemRect); } - implPaint(rRenderContext, pEntry, bHighlight); + implPaint(rRenderContext, pEntry, true/*bHighlight*/); if (bRestoreLineColor) rRenderContext.SetLineColor(oldLineColor); break; @@ -1410,7 +1395,7 @@ void ToolbarMenu::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) implPaint(rRenderContext); if (mpImpl->mnHighlightedEntry != -1) - implHighlightEntry(rRenderContext, mpImpl->mnHighlightedEntry, true); + implHighlightEntry(rRenderContext, mpImpl->mnHighlightedEntry); } diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index 556089bb1cf9..f827dbfa2264 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -95,13 +95,13 @@ void ValueSet::ImplInit() ImplInitSettings( true, true, true ); } -ValueSet::ValueSet( vcl::Window* pParent, WinBits nWinStyle, bool bDisableTransientChildren ) : +ValueSet::ValueSet( vcl::Window* pParent, WinBits nWinStyle ) : Control( pParent, nWinStyle ), maVirDev( VclPtr<VirtualDevice>::Create(*this) ), maColor( COL_TRANSPARENT ) { ImplInit(); - mbIsTransientChildrenDisabled = bDisableTransientChildren; + mbIsTransientChildrenDisabled = false; } VCL_BUILDER_DECL_FACTORY(ValueSet) @@ -115,13 +115,13 @@ VCL_BUILDER_DECL_FACTORY(ValueSet) rRet = VclPtr<ValueSet>::Create(pParent, nWinBits); } -ValueSet::ValueSet( vcl::Window* pParent, const ResId& rResId, bool bDisableTransientChildren ) : +ValueSet::ValueSet( vcl::Window* pParent, const ResId& rResId ) : Control( pParent, rResId ), maVirDev( VclPtr<VirtualDevice>::Create(*this) ), maColor( COL_TRANSPARENT ) { ImplInit(); - mbIsTransientChildrenDisabled = bDisableTransientChildren; + mbIsTransientChildrenDisabled = false; } ValueSet::~ValueSet() diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx index b71c56bff751..b0f0ea0384ef 100644 --- a/svtools/source/graphic/grfmgr2.cxx +++ b/svtools/source/graphic/grfmgr2.cxx @@ -65,9 +65,9 @@ sal_uLong GraphicManager::GetMaxCacheSize() const return mpCache->GetMaxDisplayCacheSize(); } -void GraphicManager::SetMaxObjCacheSize( sal_uLong nNewMaxObjSize, bool bDestroyGreaterCached ) +void GraphicManager::SetMaxObjCacheSize( sal_uLong nNewMaxObjSize ) { - mpCache->SetMaxObjDisplayCacheSize( nNewMaxObjSize, bDestroyGreaterCached ); + mpCache->SetMaxObjDisplayCacheSize( nNewMaxObjSize, true/*bDestroyGreaterCached*/ ); } void GraphicManager::SetCacheTimeout( sal_uLong nTimeoutSeconds ) diff --git a/svtools/source/java/javacontext.cxx b/svtools/source/java/javacontext.cxx index 3830ee557555..d4cf64805994 100644 --- a/svtools/source/java/javacontext.cxx +++ b/svtools/source/java/javacontext.cxx @@ -28,11 +28,10 @@ using namespace com::sun::star::task; namespace svt { -JavaContext::JavaContext( const Reference< XCurrentContext > & ctx, - bool bShowErrorsOnce) +JavaContext::JavaContext( const Reference< XCurrentContext > & ctx) : m_aRefCount(0), m_xNextContext( ctx ), - m_bShowErrorsOnce(bShowErrorsOnce) + m_bShowErrorsOnce(true) { } diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx index 81dd5dc34ee0..49b8e067ab46 100644 --- a/svtools/source/misc/transfer.cxx +++ b/svtools/source/misc/transfer.cxx @@ -977,7 +977,7 @@ void TransferableHelper::CopyToSelection( vcl::Window *pWindow ) const void TransferableHelper::StartDrag( vcl::Window* pWindow, sal_Int8 nDnDSourceActions, - sal_Int32 nDnDPointer, sal_Int32 nDnDImage ) + sal_Int32 nDnDPointer ) { DBG_ASSERT( pWindow, "Window pointer is NULL" ); @@ -1010,7 +1010,7 @@ void TransferableHelper::StartDrag( vcl::Window* pWindow, sal_Int8 nDnDSourceAct aEvt.DragOriginY = aPt.Y(); aEvt.DragSource = xDragSource; - xDragSource->startDrag( aEvt, nDnDSourceActions, nDnDPointer, nDnDImage, this, this ); + xDragSource->startDrag( aEvt, nDnDSourceActions, nDnDPointer, DND_IMAGE_NONE, this, this ); } catch( const css::uno::Exception& ) { diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx index b2e309f0e7fb..e227dce6f1f4 100644 --- a/svtools/source/svhtml/parhtml.cxx +++ b/svtools/source/svhtml/parhtml.cxx @@ -159,69 +159,33 @@ sal_Int32 HTMLOption::GetSNumber() const return aTmp.toInt32(); } -void HTMLOption::GetNumbers( std::vector<sal_uInt32> &rNumbers, bool bSpaceDelim ) const +void HTMLOption::GetNumbers( std::vector<sal_uInt32> &rNumbers ) const { rNumbers.clear(); - if( bSpaceDelim ) + // This is a very simplified scanner: it only searches all + // numerals in the string. + bool bInNum = false; + sal_uLong nNum = 0; + for( sal_Int32 i=0; i<aValue.getLength(); i++ ) { - // This is a very simplified scanner: it only searches all - // numerals in the string. - bool bInNum = false; - sal_uLong nNum = 0; - for( sal_Int32 i=0; i<aValue.getLength(); i++ ) + sal_Unicode c = aValue[ i ]; + if( c>='0' && c<='9' ) { - sal_Unicode c = aValue[ i ]; - if( c>='0' && c<='9' ) - { - nNum *= 10; - nNum += (c - '0'); - bInNum = true; - } - else if( bInNum ) - { - rNumbers.push_back( nNum ); - bInNum = false; - nNum = 0; - } + nNum *= 10; + nNum += (c - '0'); + bInNum = true; } - if( bInNum ) + else if( bInNum ) { rNumbers.push_back( nNum ); + bInNum = false; + nNum = 0; } } - else + if( bInNum ) { - // Check whether numbers are separated by ',' and - // insert 0 if necessary - sal_Int32 nPos = 0; - while( nPos < aValue.getLength() ) - { - sal_Unicode c; - while( nPos < aValue.getLength() && - ((c=aValue[nPos]) == ' ' || c == '\t' || - c == '\n' || c== '\r' ) ) - nPos++; - - if( nPos==aValue.getLength() ) - rNumbers.push_back(0); - else - { - sal_Int32 nEnd = aValue.indexOf( (sal_Unicode)',', nPos ); - if( -1 == nEnd ) - { - sal_Int32 nTmp = aValue.copy(nPos).toInt32(); - rNumbers.push_back( nTmp >= 0 ? (sal_uInt32)nTmp : 0 ); - nPos = aValue.getLength(); - } - else - { - sal_Int32 nTmp = aValue.copy(nPos,nEnd-nPos).toInt32(); - rNumbers.push_back( nTmp >= 0 ? (sal_uInt32)nTmp : 0 ); - nPos = nEnd+1; - } - } - } + rNumbers.push_back( nNum ); } } diff --git a/svtools/source/uno/contextmenuhelper.cxx b/svtools/source/uno/contextmenuhelper.cxx index 6c74a1be305f..dac728362090 100644 --- a/svtools/source/uno/contextmenuhelper.cxx +++ b/svtools/source/uno/contextmenuhelper.cxx @@ -251,11 +251,10 @@ static OUString lcl_GetItemCommandRecursive( const PopupMenu* pPopupMenu, sal_uI /*************************************************************************/ ContextMenuHelper::ContextMenuHelper( - const uno::Reference< frame::XFrame >& xFrame, - bool bAutoRefresh ) : + const uno::Reference< frame::XFrame >& xFrame ) : m_xWeakFrame( xFrame ), m_aSelf( "_self" ), - m_bAutoRefresh( bAutoRefresh ), + m_bAutoRefresh( true ), m_bUICfgMgrAssociated( false ) { } |