[Libreoffice-commits] core.git: 3 commits - vcl/source vcl/unx
vcl/source/app/salvtables.cxx |1 + vcl/unx/gtk3/gtk3gtkinst.cxx |3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) New commits: commit 15521912ccbba14fe5f5b91009bfec154c7f29a1 Author: Caolán McNamara AuthorDate: Fri Sep 20 15:41:31 2019 +0100 Commit: Caolán McNamara CommitDate: Fri Sep 20 21:23:08 2019 +0200 expand to fill VclBin Change-Id: If40894e9b92f21150936bbd8a9e25982d3a908cb Reviewed-on: https://gerrit.libreoffice.org/79305 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 4c08d45be1ef..15f53a47b760 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -1042,6 +1042,7 @@ public: virtual css::uno::Reference CreateChildFrame() override { auto xPage = VclPtr::Create(m_xContainer.get()); +xPage->set_expand(true); xPage->Show(); return css::uno::Reference(xPage->GetComponentInterface(), css::uno::UNO_QUERY); } commit cf971dfcc94668f03ad0cf83b98d62ae1227ddba Author: Caolán McNamara AuthorDate: Fri Sep 20 15:35:16 2019 +0100 Commit: Caolán McNamara CommitDate: Fri Sep 20 21:22:34 2019 +0200 get the toplevel GtkWindow widget Change-Id: Ibcc20027062568b239d893bcf51887749abe4646 Reviewed-on: https://gerrit.libreoffice.org/79304 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 4df3120e12d9..49e856a9c111 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -11420,7 +11420,7 @@ weld::Window* GtkInstance::GetFrameWeld(const css::uno::Reference AuthorDate: Fri Sep 20 15:31:54 2019 +0100 Commit: Caolán McNamara CommitDate: Fri Sep 20 21:22:12 2019 +0200 ensure embedded widget is realized Change-Id: Id43ca34d31d8e45482786a0739d981d7c85de686 Reviewed-on: https://gerrit.libreoffice.org/79303 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 034d2f29f1f4..4df3120e12d9 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -2733,6 +2733,7 @@ public: gtk_container_child_set(m_pContainer, pWindow, "expand", true, "fill", true, nullptr); gtk_widget_set_hexpand(pWindow, true); gtk_widget_set_vexpand(pWindow, true); +gtk_widget_realize(pWindow); g_object_unref(pWindow); xEmbedWindow->Show(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 3 commits - vcl/source vcl/win
vcl/source/app/scheduler.cxx | 15 +++ vcl/win/app/salinst.cxx |7 --- vcl/win/app/saltimer.cxx |2 +- vcl/win/gdi/salprn.cxx | 36 +++- vcl/win/window/salframe.cxx |9 + 5 files changed, 20 insertions(+), 49 deletions(-) New commits: commit 4815b6f7c70cca5a226163cb8a227f32be48 Author: Jan-Marek GlogowskiDate: Mon Jul 24 15:45:32 2017 +0200 WIN don't yield the scheduler in PeekMessage The scheduler is restarting the timer at the end of the most important task search. It uses PeekMessage PM_REMOVE to remove old SAL_MSG_TIMER_CALLBACK messages from the queue. Without PM_NOYIELD, in combination with an other thread yielding using SAL_MSG_THREADYIELD, this could re-start scheduling inside these PeekMessage calls, resulting in various assertions inside the scheduler code, most time due to the changed ascheduler list in "assert( pPrevSchedulerData->mpNext == pSchedulerData )". Change-Id: Ia96b6c0e06ffc3126b1428723b53f4b2112f8a5f diff --git a/vcl/win/app/salinst.cxx b/vcl/win/app/salinst.cxx index 8e718e37e883..cfffb97d0234 100644 --- a/vcl/win/app/salinst.cxx +++ b/vcl/win/app/salinst.cxx @@ -730,7 +730,7 @@ LRESULT CALLBACK SalComWndProc( HWND, UINT nMsg, WPARAM wParam, LPARAM lParam, i case SAL_MSG_TIMER_CALLBACK: MSG aMsg; while ( PeekMessageW(, nullptr, SAL_MSG_TIMER_CALLBACK, - SAL_MSG_TIMER_CALLBACK, PM_REMOVE) ) + SAL_MSG_TIMER_CALLBACK, PM_REMOVE | PM_NOYIELD) ) assert( "Multiple timer messages in queue" ); assert( 0 == wParam ); if ( 0 == wParam ) diff --git a/vcl/win/app/saltimer.cxx b/vcl/win/app/saltimer.cxx index ae8ed0790bf5..4ca5ebb572d2 100644 --- a/vcl/win/app/saltimer.cxx +++ b/vcl/win/app/saltimer.cxx @@ -49,7 +49,7 @@ void ImplSalStopTimer() MSG aMsg; int nMsgCount = 0; while ( PeekMessageW(, nullptr, SAL_MSG_TIMER_CALLBACK, - SAL_MSG_TIMER_CALLBACK, PM_REMOVE) ) + SAL_MSG_TIMER_CALLBACK, PM_REMOVE | PM_NOYIELD) ) nMsgCount++; assert( nMsgCount <= 1 ); pSalData->mbOnIdleRunScheduler = false; commit 9dfd1bb102bb08f0651a6921722d731ab973bd08 Author: Jan-Marek Glogowski Date: Mon Jul 24 15:41:32 2017 +0200 Add some const and fix some scheduler logging Change-Id: Id20767ff2be34a21896d3ce2b76f3944acdb1b77 diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx index e9372cd52c3e..972beb741c1d 100644 --- a/vcl/source/app/scheduler.cxx +++ b/vcl/source/app/scheduler.cxx @@ -178,9 +178,9 @@ inline void Scheduler::UpdateSystemTimer( ImplSchedulerContext , { if ( InfiniteTimeoutMs == nMinPeriod ) { +SAL_INFO("vcl.schedule", " Stopping system timer"); if ( rSchedCtx.mpSalTimer ) rSchedCtx.mpSalTimer->Stop(); -SAL_INFO("vcl.schedule", " Stopping system timer"); rSchedCtx.mnTimerPeriod = nMinPeriod; } else @@ -205,9 +205,13 @@ static inline void AppendSchedulerData( ImplSchedulerContext , static inline ImplSchedulerData* DropSchedulerData( ImplSchedulerContext , ImplSchedulerData * const pPrevSchedulerData, - ImplSchedulerData * const pSchedulerData ) + const ImplSchedulerData * const pSchedulerData ) { -assert( !pPrevSchedulerData || (pPrevSchedulerData->mpNext == pSchedulerData) ); +assert( pSchedulerData ); +if ( pPrevSchedulerData ) +assert( pPrevSchedulerData->mpNext == pSchedulerData ); +else +assert( rSchedCtx.mpFirstSchedulerData == pSchedulerData ); ImplSchedulerData * const pSchedulerDataNext = pSchedulerData->mpNext; if ( pPrevSchedulerData ) @@ -312,7 +316,7 @@ next_entry: if ( pMostUrgent ) { SAL_INFO( "vcl.schedule", tools::Time::GetSystemTicks() << " " - << pMostUrgent << " invoke " << *pMostUrgent->mpTask ); + << pMostUrgent << " invoke-in " << *pMostUrgent->mpTask ); Task *pTask = pMostUrgent->mpTask; @@ -328,6 +332,9 @@ next_entry: pTask->Invoke(); pMostUrgent->mbInScheduler = false; +SAL_INFO( "vcl.schedule", tools::Time::GetSystemTicks() << " " + << pMostUrgent << " invoke-out" ); + // eventually pop the scheduler stack // this just happens for nested calls, which renders all accounting // invalid, so we just enforce a rescheduling! diff --git a/vcl/win/app/salinst.cxx b/vcl/win/app/salinst.cxx index 6833c546a5ce..8e718e37e883 100644 --- a/vcl/win/app/salinst.cxx +++ b/vcl/win/app/salinst.cxx @@ -245,8 +245,8 @@ sal_uLong ImplSalReleaseYieldMutex() return 0; SalYieldMutex* pYieldMutex
[Libreoffice-commits] core.git: 3 commits - vcl/source
vcl/source/window/dockmgr.cxx | 24 +--- 1 file changed, 13 insertions(+), 11 deletions(-) New commits: commit c95293de347597bb32d3c4aa5429b21385cae97a Author: Maxim MonastirskyDate: Wed Dec 21 04:42:34 2016 +0200 Fix the table border toolbar popup Using ImplPopupFloatWin for it isn't a good idea: It doesn't need its dragging code, nor its painting code (which draws the ugly black border), and the resizing code conflicts with the title-based border which results in a wrong size (and we might have even bigger problems, if we start to use .ui based layouts for the ToolbarPopup class). We can of course put checks all over the place, but why do it, if we can simply use plain FloatingWindow? Change-Id: Ibc9a5c220309d15a60f6425835e1cc7a1b19c530 diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx index fa6e3b8..ac587a6 100644 --- a/vcl/source/window/dockmgr.cxx +++ b/vcl/source/window/dockmgr.cxx @@ -435,8 +435,7 @@ private: voidImplSetBorder(); public: -ImplPopupFloatWin( vcl::Window* pParent, ImplDockingWindowWrapper* pDockingWin, - bool bHasGrip, bool bUsePopupWin ); +ImplPopupFloatWin( vcl::Window* pParent, ImplDockingWindowWrapper* pDockingWin, bool bHasGrip ); virtual ~ImplPopupFloatWin() override; virtual void dispose() override; @@ -456,16 +455,15 @@ public: boolhasGrip() const { return mbHasGrip; } }; -ImplPopupFloatWin::ImplPopupFloatWin( vcl::Window* pParent, ImplDockingWindowWrapper* pDockingWin, -bool bHasGrip, bool bUsePopupWin ) : -FloatingWindow( pParent, bUsePopupWin ? WB_STDPOPUP : WB_NOBORDER | WB_SYSTEMWINDOW | WB_NOSHADOW) +ImplPopupFloatWin::ImplPopupFloatWin( vcl::Window* pParent, ImplDockingWindowWrapper* pDockingWin, bool bHasGrip ) : +FloatingWindow( pParent, WB_NOBORDER | WB_SYSTEMWINDOW | WB_NOSHADOW ) { mpWindowImpl->mbToolbarFloatingWindow = true; // indicate window type, required for accessibility // which should not see this window as a toplevel window mpDockingWin = pDockingWin; mbMoving = false; mbTrackingEnabled = false; -mbHasGrip = !bUsePopupWin && bHasGrip; +mbHasGrip = bHasGrip; ImplSetBorder(); } @@ -973,8 +971,11 @@ void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox, FloatWin bool bIsToolBox = GetWindow()->GetType() == WINDOW_TOOLBOX; // the new parent for popup mode -VclPtrInstance pWin( mpParent, this, bAllowTearOff, -bAllowTearOff && !bIsToolBox ); +VclPtr pWin; +if ( bAllowTearOff && !bIsToolBox ) +pWin = VclPtr::Create( mpParent, WB_STDPOPUP ); +else +pWin = VclPtr::Create( mpParent, this, bAllowTearOff ); pWin->SetPopupModeEndHdl( LINK( this, ImplDockingWindowWrapper, PopupModeEnd ) ); pWin->SetText( GetWindow()->GetText() ); @@ -987,7 +988,8 @@ void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox, FloatWin GetWindow()->mpWindowImpl->mnBottomBorder = 0; // position toolbox below the drag grip -GetWindow()->SetPosPixel( pWin->GetToolboxPosition() ); +if ( bIsToolBox ) +GetWindow()->SetPosPixel( static_cast ( pWin.get() )->GetToolboxPosition() ); // reparent borderwindow and window if ( mpOldBorderWin ) commit 90395eb694c0a9dd9033863d1def9678d4328943 Author: Maxim Monastirsky Date: Wed Dec 21 04:08:23 2016 +0200 Fix window height for the grip case Change-Id: I1a4d2c498971a5bf73dc7f89a0987e6f998cf7a6 diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx index d3042ec..fa6e3b8 100644 --- a/vcl/source/window/dockmgr.cxx +++ b/vcl/source/window/dockmgr.cxx @@ -500,7 +500,7 @@ void ImplPopupFloatWin::ImplSetBorder() // be used to set the proper window size mpWindowImpl->mnTopBorder = 1; if( hasGrip() ) -mpWindowImpl->mnTopBorder += 2 + ToolBox::ImplGetDragWidth( *this, false ); +mpWindowImpl->mnTopBorder += 1 + ToolBox::ImplGetDragWidth( *this, false ); mpWindowImpl->mnBottomBorder = 1; mpWindowImpl->mnLeftBorder= 1; mpWindowImpl->mnRightBorder = 1; commit 8f594cd9033b3020788feb30c0b1fd315b40119e Author: Maxim Monastirsky Date: Wed Dec 21 03:42:22 2016 +0200 Fix the non-grip case Change-Id: Ic5b2d96829e5fc97004b3bba9cbb6ded2e27f22f diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx index 65010f3..d3042ec 100644 --- a/vcl/source/window/dockmgr.cxx +++ b/vcl/source/window/dockmgr.cxx @@ -523,7 +523,7 @@ Rectangle ImplPopupFloatWin::GetDragRect() const Point ImplPopupFloatWin::GetToolboxPosition() const { // return inner position where a toolbox could be placed -return Point( 1, 1 +
[Libreoffice-commits] core.git: 3 commits - vcl/source vcl/unx
vcl/source/gdi/mapmod.cxx | 17 - vcl/unx/generic/dtrans/X11_selection.cxx|3 ++- vcl/unx/generic/dtrans/X11_transferable.cxx |2 +- 3 files changed, 11 insertions(+), 11 deletions(-) New commits: commit 5f293414d62ac93fc150a44f070980a808469ab1 Author: Thorsten BehrensDate: Tue Nov 15 03:54:10 2016 +0100 vcl: include redux in MapMode Change-Id: Icc43510a3e561b426319465ea98eb374a3aa1f8d diff --git a/vcl/source/gdi/mapmod.cxx b/vcl/source/gdi/mapmod.cxx index 9a804b0..422d6d8 100644 --- a/vcl/source/gdi/mapmod.cxx +++ b/vcl/source/gdi/mapmod.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include struct MapMode::ImplMapMode commit 30d6397809b741a49198497dea22d05336d17801 Author: Thorsten Behrens Date: Tue Nov 15 03:49:33 2016 +0100 vcl: cleanup whitespace in MapMode Change-Id: Ib790bab105c337d62ffc93f72bf6da49a74f00cf diff --git a/vcl/source/gdi/mapmod.cxx b/vcl/source/gdi/mapmod.cxx index e981a5d..9a804b0 100644 --- a/vcl/source/gdi/mapmod.cxx +++ b/vcl/source/gdi/mapmod.cxx @@ -49,8 +49,8 @@ MapMode::ImplMapMode::ImplMapMode() : maScaleX( 1, 1 ), maScaleY( 1, 1 ) { -meUnit = MapUnit::MapPixel; -mbSimple= true; +meUnit = MapUnit::MapPixel; +mbSimple = true; } MapMode::ImplMapMode::ImplMapMode( const ImplMapMode& rImplMapMode ) : @@ -64,7 +64,7 @@ MapMode::ImplMapMode::ImplMapMode( const ImplMapMode& rImplMapMode ) : bool MapMode::ImplMapMode::operator==( const ImplMapMode& rImpMapMode ) const { -if (meUnit == rImpMapMode.meUnit +if (meUnit == rImpMapMode.meUnit && maOrigin == rImpMapMode.maOrigin && maScaleX == rImpMapMode.maScaleX && maScaleY == rImpMapMode.maScaleY) @@ -88,7 +88,7 @@ MapMode::MapMode( const MapMode& rMapMode ) : mpImplMapMode( rMapMode.mpImplMapM MapMode::MapMode( MapUnit eUnit ) : mpImplMapMode() { -mpImplMapMode->meUnit = eUnit; +mpImplMapMode->meUnit = eUnit; } MapMode::MapMode( MapUnit eUnit, const Point& rLogicOrg, @@ -100,7 +100,7 @@ MapMode::MapMode( MapUnit eUnit, const Point& rLogicOrg, mpImplMapMode->maScaleY = rScaleY; mpImplMapMode->maScaleX.ReduceInaccurate(32); mpImplMapMode->maScaleY.ReduceInaccurate(32); -mpImplMapMode->mbSimple= false; +mpImplMapMode->mbSimple = false; } MapMode::~MapMode() @@ -131,7 +131,7 @@ void MapMode::SetScaleY( const Fraction& rScaleY ) double MapMode::GetUnitMultiplier() const { -double nMul; +double nMul; switch ( GetMapUnit() ) { case MapUnit::MapPixel : @@ -199,8 +199,8 @@ bool MapMode::IsDefault() const SvStream& ReadMapMode( SvStream& rIStm, MapMode& rMapMode ) { -VersionCompat aCompat( rIStm, StreamMode::READ ); -sal_uInt16 nTmp16; +VersionCompat aCompat( rIStm, StreamMode::READ ); +sal_uInt16nTmp16; rIStm.ReadUInt16( nTmp16 ); rMapMode.mpImplMapMode->meUnit = (MapUnit) nTmp16; ReadPair( rIStm, rMapMode.mpImplMapMode->maOrigin ); commit d55bbd9ea2e37bf902894a6eeb1560cc981f182e Author: Thorsten Behrens Date: Tue Nov 15 03:30:52 2016 +0100 vcl: add/unify some clipboard SAL_INFO tracing Change-Id: I4989da02cbc82d253a486a7adde95551eddb45b3 diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx b/vcl/unx/generic/dtrans/X11_selection.cxx index cca391c..969dfe4 100644 --- a/vcl/unx/generic/dtrans/X11_selection.cxx +++ b/vcl/unx/generic/dtrans/X11_selection.cxx @@ -769,6 +769,7 @@ void SelectionManager::convertTypeToNative( const OUString& rType, Atom selectio int nTabEntries = selection == m_nXdndSelection ? SAL_N_ELEMENTS(aXdndConversionTab) : SAL_N_ELEMENTS(aNativeConversionTab); OString aType( OUStringToOString( rType, RTL_TEXTENCODING_ISO_8859_1 ) ); +SAL_INFO( "vcl.unx.dtrans", "convertTypeToNative " << aType ); rFormat = 0; for( int i = 0; i < nTabEntries; i++ ) { @@ -1457,7 +1458,7 @@ bool SelectionManager::sendData( SelectionAdaptor* pAdaptor, // conversion succeeded, so aData contains image/bmp now if( pPixmap->needsConversion( reinterpret_cast(aData.getConstArray()) ) ) { -SAL_INFO( "vcl", "trying bitmap conversion" ); +SAL_INFO( "vcl.unx.dtrans", "trying bitmap conversion" ); int depth = pPixmap->getDepth(); aGuard.clear(); aData = convertBitmapDepth(aData, depth); diff --git a/vcl/unx/generic/dtrans/X11_transferable.cxx b/vcl/unx/generic/dtrans/X11_transferable.cxx index 9bd683d..9e6714c 100644 --- a/vcl/unx/generic/dtrans/X11_transferable.cxx +++ b/vcl/unx/generic/dtrans/X11_transferable.cxx @@ -62,7 +62,7 @@ Any SAL_CALL X11Transferable::getTransferData( const DataFlavor& rFlavor ) if(
[Libreoffice-commits] core.git: 3 commits - vcl/source
vcl/source/filter/igif/gifread.cxx |2 vcl/source/filter/sgvmain.cxx | 352 ++--- vcl/source/filter/sgvmain.hxx |1 3 files changed, 217 insertions(+), 138 deletions(-) New commits: commit f6ed2305abb0289ad51605ceeaee607a0bc8d7bd Author: Michael StahlDate: Thu Jun 2 14:11:40 2016 +0200 vcl: GIF import: don't use __LP64__ to check for a 64-bit system __LP64__ is not defined in MSVC AMD64 builds, since it doesn't have 64-bit longs. This caused the vcl_filters_test to fail because loading the file for which that check is a work-around succeeded. Change-Id: I4df48d4b196a1d08e9bd5ef61b64ec63501037c9 diff --git a/vcl/source/filter/igif/gifread.cxx b/vcl/source/filter/igif/gifread.cxx index aac672f..f008b1b 100644 --- a/vcl/source/filter/igif/gifread.cxx +++ b/vcl/source/filter/igif/gifread.cxx @@ -172,7 +172,7 @@ void GIFReader::CreateBitmaps( long nWidth, long nHeight, BitmapPalette* pPal, { const Size aSize( nWidth, nHeight ); -#ifdef __LP64__ +#if SAL_TYPES_SIZEOFPOINTER == 8 // Don't bother allocating a bitmap of a size that would fail on a // 32-bit system. We have at least one unit tests that is expected // to fail (loading a 65535*65535 size GIF commit e144eeb1ca868e93f5a69ca14a12b036def45980 Author: Michael Stahl Date: Thu Jun 2 13:31:41 2016 +0200 vcl: remove pointless check This would have been more useful if it checked one of the other types that use inheritance. It would also be more useful if it actually did something to report the issue instead of silently reporting success. Change-Id: I684146244d4eec15669b499e40214b8ede70741f diff --git a/vcl/source/filter/sgvmain.cxx b/vcl/source/filter/sgvmain.cxx index 73a3b0d..bdae296 100644 --- a/vcl/source/filter/sgvmain.cxx +++ b/vcl/source/filter/sgvmain.cxx @@ -914,10 +914,6 @@ bool SgfFilterSDrw( SvStream& rInp, SgfHeader&, SgfEntry&, GDIMetaFile& rMtf ) bool SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, const INetURLObject& _aIniPath ) { -#if OSL_DEBUG_LEVEL > 1 // check record size. New compiler possibly aligns different! -if (sizeof(ObjTextType)!=ObjTextTypeSize) return false; -#endif - sal_uLong nFileStart;// offset of SgfHeaders. In general 0. SgfHeader aHead; SgfEntryaEntr; commit af8509fa194e6747c82a9df9a1c465be82a32637 Author: Michael Stahl Date: Thu Jun 2 12:54:36 2016 +0200 vcl: fix "sgv" import filter on 64-bit MSVC This filter reads entire structs at a time from the SvStream, including structs that are derived from other structs. This happens to work fine with GCC by chance, but MSVC AMD64 by default aligns structs to 8 bytes, and that means if sizeof(super-stuct) = 20 then 4 bytes of padding are inserted and that ruins the import. This causes vcl_filters_test to go into an infinite loop reading SaveAsPicture.sgv. Fix this by reading each member of the structs separately, which also means that the filter doesn't need to byte-swap every member on big-endian platforms since SvStream methods already do that. Change-Id: I237725dbcde5232006728179e645776fcb79cac3 diff --git a/vcl/source/filter/sgvmain.cxx b/vcl/source/filter/sgvmain.cxx index 18e2d2c..73a3b0d 100644 --- a/vcl/source/filter/sgvmain.cxx +++ b/vcl/source/filter/sgvmain.cxx @@ -35,52 +35,6 @@ p.x=OSL_SWAPWORD(p.x); \ p.y=OSL_SWAPWORD(p.y); } -#define SWAPPAGE(p) { \ -p.Next =OSL_SWAPDWORD (p.Next ); \ -p.nList =OSL_SWAPDWORD (p.nList ); \ -p.ListEnd=OSL_SWAPDWORD (p.ListEnd); \ -p.Paper.Size.x=OSL_SWAPWORD(p.Paper.Size.x); \ -p.Paper.Size.y=OSL_SWAPWORD(p.Paper.Size.y); \ -p.Paper.RandL =OSL_SWAPWORD(p.Paper.RandL ); \ -p.Paper.RandR =OSL_SWAPWORD(p.Paper.RandR ); \ -p.Paper.RandO =OSL_SWAPWORD(p.Paper.RandO ); \ -p.Paper.RandU =OSL_SWAPWORD(p.Paper.RandU ); \ -SWAPPOINT(p.U); \ -sal_uInt16 iTemp; \ -for (iTemp=0;iTemp<20;iTemp++) { \ -rPage.HlpLnH[iTemp]=OSL_SWAPWORD(rPage.HlpLnH[iTemp]); \ -rPage.HlpLnV[iTemp]=OSL_SWAPWORD(rPage.HlpLnV[iTemp]); }} - -#define SWAPOBJK(o) { \ -o.Last=OSL_SWAPDWORD (o.Last); \ -o.Next=OSL_SWAPDWORD (o.Next); \ -o.MemSize =OSL_SWAPWORD(o.MemSize ); \ -SWAPPOINT(o.ObjMin); \ -SWAPPOINT(o.ObjMax); } - -#define SWAPLINE(l) { \ -l.LMSize=OSL_SWAPWORD(l.LMSize); \ -l.LDicke=OSL_SWAPWORD(l.LDicke); } - -#define SWAPAREA(a) { \ -a.FDummy2=OSL_SWAPWORD(a.FDummy2); \ -a.FMuster=OSL_SWAPWORD(a.FMuster); } - -#define SWAPTEXT(t) { \ -SWAPLINE(t.L); \ -SWAPAREA(t.F);
[Libreoffice-commits] core.git: 3 commits - vcl/source
vcl/source/app/svmain.cxx | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) New commits: commit b3e8406f53e29e4401d24b8aaa3020766cc61f02 Author: Tor LillqvistDate: Mon Feb 15 22:47:25 2016 +0200 loplugin:nullptr Change-Id: I8dafbf99638fd24828327ce4493bfbbf1b9d2c6d diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx index 0f329e604..f59f5f9 100644 --- a/vcl/source/app/svmain.cxx +++ b/vcl/source/app/svmain.cxx @@ -244,9 +244,9 @@ uno::Any SAL_CALL DesktopEnvironmentContext::getValueByName( const OUString& Nam static bool isInitVCL() { ImplSVData* pSVData = ImplGetSVData(); -return pExceptionHandler != NULL && -pSVData->mpApp != NULL && -pSVData->mpDefInst != NULL; +return pExceptionHandler != nullptr && +pSVData->mpApp != nullptr && +pSVData->mpDefInst != nullptr; } bool InitVCL() commit b07fd644bab69fb19c58e6dae394e963a463d2e1 Author: Tor Lillqvist Date: Mon Feb 15 22:45:33 2016 +0200 loplugin:simplifybool conditional expression of the form '!A ? B : true' (with A of type 'bool' and B of type 'bool') can literally be simplified as 'A || B'. Change-Id: I46bee836425bf1c76def23e30dca9ddd9e791b42 diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx index 2eb36ef..0f329e604 100644 --- a/vcl/source/app/svmain.cxx +++ b/vcl/source/app/svmain.cxx @@ -158,7 +158,7 @@ int ImplSVMain() int nReturn = EXIT_FAILURE; -bool bInit = (!isInitVCL() ? InitVCL() : true); +bool bInit = isInitVCL() || InitVCL(); if( bInit ) { commit bc8dfe47596f28ff43ec01af4487a2abe349caee Author: Henry Castro Date: Mon Sep 7 17:33:09 2015 -0400 vcl: add isInitVCL, to not initialize twice In the preinit stage, the VCL is initialized in the parent process and when the lo_startmain thread is started, the thread initialize VCL again. It is not necessary to initialize twice. Change-Id: I819cf0125afe7760c3f4d91c420d36a3a383902c diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx index eba0c10..2eb36ef 100644 --- a/vcl/source/app/svmain.cxx +++ b/vcl/source/app/svmain.cxx @@ -92,6 +92,8 @@ using namespace ::com::sun::star; +static bool isInitVCL(); + oslSignalAction SAL_CALL VCLExceptionSignal_impl( void* /*pData*/, oslSignalInfo* pInfo) { static bool bIn = false; @@ -156,7 +158,7 @@ int ImplSVMain() int nReturn = EXIT_FAILURE; -bool bInit = InitVCL(); +bool bInit = (!isInitVCL() ? InitVCL() : true); if( bInit ) { @@ -239,6 +241,14 @@ uno::Any SAL_CALL DesktopEnvironmentContext::getValueByName( const OUString& Nam return retVal; } +static bool isInitVCL() +{ +ImplSVData* pSVData = ImplGetSVData(); +return pExceptionHandler != NULL && +pSVData->mpApp != NULL && +pSVData->mpDefInst != NULL; +} + bool InitVCL() { if( pExceptionHandler != nullptr ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 3 commits - vcl/source
vcl/source/fontsubset/cff.cxx | 23 +-- 1 file changed, 9 insertions(+), 14 deletions(-) New commits: commit f2ac9caf85d717d417ea7221316ae43b1418548f Author: Stephan BergmannDate: Fri Sep 4 17:28:58 2015 +0200 Reduce nVal scope Change-Id: Id5756033ccfbe392ae8264afbd3e2e0afd487f6b diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx index 093cd09..f026a67 100644 --- a/vcl/source/fontsubset/cff.cxx +++ b/vcl/source/fontsubset/cff.cxx @@ -506,7 +506,6 @@ void CffSubsetterContext::setCharStringType( int nVal) void CffSubsetterContext::readDictOp() { -ValType nVal = 0; const U8 c = *mpReadPtr; if( c <= 21 ) { int nOpId = *(mpReadPtr++); @@ -534,8 +533,8 @@ void CffSubsetterContext::readDictOp() default: break; // TODO: handle more boolean dictops? } break; -case 'n': // dict-op number -nVal = popVal(); +case 'n': { // dict-op number +ValType nVal = popVal(); nInt = static_cast(nVal); switch( nOpId) { case 10: mpCffLocal->maStemStdHW = nVal; break;// "StdHW" @@ -555,7 +554,7 @@ void CffSubsetterContext::readDictOp() case 937: mnFDSelectBase = nInt; break; // "nFDSelect" default: break; // TODO: handle more numeric dictops? } -break; +} break; case 'a': { // array switch( nOpId) { case 5: maFontBBox.clear(); break; // "FontBBox" @@ -563,7 +562,7 @@ void CffSubsetterContext::readDictOp() default: break; // TODO: reset other arrays? } for( int i = 0; i < size(); ++i ) { -nVal = getVal(i); +ValType nVal = getVal(i); switch( nOpId) { case 5: maFontBBox.push_back( nVal); break; // "FontBBox" case 907: maFontMatrix.push_back( nVal); break; // "FontMatrix" @@ -573,7 +572,7 @@ void CffSubsetterContext::readDictOp() clear(); } break; case 'd': { // delta array -nVal = 0; +ValType nVal = 0; for( int i = 0; i < size(); ++i ) { nVal += getVal(i); switch( nOpId) { @@ -626,13 +625,13 @@ void CffSubsetterContext::readDictOp() if( (sizeof(nS32) != 4) && (nS32 & (1U<<31))) nS32 |= (~0U) << 31;// assuming 2s complement mpReadPtr += 4; -nVal = static_cast(nS32); +ValType nVal = static_cast(nS32); push( nVal ); } else if( c == 30) { // real number ++mpReadPtr; // skip 30 const RealType fReal = readRealVal(); // push value onto stack -nVal = fReal; +ValType nVal = fReal; push( nVal); } } commit 8fde3dd4da0bffb5294109b5ee5c4441eb558a5d Author: Stephan Bergmann Date: Fri Sep 4 17:26:05 2015 +0200 Uniformly use if --- else if brachnes here Change-Id: I80d9d0d4c4d56aa8d52dc2e108a9b24025fb0f76 diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx index ead725a..093cd09 100644 --- a/vcl/source/fontsubset/cff.cxx +++ b/vcl/source/fontsubset/cff.cxx @@ -614,11 +614,7 @@ void CffSubsetterContext::readDictOp() setCharStringType( nInt ); break; } - -return; -} - -if( (c >= 32) || (c == 28) ) { +} else if( (c >= 32) || (c == 28) ) { // --mpReadPtr; read2push(); } else if( c == 29 ) { // longint commit 9909bcb88ec68d52a0f863319d9b4d12cc90b20c Author: Stephan Bergmann Date: Fri Sep 4 17:25:10 2015 +0200 clang-tidy clang-analyzer-deadcode.DeadStores Change-Id: I1588f55b4be2d32dcafae27ac45eb5def1407fa6 diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx index a4cbf53..ead725a 100644 --- a/vcl/source/fontsubset/cff.cxx +++ b/vcl/source/fontsubset/cff.cxx @@ -606,7 +606,7 @@ void CffSubsetterContext::readDictOp() int nSid2 = popInt(); (void)nSid1; // TODO: use (void)nSid2; // TODO: use -nVal = popVal(); +popVal(); mbCIDFont = true; } break; case 't': // CharstringType ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 3 commits - vcl/source
vcl/source/gdi/pdfwriter_impl.cxx |2 +- vcl/source/gdi/pdfwriter_impl.hxx |8 vcl/source/gdi/pngread.cxx|7 +++ vcl/source/gdi/print3.cxx |3 ++- 4 files changed, 10 insertions(+), 10 deletions(-) New commits: commit b024e36ddb3b53163d7a01f6f7b5aadb7a858cd9 Author: Caolán McNamara caol...@redhat.com Date: Tue Mar 31 08:45:24 2015 +0100 cppcheck: can add explicit to ctor Change-Id: I9b626a8c5674157033f62f5aff10259136d21a42 diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 5e3cc6f..f62fa73 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -12608,7 +12608,7 @@ sal_Int32 PDFWriterImpl::beginStructureElement( PDFWriter::StructElement eType, { rEle.m_nObject = createObject(); // update parent's kids list -m_aStructure[ rEle.m_nParentElement ].m_aKids.push_back( rEle.m_nObject ); +m_aStructure[ rEle.m_nParentElement ].m_aKids.push_back(PDFStructureElementKid(rEle.m_nObject)); } return nNewId; } diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx index 43bb0c5..1f2ac6b 100644 --- a/vcl/source/gdi/pdfwriter_impl.hxx +++ b/vcl/source/gdi/pdfwriter_impl.hxx @@ -333,7 +333,7 @@ public: sal_Int32 m_nFontID; FontEmitMapping m_aMapping; -FontEmit( sal_Int32 nID ) : m_nFontID( nID ) {} +explicit FontEmit( sal_Int32 nID ) : m_nFontID( nID ) {} }; typedef std::list FontEmit FontEmitList; struct Glyph @@ -494,12 +494,12 @@ public: nValue( 0 ) {} -PDFStructureAttribute( PDFWriter::StructAttributeValue eVal ) +explicit PDFStructureAttribute( PDFWriter::StructAttributeValue eVal ) : eValue( eVal ), nValue( 0 ) {} -PDFStructureAttribute( sal_Int32 nVal ) +explicit PDFStructureAttribute( sal_Int32 nVal ) : eValue( PDFWriter::Invalid ), nValue( nVal ) {} @@ -513,7 +513,7 @@ public: // else the page object relevant to MCID sal_Int32 nMCID;// an MCID if = 0 -PDFStructureElementKid( sal_Int32 nObj ) : nObject( nObj ), nMCID( -1 ) {} +explicit PDFStructureElementKid( sal_Int32 nObj ) : nObject( nObj ), nMCID( -1 ) {} PDFStructureElementKid( sal_Int32 MCID, sal_Int32 nPage ) : nObject( nPage ), nMCID( MCID ) {} }; diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx index b4b16f9..519a278 100644 --- a/vcl/source/gdi/pngread.cxx +++ b/vcl/source/gdi/pngread.cxx @@ -155,8 +155,8 @@ private: public: -PNGReaderImpl( SvStream ); -~PNGReaderImpl(); +explicit PNGReaderImpl( SvStream ); +~PNGReaderImpl(); BitmapExGetBitmapEx( const Size rPreviewSizeHint ); const std::vectorvcl::PNGReader::ChunkData GetAllChunks(); commit 2ecc29df60ae3ae98605d84dc212a69907d4bfbe Author: Caolán McNamara caol...@redhat.com Date: Tue Mar 31 08:44:56 2015 +0100 cppcheck: value that is never used Change-Id: If4707a661a447e5053df83c431ac9f4dab8ff5ae diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx index 62fc45f..b4b16f9 100644 --- a/vcl/source/gdi/pngread.cxx +++ b/vcl/source/gdi/pngread.cxx @@ -349,8 +349,7 @@ BitmapEx PNGReaderImpl::GetBitmapEx( const Size rPreviewSizeHint ) } // parse the remaining chunks -bool bRetFromNextChunk; -while( mbStatus !mbIDAT (bRetFromNextChunk = ReadNextChunk()) ) +while (mbStatus !mbIDAT ReadNextChunk()) { switch( mnChunkType ) { commit f0f0d90ba613f568ffdc1531ce7c9bce23c22bcd Author: Caolán McNamara caol...@redhat.com Date: Tue Mar 31 08:43:52 2015 +0100 cppcheck: scope can be reduced Change-Id: I62e1c203e5224e69b4864f321287f2fcbe3db08f diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index 3bd9f05..543ab88 100644 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -654,7 +654,7 @@ bool Printer::StartJob( const OUString i_rJobName, std::shared_ptrvcl::Printer for( int nJobIteration = 0; nJobIteration nJobs; nJobIteration++ ) { -bool bError = false, bAborted = false; +bool bError = false; if( mpPrinter-StartJob( pPrintFile, i_rJobName, Application::GetDisplayName(), @@ -663,6 +663,7 @@ bool Printer::StartJob( const OUString i_rJobName, std::shared_ptrvcl::Printer i_xController-isDirectPrint(), maJobSetup.ImplGetConstData() ) ) { +bool bAborted = false; mbJobActive = true;
[Libreoffice-commits] core.git: 3 commits - vcl/source xmloff/source xmlsecurity/source
vcl/source/window/mnemonic.cxx| 37 -- xmloff/source/style/xmlbahdl.cxx | 17 xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx |7 - 3 files changed, 6 insertions(+), 55 deletions(-) New commits: commit 11bed72b2a0c3f51dde4733875486a5c181902ef Author: Caolán McNamara caol...@redhat.com Date: Thu Feb 26 14:33:07 2015 + cppcheck: unreadVariable Change-Id: Id4c43a6bcdf915b98410af9ceb0dbf20df3a9498 diff --git a/vcl/source/window/mnemonic.cxx b/vcl/source/window/mnemonic.cxx index 730e6a2..9ccb441 100644 --- a/vcl/source/window/mnemonic.cxx +++ b/vcl/source/window/mnemonic.cxx @@ -287,49 +287,12 @@ OUString MnemonicGenerator::CreateMnemonic( const OUString _rKey ) nIndex--; } rKey = rKey.replaceAt( nIndex, 0, aStr ); -bChanged = true; break; } } } } -// #i87415# Duplicates mnemonics are bad for consistent keyboard accessibility -// It's probably better to not have mnemonics for some widgets, than to have ambiguous ones. -//if( ! bChanged ) -//{ -///* -// * #97809# if all else fails use the first character of a word -// * anyway and live with duplicate mnemonics -// */ -//nIndex = 0; -//do -//{ -//c = aKey.GetChar( nIndex ); - -//nMnemonicIndex = ImplGetMnemonicIndex( c ); -//if ( nMnemonicIndex != MNEMONIC_INDEX_NOTFOUND ) -//{ -//maMnemonics[nMnemonicIndex] = 0; -//rKey.Insert( MNEMONIC_CHAR, nIndex ); -//bChanged = true; -//break; -//} - -//// Search for next word -//do -//{ -//nIndex++; -//c = aKey.GetChar( nIndex ); -//if ( c == ' ' ) -//break; -//} -//while ( nIndex nLen ); -//nIndex++; -//} -//while ( nIndex nLen ); -//} - return rKey; } commit bcce2502a3c0a8bbb503a5b48de07defe21b09f0 Author: Caolán McNamara caol...@redhat.com Date: Thu Feb 26 14:19:47 2015 + cppcheck: redundantAssignment Change-Id: Iee0fcb8e2b91a6554bedc7e3989c0585a1679a61 diff --git a/xmloff/source/style/xmlbahdl.cxx b/xmloff/source/style/xmlbahdl.cxx index ac90a0b..bee67a4 100644 --- a/xmloff/source/style/xmlbahdl.cxx +++ b/xmloff/source/style/xmlbahdl.cxx @@ -186,12 +186,9 @@ XMLMeasurePropHdl::~XMLMeasurePropHdl() bool XMLMeasurePropHdl::importXML( const OUString rStrImpValue, Any rValue, const SvXMLUnitConverter rUnitConverter ) const { -bool bRet = false; - sal_Int32 nValue = 0; -bRet = rUnitConverter.convertMeasureToCore( nValue, rStrImpValue ); +bool bRet = rUnitConverter.convertMeasureToCore( nValue, rStrImpValue ); lcl_xmloff_setAny( rValue, nValue, nBytes ); - return bRet; } @@ -407,7 +404,6 @@ bool XMLNegPercentPropHdl::exportXML( OUString rStrExpValue, const Any rValue, } // class XMLMeasurePxPropHdl - XMLMeasurePxPropHdl::~XMLMeasurePxPropHdl() { // nothing to do @@ -415,12 +411,9 @@ XMLMeasurePxPropHdl::~XMLMeasurePxPropHdl() bool XMLMeasurePxPropHdl::importXML( const OUString rStrImpValue, Any rValue, const SvXMLUnitConverter ) const { -bool bRet = false; - sal_Int32 nValue = 0; -bRet = ::sax::Converter::convertMeasurePx( nValue, rStrImpValue ); +bool bRet = ::sax::Converter::convertMeasurePx( nValue, rStrImpValue ); lcl_xmloff_setAny( rValue, nValue, nBytes ); - return bRet; } @@ -558,12 +551,8 @@ XMLStringPropHdl::~XMLStringPropHdl() bool XMLStringPropHdl::importXML( const OUString rStrImpValue, Any rValue, const SvXMLUnitConverter ) const { -bool bRet = false; - rValue = rStrImpValue; -bRet = true; - -return bRet; +return true; } bool XMLStringPropHdl::exportXML( OUString rStrExpValue, const Any rValue, const SvXMLUnitConverter ) const commit 44e1eaea6acc248db48a9b6b587baff7d24a6742 Author: Caolán McNamara caol...@redhat.com Date: Thu Feb 26 14:14:49 2015 + cppcheck: variableScope Change-Id: I2dbab9e972c7470e9bd30692e54c51ee11ffd45b diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx index 8a14ed4..cfa3b8a 100644 --- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx +++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx @@ -364,7 +364,6 @@ SecurityEnvironment_NssImpl::getPersonalCertificates() throw( SecurityException { PK11SlotInfo *slot = *is; SECKEYPrivateKeyList* priKeyList ; -SECKEYPrivateKeyListNode* curPri ; if( PK11_NeedLogin(slot ) ) { SECStatus nRet =
[Libreoffice-commits] core.git: 3 commits - vcl/source
vcl/source/fontsubset/sft.cxx | 23 +-- 1 file changed, 17 insertions(+), 6 deletions(-) New commits: commit c888c211072f23cfb4cc488c641d8d822f930a33 Author: Caolán McNamara caol...@redhat.com Date: Wed Jun 4 16:33:57 2014 +0100 Resolves: fdo#78477 ensure offset + sizeof(value) is in bounds check that largest offset + value to read is inside available space Change-Id: I4feac37bdfbae5061b3b75ddf44bb20fc5904656 diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx index 8fd2b14..c40d75c 100644 --- a/vcl/source/fontsubset/sft.cxx +++ b/vcl/source/fontsubset/sft.cxx @@ -44,6 +44,7 @@ #ifndef NO_TYPE3 /* include CreateT3FromTTGlyphs() */ #include rtl/crc.h #endif +#include rtl/ustring.hxx #include osl/endian.h #include algorithm @@ -2556,12 +2557,22 @@ int GetTTNameRecords(TrueTypeFont *ttf, NameRecord **nr) NameRecord* rec = (NameRecord*)calloc(n, sizeof(NameRecord)); for (i = 0; i n; i++) { +int nLargestFixedOffsetPos = 6 + 10 + 12 * i; +int nMinSize = nLargestFixedOffsetPos + sizeof(sal_uInt16); +if (nMinSize nTableSize) +{ +SAL_WARN( vcl.fonts, Font OUString::createFromAscii(ttf-fname) claimed to have + n name records, but only space for i); +n = i; +break; +} + rec[i].platformID = GetUInt16(table, 6 + 0 + 12 * i, 1); rec[i].encodingID = GetUInt16(table, 6 + 2 + 12 * i, 1); rec[i].languageID = GetUInt16(table, 6 + 4 + 12 * i, 1); rec[i].nameID = GetUInt16(table, 6 + 6 + 12 * i, 1); rec[i].slen = GetUInt16(table, 6 + 8 + 12 * i, 1); -int nStrOffset = GetUInt16(table, 6 + 10 + 12 * i, 1); +int nStrOffset = GetUInt16(table, nLargestFixedOffsetPos, 1); if (rec[i].slen) { if( nStrBase+nStrOffset+rec[i].slen = nTableSize ) { rec[i].sptr = 0; commit 95e92889d3fb0e8a85cefdeb07a02e57130a9799 Author: Caolán McNamara caol...@redhat.com Date: Wed Jun 4 16:21:34 2014 +0100 sort in order of increasing offset Change-Id: I0d2c880438f47f4527037d7ffaf77cf142d24751 diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx index 21d6c55..8fd2b14 100644 --- a/vcl/source/fontsubset/sft.cxx +++ b/vcl/source/fontsubset/sft.cxx @@ -2556,12 +2556,12 @@ int GetTTNameRecords(TrueTypeFont *ttf, NameRecord **nr) NameRecord* rec = (NameRecord*)calloc(n, sizeof(NameRecord)); for (i = 0; i n; i++) { -int nStrOffset = GetUInt16(table, 6 + 10 + 12 * i, 1); -rec[i].platformID = GetUInt16(table, 6 + 12 * i, 1); +rec[i].platformID = GetUInt16(table, 6 + 0 + 12 * i, 1); rec[i].encodingID = GetUInt16(table, 6 + 2 + 12 * i, 1); rec[i].languageID = GetUInt16(table, 6 + 4 + 12 * i, 1); rec[i].nameID = GetUInt16(table, 6 + 6 + 12 * i, 1); rec[i].slen = GetUInt16(table, 6 + 8 + 12 * i, 1); +int nStrOffset = GetUInt16(table, 6 + 10 + 12 * i, 1); if (rec[i].slen) { if( nStrBase+nStrOffset+rec[i].slen = nTableSize ) { rec[i].sptr = 0; commit 57ef375bed4480bbedc799aca274a6bd26745008 Author: Caolán McNamara caol...@redhat.com Date: Wed Jun 4 16:17:28 2014 +0100 ptr is just added to offset, so move addition into 2nd arg Change-Id: Ia3e8145c69324f19aeec8b0dd97284ec382d20d7 diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx index 8f07bb3..21d6c55 100644 --- a/vcl/source/fontsubset/sft.cxx +++ b/vcl/source/fontsubset/sft.cxx @@ -2556,12 +2556,12 @@ int GetTTNameRecords(TrueTypeFont *ttf, NameRecord **nr) NameRecord* rec = (NameRecord*)calloc(n, sizeof(NameRecord)); for (i = 0; i n; i++) { -int nStrOffset = GetUInt16(table + 6, 10 + 12 * i, 1); -rec[i].platformID = GetUInt16(table + 6, 12 * i, 1); -rec[i].encodingID = GetUInt16(table + 6, 2 + 12 * i, 1); -rec[i].languageID = GetUInt16(table + 6, 4 + 12 * i, 1); -rec[i].nameID = GetUInt16(table + 6, 6 + 12 * i, 1); -rec[i].slen = GetUInt16(table + 6, 8 + 12 * i, 1); +int nStrOffset = GetUInt16(table, 6 + 10 + 12 * i, 1); +rec[i].platformID = GetUInt16(table, 6 + 12 * i, 1); +rec[i].encodingID = GetUInt16(table, 6 + 2 + 12 * i, 1); +rec[i].languageID = GetUInt16(table, 6 + 4 + 12 * i, 1); +rec[i].nameID = GetUInt16(table, 6 + 6 + 12 * i, 1); +rec[i].slen = GetUInt16(table, 6 + 8 + 12 * i, 1); if (rec[i].slen) { if( nStrBase+nStrOffset+rec[i].slen = nTableSize ) { rec[i].sptr = 0; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 3 commits - vcl/source
vcl/source/outdev/outdev.cxx | 45 - vcl/source/outdev/outdevstate.cxx | 68 ++ vcl/source/outdev/text.cxx| 22 3 files changed, 68 insertions(+), 67 deletions(-) New commits: commit 94d0eb659ed1310f3d2647c83db8e54184c55e23 Author: Chris Sherlock chris.sherloc...@gmail.com Date: Mon Apr 28 20:29:21 2014 +1000 VCL move SetLayoutMode SetDigitLanguage from font.cxx to outdevstate.cxx Change-Id: Iaf48a39fa1d4d7b88143022e517f2c4e119e94d5 diff --git a/vcl/source/outdev/outdevstate.cxx b/vcl/source/outdev/outdevstate.cxx index 7ce35cf..228620a 100644 --- a/vcl/source/outdev/outdevstate.cxx +++ b/vcl/source/outdev/outdevstate.cxx @@ -288,6 +288,28 @@ void OutputDevice::SetDrawMode( sal_uLong nDrawMode ) mpAlphaVDev-SetDrawMode( nDrawMode ); } +void OutputDevice::SetLayoutMode( sal_uLong nTextLayoutMode ) +{ +if( mpMetaFile ) +mpMetaFile-AddAction( new MetaLayoutModeAction( nTextLayoutMode ) ); + +mnTextLayoutMode = nTextLayoutMode; + +if( mpAlphaVDev ) +mpAlphaVDev-SetLayoutMode( nTextLayoutMode ); +} + +void OutputDevice::SetDigitLanguage( LanguageType eTextLanguage ) +{ +if( mpMetaFile ) +mpMetaFile-AddAction( new MetaTextLanguageAction( eTextLanguage ) ); + +meTextLanguage = eTextLanguage; + +if( mpAlphaVDev ) +mpAlphaVDev-SetDigitLanguage( eTextLanguage ); +} + void OutputDevice::SetRasterOp( RasterOp eRasterOp ) { diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx index dd03ac4..4383e5e 100644 --- a/vcl/source/outdev/text.cxx +++ b/vcl/source/outdev/text.cxx @@ -681,28 +681,6 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo rLineInfo, return nMaxLineWidth; } -void OutputDevice::SetLayoutMode( sal_uLong nTextLayoutMode ) -{ -if( mpMetaFile ) -mpMetaFile-AddAction( new MetaLayoutModeAction( nTextLayoutMode ) ); - -mnTextLayoutMode = nTextLayoutMode; - -if( mpAlphaVDev ) -mpAlphaVDev-SetLayoutMode( nTextLayoutMode ); -} - -void OutputDevice::SetDigitLanguage( LanguageType eTextLanguage ) -{ -if( mpMetaFile ) -mpMetaFile-AddAction( new MetaTextLanguageAction( eTextLanguage ) ); - -meTextLanguage = eTextLanguage; - -if( mpAlphaVDev ) -mpAlphaVDev-SetDigitLanguage( eTextLanguage ); -} - void OutputDevice::SetTextColor( const Color rColor ) { commit 690b655f06af5717ecb79f0cb804342a78a6ba43 Author: Chris Sherlock chris.sherloc...@gmail.com Date: Mon Apr 28 20:25:25 2014 +1000 VCL move SetRasterOp SetDrawMode from outdev.cxx to outdevstate.cxx Change-Id: I8c597e5b9049cd23223ecf4376a4449ca1effb38 diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx index bd2ad9a..7eb435e 100644 --- a/vcl/source/outdev/outdev.cxx +++ b/vcl/source/outdev/outdev.cxx @@ -753,34 +753,6 @@ void OutputDevice::ImplGetFrameDev( const Point rPt, const Point rDevPt, const } -void OutputDevice::SetDrawMode( sal_uLong nDrawMode ) -{ - -mnDrawMode = nDrawMode; - -if( mpAlphaVDev ) -mpAlphaVDev-SetDrawMode( nDrawMode ); -} - -void OutputDevice::SetRasterOp( RasterOp eRasterOp ) -{ - -if ( mpMetaFile ) -mpMetaFile-AddAction( new MetaRasterOpAction( eRasterOp ) ); - -if ( meRasterOp != eRasterOp ) -{ -meRasterOp = eRasterOp; -mbInitLineColor = mbInitFillColor = true; - -if( mpGraphics || AcquireGraphics() ) -mpGraphics-SetXORMode( (ROP_INVERT == meRasterOp) || (ROP_XOR == meRasterOp), ROP_INVERT == meRasterOp ); -} - -if( mpAlphaVDev ) -mpAlphaVDev-SetRasterOp( eRasterOp ); -} - Color OutputDevice::ImplDrawModeToColor( const Color rColor ) const { Color aColor( rColor ); diff --git a/vcl/source/outdev/outdevstate.cxx b/vcl/source/outdev/outdevstate.cxx index 7a1ae46..7ce35cf 100644 --- a/vcl/source/outdev/outdevstate.cxx +++ b/vcl/source/outdev/outdevstate.cxx @@ -262,7 +262,6 @@ void OutputDevice::EnableOutput( bool bEnable ) mpAlphaVDev-EnableOutput( bEnable ); } - void OutputDevice::SetAntialiasing( sal_uInt16 nMode ) { if ( mnAntialiasing != nMode ) @@ -280,6 +279,34 @@ void OutputDevice::SetAntialiasing( sal_uInt16 nMode ) mpAlphaVDev-SetAntialiasing( nMode ); } +void OutputDevice::SetDrawMode( sal_uLong nDrawMode ) +{ + +mnDrawMode = nDrawMode; + +if( mpAlphaVDev ) +mpAlphaVDev-SetDrawMode( nDrawMode ); +} + +void OutputDevice::SetRasterOp( RasterOp eRasterOp ) +{ + +if ( mpMetaFile ) +mpMetaFile-AddAction( new MetaRasterOpAction( eRasterOp ) ); + +if ( meRasterOp != eRasterOp ) +{ +meRasterOp = eRasterOp; +mbInitLineColor = mbInitFillColor = true; + +if( mpGraphics || AcquireGraphics() ) +mpGraphics-SetXORMode( (ROP_INVERT == meRasterOp) || (ROP_XOR == meRasterOp), ROP_INVERT == meRasterOp ); +} + +if( mpAlphaVDev )
[Libreoffice-commits] core.git: 3 commits - vcl/source
vcl/source/gdi/outdev4.cxx | 203 ++--- 1 file changed, 64 insertions(+), 139 deletions(-) New commits: commit 30e0e6ff95417295874e23376f83fc5ff26bf3d7 Author: Chris Sherlock chris.sherloc...@gmail.com Date: Sat Apr 12 21:09:51 2014 +1000 Unify DrawGradient functions in OutputDevice Turns out that the two versions of DrawGradient in OutputDevice are almost exactly the same in every way, except one deals with a rectangle and the other with a PolyPolygon. So I just convert the Rectangle into a PolyPolygon and use the PolyPolygon function. Now that the functions are unified, the need for a seperate function to clip and draw the gradient is no longer really required, so I've merged this back into DrawGradient. Change-Id: I94d4af1bb7dd900495672f0c0481dc9a1083ff67 diff --git a/vcl/source/gdi/outdev4.cxx b/vcl/source/gdi/outdev4.cxx index 794c6d7..6b76788 100644 --- a/vcl/source/gdi/outdev4.cxx +++ b/vcl/source/gdi/outdev4.cxx @@ -606,100 +606,11 @@ void OutputDevice::SetGrayscaleColors( Gradient rGradient ) void OutputDevice::DrawGradient( const Rectangle rRect, const Gradient rGradient ) { -if ( mnDrawMode DRAWMODE_NOGRADIENT ) -return; // nothing to draw! - -if ( mbInitClipRegion ) -ImplInitClipRegion(); - -if ( mbOutputClipped ) -return; - -if ( !rRect.IsEmpty() ) -{ -if ( mnDrawMode ( DRAWMODE_BLACKGRADIENT | DRAWMODE_WHITEGRADIENT | DRAWMODE_SETTINGSGRADIENT) ) -{ -Color aColor = GetSingleColorGradientFill(); - -Push( PUSH_LINECOLOR | PUSH_FILLCOLOR ); -SetLineColor( aColor ); -SetFillColor( aColor ); -DrawRect( rRect ); -Pop(); -return; -} - -Gradient aGradient( rGradient ); - -if ( mnDrawMode ( DRAWMODE_GRAYGRADIENT | DRAWMODE_GHOSTEDGRADIENT ) ) -{ -SetGrayscaleColors( aGradient ); -} - -if( mpMetaFile ) -mpMetaFile-AddAction( new MetaGradientAction( rRect, aGradient ) ); - -if( !IsDeviceOutputNecessary() || ImplIsRecordLayout() ) -return; - -if ( !Rectangle( PixelToLogic( Point() ), GetOutputSize() ).IsEmpty() ) -{ -// convert rectangle to pixels -Rectangle aRect( ImplLogicToDevicePixel( rRect ) ); -aRect.Justify(); - -// do nothing if the rectangle is empty -if ( !aRect.IsEmpty() ) -{ -// we need a graphics -if ( !mpGraphics !ImplGetGraphics() ) -return; - -// secure clip region -Push( PUSH_CLIPREGION ); -IntersectClipRegion( rRect ); - -// because we draw with no border line, we have to expand gradient -// rect to avoid missing lines on the right and bottom edge -aRect.Left()--; -aRect.Top()--; -aRect.Right()++; -aRect.Bottom()++; - -if ( mbInitClipRegion ) -ImplInitClipRegion(); - -if ( !mbOutputClipped ) -{ -// gradients are drawn without border -if ( mbLineColor || mbInitLineColor ) -{ -mpGraphics-SetLineColor(); -mbInitLineColor = true; -} - -mbInitFillColor = true; - -// calculate step count if necessary -if ( !aGradient.GetSteps() ) -aGradient.SetSteps( GRADIENT_DEFAULT_STEPCOUNT ); - -if( aGradient.GetStyle() == GradientStyle_LINEAR || aGradient.GetStyle() == GradientStyle_AXIAL ) -ImplDrawLinearGradient( aRect, aGradient, false, NULL ); -else -ImplDrawComplexGradient( aRect, aGradient, false, NULL ); -} - -Pop(); -} -} -} +// Convert rectangle to a PolyPolygon by first converting to a Polygon +Polygon aPolygon ( rRect ); +PolyPolygon aPolyPoly ( aPolygon ); -if( mpAlphaVDev ) -{ -// #i32109#: Make gradient area opaque -mpAlphaVDev-ImplFillOpaqueRectangle( rRect ); -} +DrawGradient ( aPolyPoly, rGradient ); } void OutputDevice::ClipAndDrawGradientMetafile ( const Gradient rGradient, const PolyPolygon rPolyPoly ) @@ -720,69 +631,6 @@ void OutputDevice::ClipAndDrawGradientMetafile ( const Gradient rGradient, cons EnableOutput( bOldOutput ); } -void OutputDevice::ClipAndDrawGradient ( Gradient rGradient, const PolyPolygon rPolyPoly ) -{ -const Rectangle aBoundRect( rPolyPoly.GetBoundRect() ); - -if( !Rectangle( PixelToLogic( Point() ), GetOutputSize()
[Libreoffice-commits] core.git: 3 commits - vcl/source
vcl/source/gdi/print.cxx|4 ++-- vcl/source/helper/strhelper.cxx |4 ++-- vcl/source/window/dialog.cxx|4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) New commits: commit 02e355370dcac945172c0064258ce66a98d193fd Author: Tor Lillqvist t...@collabora.com Date: Fri Feb 28 11:49:58 2014 +0200 More EndDialog() cleanup Change-Id: I2e79190936d1eb7f55b521d2ce558fba45bf5f28 diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index 0d648a6..55f9856 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -790,7 +790,7 @@ bool Dialog::Close() if ( IsInExecute() ) { -EndDialog( false ); +EndDialog( RET_CANCEL ); mbInClose = false; return true; } @@ -1078,7 +1078,7 @@ void Dialog::EndAllDialogs( Window* pParent ) pTempModDialog = pModDialog-mpPrevExecuteDlg; if( !pParent || ( pParent pParent-IsWindowOrChild( pModDialog, true ) ) ) { -pModDialog-EndDialog( false ); +pModDialog-EndDialog( RET_CANCEL ); pModDialog-PostUserEvent( Link() ); } pModDialog = pTempModDialog; commit df94df2d7beba113f915c92f5ccb3af706ac08d6 Author: Tor Lillqvist t...@collabora.com Date: Fri Feb 28 11:48:01 2014 +0200 WaE: implicit conversion (IntegralCast) from bool to 'int' The bIncludeUntil parameter is used as a bool, so make it a bool. It is passed bool values anyway. Change-Id: If477419e8d94af69ad2bd5b452819e83a5a8149f diff --git a/vcl/source/helper/strhelper.cxx b/vcl/source/helper/strhelper.cxx index 4376ab1..53fd5b0 100644 --- a/vcl/source/helper/strhelper.cxx +++ b/vcl/source/helper/strhelper.cxx @@ -49,7 +49,7 @@ inline bool isProtect( sal_Unicode cChar ) return cChar == '`' || cChar == '\'' || cChar == ''; } -inline void CopyUntil( char* pTo, const char* pFrom, char cUntil, int bIncludeUntil = 0 ) +inline void CopyUntil( char* pTo, const char* pFrom, char cUntil, bool bIncludeUntil = false ) { do { @@ -80,7 +80,7 @@ inline void CopyUntil( char* pTo, const char* pFrom, char cUntil, int bInclude pFrom++; } -inline void CopyUntil( sal_Unicode* pTo, const sal_Unicode* pFrom, sal_Unicode cUntil, int bIncludeUntil = 0 ) +inline void CopyUntil( sal_Unicode* pTo, const sal_Unicode* pFrom, sal_Unicode cUntil, bool bIncludeUntil = false ) { do { commit 17ec83705ae7f005e4f729fe531c7f1e86415632 Author: Tor Lillqvist t...@collabora.com Date: Fri Feb 28 11:46:31 2014 +0200 WaE: implicit conversion (IntegralCast) from bool to 'sal_uLong' Change-Id: I5089279745c4247ec0006f2273f6ec3d40d7c2a2 diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index 968ebab..d6eb52d 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -698,12 +698,12 @@ Printer::~Printer() sal_uLong Printer::GetCapabilities( sal_uInt16 nType ) const { if ( IsDisplayPrinter() ) -return false; +return 0; if( mpInfoPrinter ) return mpInfoPrinter-GetCapabilities( maJobSetup.ImplGetConstData(), nType ); else -return false; +return 0; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 3 commits - vcl/source vcl/unx
vcl/source/control/scrbar.cxx|4 ++-- vcl/source/gdi/salgdilayout.cxx |4 ++-- vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx |8 +--- 3 files changed, 5 insertions(+), 11 deletions(-) New commits: commit a08f579e3704fbd97590f9b050d250ae445725a7 Author: Ivan Timofeev timofeev@gmail.com Date: Fri Jun 28 21:54:15 2013 +0400 fdo#63254: correct re-mirroring formula This patch fixes horizontal scrollbar in Calc when a sheet is RTL and UI is LTR. When a particular window (horizontal scrollbar in this case) is RTL and a whole UI is LTR this code used for mirroring and re-mirroring back coordinates. AFAICS mirroring is correct, but re-mirroring is not. The used formula comes from commit 69b684b12e42bf1396bdffca88ca880ac3c2e00b, and the same formula appears in the other variant of overloaded function mirror: mirror(sal_uInt32, const SalPoint*, SalPoint*, const OutputDevice*, bool), but it does not affect the bug. Change-Id: Iec9c53edce9d33be6b676d1094bed8bf92f2e435 diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx index 9d54573..3d34a5f 100644 --- a/vcl/source/gdi/salgdilayout.cxx +++ b/vcl/source/gdi/salgdilayout.cxx @@ -119,7 +119,7 @@ void SalGraphics::mirror( long x, const OutputDevice *pOutDev, bool bBack ) con { long devX = pOutDevRef-GetOutOffXPixel(); // re-mirrored mnOutOffX if( bBack ) -x = x - pOutDevRef-GetOutputWidthPixel() + devX - pOutDevRef-GetOutOffXPixel() + 1; +x = devX + (pOutDevRef-GetOutputWidthPixel() + devX) - (x + 1); else x = pOutDevRef-GetOutputWidthPixel() - (x - devX) + pOutDevRef-GetOutOffXPixel() - 1; } @@ -155,7 +155,7 @@ void SalGraphics::mirror( long x, long nWidth, const OutputDevice *pOutDev, bo { long devX = pOutDevRef-GetOutOffXPixel(); // re-mirrored mnOutOffX if( bBack ) -x = x - pOutDevRef-GetOutputWidthPixel() + devX - pOutDevRef-GetOutOffXPixel() + nWidth; +x = devX + (pOutDevRef-GetOutputWidthPixel() + devX) - (x + nWidth); else x = pOutDevRef-GetOutputWidthPixel() - (x - devX) + pOutDevRef-GetOutOffXPixel() - nWidth; } commit e3a801e2454eed2e61202bbacca01fe3fcc20c1d Author: Ivan Timofeev timofeev@gmail.com Date: Fri Jun 28 21:52:17 2013 +0400 fdo#44582: fix scrollbars in RTL UI Change-Id: I518e9bcf673ffd1f17ecb51c2c4f962a2f722446 diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx index b326915..d283daf 100644 --- a/vcl/source/control/scrbar.cxx +++ b/vcl/source/control/scrbar.cxx @@ -317,9 +317,9 @@ void ScrollBar::ImplCalc( sal_Bool bUpdate ) if ( GetStyle() WB_HORZ ) { -if ( GetNativeControlRegion( CTRL_SCROLLBAR, PART_BUTTON_LEFT, +if ( GetNativeControlRegion( CTRL_SCROLLBAR, IsRTLEnabled()? PART_BUTTON_RIGHT: PART_BUTTON_LEFT, aControlRegion, 0, ImplControlValue(), OUString(), aBoundingRegion, aBtn1Region ) - GetNativeControlRegion( CTRL_SCROLLBAR, PART_BUTTON_RIGHT, + GetNativeControlRegion( CTRL_SCROLLBAR, IsRTLEnabled()? PART_BUTTON_LEFT: PART_BUTTON_RIGHT, aControlRegion, 0, ImplControlValue(), OUString(), aBoundingRegion, aBtn2Region ) ) { maBtn1Rect = aBtn1Region; commit 48e1d9c7afe5c2a39d9a08d7a38f7c8ff39d8c84 Author: Ivan Timofeev timofeev@gmail.com Date: Mon Jun 24 22:55:55 2013 +0400 fdo#66335: gtk: Revert hacks for RTL scrollbars returning false here in getNativeControlRegion results in a fallback to square buttons in vcl scrollbar code. But there is no problem in gtk+ backend in this case, let's fix the problem differently. This reverts commits 898a3e84807bccbb876e3f5583728f6d24e05e9a and e8e82bd2109b82ddd535cdac30303249c6b62942. Change-Id: I66fcdd1f27d471321852445e5881cee03baef7b1 diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx index 176486e..c88bc6f 100644 --- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx @@ -1048,13 +1048,7 @@ sal_Bool GtkSalGraphics::getNativeControlRegion( ControlType nType, rNativeContentRegion.Right() = rNativeContentRegion.Left() + 1; if (!rNativeContentRegion.GetHeight()) rNativeContentRegion.Bottom() = rNativeContentRegion.Top() + 1; -//fdo#63254 horizontal scrool bar isn't displayed in RTL tab -// with LTR UI in calc -returnVal =Application::GetSettings().GetLayoutRTL(); - -//See fdo#44582, Horizontal scrollbar in navigator window is broken -if ((nPart==PART_BUTTON_LEFT ||
[Libreoffice-commits] core.git: 3 commits - vcl/source
vcl/source/window/dlgctrl.cxx |6 +++--- vcl/source/window/dockmgr.cxx | 34 +- vcl/source/window/dockwin.cxx | 12 ++-- vcl/source/window/floatwin.cxx | 16 vcl/source/window/keycod.cxx |2 +- vcl/source/window/layout.cxx |4 ++-- vcl/source/window/menu.cxx |4 ++-- vcl/source/window/mnemonic.cxx |4 ++-- vcl/source/window/scrwnd.cxx | 14 +++--- 9 files changed, 48 insertions(+), 48 deletions(-) New commits: commit 1ae19c8e6a1651748eb47cc0b8de3c58503cc7eb Author: Takeshi Abe t...@fixedpoint.jp Date: Wed Jun 19 22:39:34 2013 +0900 Mark as static Change-Id: I09a76b4c6ad0e63663c2628e5ad957d203e0283c diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index 78d7e82..be28fff 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -603,9 +603,9 @@ struct ButtonOrder int m_nPriority; }; -int getButtonPriority(const OString rType) +static int getButtonPriority(const OString rType) { -const size_t N_TYPES = 3; +static const size_t N_TYPES = 3; static const ButtonOrder aDiscardCancelSave[N_TYPES] = { { /discard, 0 }, commit 913d6fb1cc0f9fa879b330d1322f8a19dfc050aa Author: Takeshi Abe t...@fixedpoint.jp Date: Wed Jun 19 22:38:50 2013 +0900 Mark as const Change-Id: Ib7f8aeeca64868fa2037145613023a6abfef7648 diff --git a/vcl/source/window/keycod.cxx b/vcl/source/window/keycod.cxx index 77c38ae..0751697 100644 --- a/vcl/source/window/keycod.cxx +++ b/vcl/source/window/keycod.cxx @@ -29,7 +29,7 @@ // === -static sal_uInt16 aImplKeyFuncTab[(KEYFUNC_FRONT+1)*4] = +static const sal_uInt16 aImplKeyFuncTab[(KEYFUNC_FRONT+1)*4] = { 0, 0, 0, 0,// KEYFUNC_DONTKNOW KEY_N | KEY_MOD1, 0, 0, 0, // KEYFUNC_NEW diff --git a/vcl/source/window/mnemonic.cxx b/vcl/source/window/mnemonic.cxx index 45ceac4..78afb46 100644 --- a/vcl/source/window/mnemonic.cxx +++ b/vcl/source/window/mnemonic.cxx @@ -279,14 +279,14 @@ sal_Bool MnemonicGenerator::CreateMnemonic( XubString rKey ) nIndex = rKey.Len(); if( nIndex = 2 ) { -static sal_Unicode cGreaterGreater[] = { 0xFF1E, 0xFF1E }; +static const sal_Unicode cGreaterGreater[] = { 0xFF1E, 0xFF1E }; if ( rKey.EqualsAscii( , nIndex-2, 2 ) || rKey.Equals( cGreaterGreater, nIndex-2, 2 ) ) nIndex -= 2; } if( nIndex = 3 ) { -static sal_Unicode cDotDotDot[] = { 0xFF0E, 0xFF0E, 0xFF0E }; +static const sal_Unicode cDotDotDot[] = { 0xFF0E, 0xFF0E, 0xFF0E }; if ( rKey.EqualsAscii( ..., nIndex-3, 3 ) || rKey.Equals( cDotDotDot, nIndex-3, 3 ) ) nIndex -= 3; commit c974471918bd5aa5719ec703564bdb22c5a33a6e Author: Takeshi Abe t...@fixedpoint.jp Date: Wed Jun 19 22:30:49 2013 +0900 sal_Bool to bool Change-Id: Ic0597f42b6f0a637e0a3fdfa7972cbe67272c65d diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx index 11d3739..ad3dc48 100644 --- a/vcl/source/window/dlgctrl.cxx +++ b/vcl/source/window/dlgctrl.cxx @@ -746,7 +746,7 @@ sal_Bool Window::ImplDlgCtrl( const KeyEvent rKEvt, sal_Bool bKeyInput ) sal_uInt16 nType; sal_uInt16 nGetFocusFlags = GETFOCUS_TAB; sal_uInt16 nNewIndex; -sal_BoolbFormular = sal_False; +boolbFormular = false; // Bei Ctrl-Tab erstmal testen, ob zwischen Formularen // gesprungen werden soll @@ -763,7 +763,7 @@ sal_Bool Window::ImplDlgCtrl( const KeyEvent rKEvt, sal_Bool bKeyInput ) if ( pTempWindow-ImplGetWindow()-IsDialogControlStart() ) { if ( iTemp != 0 ) -bFormular = sal_True; +bFormular = true; if ( aKeyCode.IsShift() ) { if ( iTemp = nIndex ) @@ -1140,7 +1140,7 @@ static Window* ImplGetLabelFor( Window* pFrameWindow, WindowType nMyType, Window { // #i100833# MT 2010/02: Group box and fixed lines can also lable a fixed text. // See tools/options/print for example. -sal_Bool bThisIsAGroupControl = (nMyType == WINDOW_GROUPBOX) || (nMyType == WINDOW_FIXEDLINE); +bool bThisIsAGroupControl = (nMyType == WINDOW_GROUPBOX) || (nMyType == WINDOW_FIXEDLINE); // get index,