cui/source/options/dbregister.cxx | 2 - cui/source/options/dbregister.src | 6 +++ desktop/unx/source/splashx.c | 28 +++++++++--------- include/tools/rc.h | 8 ----- include/tools/rcid.h | 1 include/vcl/image.hxx | 1 rsc/inc/rscdb.hxx | 1 rsc/source/parser/rscicpx.cxx | 18 ----------- rsc/source/parser/rscinit.cxx | 5 --- sal/rtl/alloc_arena.cxx | 8 +---- sal/rtl/alloc_cache.cxx | 4 +- sal/rtl/alloc_impl.hxx | 8 ++--- sfx2/source/appl/newhelp.cxx | 6 +-- shell/source/backends/desktopbe/desktopbackend.cxx | 2 - sw/source/core/layout/flowfrm.cxx | 5 --- vcl/source/image/Image.cxx | 23 -------------- wizards/com/sun/star/wizards/report/ReportWizard.java | 5 ++- xmloff/source/style/xmlnumfi.cxx | 2 - 18 files changed, 40 insertions(+), 93 deletions(-)
New commits: commit 8f29ee6c293a6d72b3cf0b6b735c90ba91fc5607 Author: Caolán McNamara <[email protected]> Date: Thu Jan 19 21:06:33 2017 +0000 Images no longer loaded from resource files Change-Id: I7155a2c8280b9f511402b908f06470dec419b336 diff --git a/include/tools/rc.h b/include/tools/rc.h index 9ca1e8f..84bb8e2 100644 --- a/include/tools/rc.h +++ b/include/tools/rc.h @@ -50,14 +50,6 @@ namespace o3tl { template<> struct typed_flags<RscMenuItem> : is_typed_flags<RscMenuItem, 0xd6f> {}; } -// For "Image": -enum class RscImageFlags { - ImageBitmap = 0x01, -}; -namespace o3tl { - template<> struct typed_flags<RscImageFlags> : is_typed_flags<RscImageFlags, 0x01> {}; -} - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/tools/rcid.h b/include/tools/rcid.h index d30dde8..a86667f 100644 --- a/include/tools/rcid.h +++ b/include/tools/rcid.h @@ -38,7 +38,6 @@ #define RSC_BITMAP (RSC_NOTYPE + 0x13) #define RSC_MENU (RSC_NOTYPE + 0x1c) #define RSC_MENUITEM (RSC_NOTYPE + 0x1d) // only used internally -#define RSC_IMAGE (RSC_NOTYPE + 0x23) #define RSC_STRINGARRAY (RSC_NOTYPE + 0x79) diff --git a/include/vcl/image.hxx b/include/vcl/image.hxx index 519058a..88a0c04 100644 --- a/include/vcl/image.hxx +++ b/include/vcl/image.hxx @@ -56,7 +56,6 @@ class VCL_DLLPUBLIC Image public: Image(); - explicit Image( const ResId& rResId ); explicit Image( const BitmapEx& rBitmapEx ); explicit Image( const Bitmap& rBitmap ); Image( const Bitmap& rBitmap, const Color& rColor ); diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx index 1d74003..07490d6 100644 --- a/rsc/inc/rscdb.hxx +++ b/rsc/inc/rscdb.hxx @@ -91,7 +91,6 @@ class RscTypCont RscTop * InitClassMgr(); RscTop * InitClassString( RscTop * pSuper ); RscTop * InitClassBitmap( RscTop * pSuper ); - RscTop * InitClassImage( RscTop * pSuper, RscTop *pClassBitmap ); RscTop * InitClassMenuItem( RscTop * pSuper ); RscTop * InitClassMenu( RscTop * pSuper, RscTop * pMenuItem ); diff --git a/rsc/source/parser/rscicpx.cxx b/rsc/source/parser/rscicpx.cxx index c476a9e..fde078d 100644 --- a/rsc/source/parser/rscicpx.cxx +++ b/rsc/source/parser/rscicpx.cxx @@ -97,24 +97,6 @@ RscTop * RscTypCont::InitClassBitmap( RscTop * pSuper ) return pClassBitmap; } -RscTop * RscTypCont::InitClassImage( RscTop * pSuper, RscTop * pClassBitmap ) -{ - Atom nId; - RscTop * pClassImage; - - // initialize class - nId = pHS->getID( "Image" ); - pClassImage = new RscClass( nId, RSC_IMAGE, pSuper ); - pClassImage->SetCallPar( *pStdPar1, *pStdPar2, *pStdParType ); - aNmTb.Put( nId, CLASSNAME, pClassImage ); - - // initialize variables - nId = aNmTb.Put( "ImageBitmap", VARNAME ); - pClassImage->SetVariable( nId, pClassBitmap, nullptr, RSCVAR::NONE, (sal_uInt32)RscImageFlags::ImageBitmap ); - - return pClassImage; -} - RscTop * RscTypCont::InitClassMenuItem( RscTop * pSuper ) { Atom nId; diff --git a/rsc/source/parser/rscinit.cxx b/rsc/source/parser/rscinit.cxx index 9e31fb6..4ecf9f6 100644 --- a/rsc/source/parser/rscinit.cxx +++ b/rsc/source/parser/rscinit.cxx @@ -48,7 +48,6 @@ void RscTypCont::Init() RscTop * pClassString; RscTop * pClassStringArray; RscTop * pClassBitmap; - RscTop * pClassImage; Atom nId; @@ -113,10 +112,6 @@ void RscTypCont::Init() } { - pClassImage = InitClassImage( pClassMgr, pClassBitmap ); - pRoot->Insert( pClassImage ); -} -{ RscTop* pClassMenuItem = InitClassMenuItem(pClassMgr); pRoot->Insert( pClassMenuItem ); diff --git a/vcl/source/image/Image.cxx b/vcl/source/image/Image.cxx index 516883c..bc663fb 100644 --- a/vcl/source/image/Image.cxx +++ b/vcl/source/image/Image.cxx @@ -44,29 +44,6 @@ Image::Image() { } -Image::Image( const ResId& rResId ) -{ - rResId.SetRT( RSC_IMAGE ); - - ResMgr* pResMgr = rResId.GetResMgr(); - if( pResMgr && pResMgr->GetResource( rResId ) ) - { - pResMgr->Increment( sizeof( RSHEADER_TYPE ) ); - - BitmapEx aBmpEx; - RscImageFlags nObjMask = (RscImageFlags)pResMgr->ReadLong(); - - if( nObjMask & RscImageFlags::ImageBitmap ) - { - aBmpEx = BitmapEx( ResId( static_cast<RSHEADER_TYPE*>(pResMgr->GetClass()), *pResMgr ) ); - pResMgr->Increment( ResMgr::GetObjSize( static_cast<RSHEADER_TYPE*>(pResMgr->GetClass()) ) ); - } - - if( ! aBmpEx.IsEmpty() ) - ImplInit( aBmpEx ); - } -} - Image::Image(const BitmapEx& rBitmapEx) { ImplInit(rBitmapEx); commit 60792b45dd5038d570c7880b7e86b666424f765d Author: Caolán McNamara <[email protected]> Date: Fri Jan 20 09:32:22 2017 +0000 const these up Change-Id: Ide19ec6a04a591327effe6d3c4da5db62e58b4c9 diff --git a/desktop/unx/source/splashx.c b/desktop/unx/source/splashx.c index 43b178b..454755b 100644 --- a/desktop/unx/source/splashx.c +++ b/desktop/unx/source/splashx.c @@ -229,28 +229,28 @@ static void create_pixmap(struct splash* splash) if ( splash->visual->class == TrueColor ) { - unsigned long red_mask = splash->visual->red_mask; - unsigned long green_mask = splash->visual->green_mask; - unsigned long blue_mask = splash->visual->blue_mask; + const unsigned long red_mask = splash->visual->red_mask; + const unsigned long green_mask = splash->visual->green_mask; + const unsigned long blue_mask = splash->visual->blue_mask; - unsigned long red_delta_mask = ( 1UL << ( 8 - BITS( red_mask ) ) ) - 1; - unsigned long green_delta_mask = ( 1UL << ( 8 - BITS( green_mask ) ) ) - 1; - unsigned long blue_delta_mask = ( 1UL << ( 8 - BITS( blue_mask ) ) ) - 1; + const unsigned long red_delta_mask = ( 1UL << ( 8 - BITS( red_mask ) ) ) - 1; + const unsigned long green_delta_mask = ( 1UL << ( 8 - BITS( green_mask ) ) ) - 1; + const unsigned long blue_delta_mask = ( 1UL << ( 8 - BITS( blue_mask ) ) ) - 1; - int red_shift = HIGHEST_BIT( red_mask ) - 8; - int green_shift = HIGHEST_BIT( green_mask ) - 8; - int blue_shift = HIGHEST_BIT( blue_mask ) - 8; + const int red_shift = HIGHEST_BIT( red_mask ) - 8; + const int green_shift = HIGHEST_BIT( green_mask ) - 8; + const int blue_shift = HIGHEST_BIT( blue_mask ) - 8; XImage* image = XCreateImage( splash->display, splash->visual, splash->depth, ZPixmap, 0, NULL, splash->width, splash->height, 32, 0 ); - int bytes_per_line = image->bytes_per_line; - int bpp = image->bits_per_pixel; - int byte_order = image->byte_order; + const int bytes_per_line = image->bytes_per_line; + const int bpp = image->bits_per_pixel; + const int byte_order = image->byte_order; #if defined OSL_LITENDIAN - int machine_byte_order = LSBFirst; + const int machine_byte_order = LSBFirst; #else /* OSL_BIGENDIAN */ - int machine_byte_order = MSBFirst; + const int machine_byte_order = MSBFirst; #endif char *data = malloc( splash->height * bytes_per_line ); commit b29069d16386d5241b46280d2c67f3a1819f9c4b Author: Caolán McNamara <[email protected]> Date: Fri Jan 20 09:53:39 2017 +0000 can use truncate instead of a new OUStringBuffer Change-Id: I6efd48af1e00c21675ef0697b38185008a794d7a diff --git a/shell/source/backends/desktopbe/desktopbackend.cxx b/shell/source/backends/desktopbe/desktopbackend.cxx index 52c941c..dfb9b6d 100644 --- a/shell/source/backends/desktopbe/desktopbackend.cxx +++ b/shell/source/backends/desktopbe/desktopbackend.cxx @@ -228,7 +228,7 @@ OUString xdg_user_dir_lookup (const char *type) } else { - aUserDirBuf = OUStringBuffer(); + aUserDirBuf.truncate(); } while (*p && *p != '"') { diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index 11e703f..e4298ab 100644 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -1128,7 +1128,7 @@ void SvXMLNumFmtElementContext::EndElement() if ( rParent.ReplaceNfKeyword( NF_KEY_NNN, NF_KEY_NNNN ) ) { - aContent = OUStringBuffer(); + aContent.truncate(); } rParent.SetHasLongDoW( false ); // only once commit b2ae03b08b2901f9030b4c80870173fe810c9348 Author: Caolán McNamara <[email protected]> Date: Fri Jan 20 09:37:14 2017 +0000 coverity#1326632 DE: Dropped or ignored exception Change-Id: I3f31e3742d30e27697ab7431925fa2f411a65ade diff --git a/wizards/com/sun/star/wizards/report/ReportWizard.java b/wizards/com/sun/star/wizards/report/ReportWizard.java index 6a2acb2..7601787 100644 --- a/wizards/com/sun/star/wizards/report/ReportWizard.java +++ b/wizards/com/sun/star/wizards/report/ReportWizard.java @@ -413,7 +413,10 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener { a = Class.forName("com.sun.star.wizards.reportbuilder.ReportBuilderImplementation"); } - catch (ClassNotFoundException e) {} + catch (ClassNotFoundException e) + { + System.err.println("ReportBuilderImplementation is unavailable"); + } if (a != null) { try commit 7140efd3e2ea9c25264ac9a513480a2586610af4 Author: Caolán McNamara <[email protected]> Date: Fri Jan 20 09:04:45 2017 +0000 Related: tdf#100813 don't crash traversing table in page 43 master has... align master with the more conservative 5-2/5-3 reproducible problem Change-Id: Ie7a53e94c062af894bee85ea05f1acf64bcb13f1 diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx index 6b831da..0924eac 100644 --- a/sw/source/core/layout/flowfrm.cxx +++ b/sw/source/core/layout/flowfrm.cxx @@ -1800,12 +1800,9 @@ bool SwFlowFrame::MoveFwd( bool bMakePage, bool bPageBreak, bool bMoveAlways ) { //!!!!MoveFootnoteCntFwd might need to be updated as well. SwFootnoteBossFrame *pOldBoss = m_rThis.FindFootnoteBossFrame(); - assert(pOldBoss); - if (!pOldBoss) - return false; if (m_rThis.IsInFootnote()) { - if (!m_rThis.IsContentFrame()) + if (!m_rThis.IsContentFrame() || !pOldBoss) { SAL_WARN("sw.core", "Tables in footnotes are not truly supported"); return false; commit e2805decab47bcdc4080c218933acad51d028589 Author: Caolán McNamara <[email protected]> Date: Fri Jan 20 09:20:00 2017 +0000 restore missing RID_SVXBMP_LOCK graphic wrong removed by commit fa3d5ca1f99fe253689004a45ec2888ebbe85fd3 Author: abdulmajeed ahmed <[email protected]> Date: Thu May 30 12:33:32 2013 +0200 Convert Languages tab page to .ui Deleted the readonly images too,it was not used any where else and was just confusing. Change-Id: Ice8e59cffc3b3001216c7499da5cbefe74ce8d88 diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx index 587cec3..a0a4a50 100644 --- a/cui/source/options/dbregister.cxx +++ b/cui/source/options/dbregister.cxx @@ -392,7 +392,7 @@ void DbRegistrationOptionsPage::insertNewEntry( const OUString& _sName,const OUS SvTreeListEntry* pEntry = nullptr; if ( _bReadOnly ) { - Image aLocked( CUI_RES( RID_SVXBMP_LOCK ) ); + Image aLocked(BitmapEx(CUI_RES(RID_SVXBMP_LOCK))); pEntry = m_pPathBox->InsertEntry( aStr, aLocked, aLocked ); } else diff --git a/cui/source/options/dbregister.src b/cui/source/options/dbregister.src index 2f8d708..e769b65 100644 --- a/cui/source/options/dbregister.src +++ b/cui/source/options/dbregister.src @@ -23,9 +23,15 @@ String RID_SVXSTR_TYPE { Text [ en-US ] = "Registered name" ; }; + String RID_SVXSTR_PATH { Text [ en-US ] = "Database file" ; }; +Bitmap RID_SVXBMP_LOCK +{ + File = "lock.png"; +}; + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ commit e5f2655212d94f7db837913cc2e43cfb487b3973 Author: Caolán McNamara <[email protected]> Date: Fri Jan 20 09:25:27 2017 +0000 tweak high/low bit so we're always shifting with an unsigned number Change-Id: Ic1c3f1f8aa6a16befb348652b0f5c3f82f47e0e7 diff --git a/sal/rtl/alloc_arena.cxx b/sal/rtl/alloc_arena.cxx index 74254ee..19bc424 100644 --- a/sal/rtl/alloc_arena.cxx +++ b/sal/rtl/alloc_arena.cxx @@ -428,8 +428,8 @@ rtl_arena_segment_alloc ( assert(*ppSegment == nullptr); if (!RTL_MEMORY_ISP2(size)) { - int msb = highbit(size); - if (RTL_ARENA_FREELIST_SIZE == sal::static_int_cast< size_t >(msb)) + unsigned int msb = highbit(size); + if (RTL_ARENA_FREELIST_SIZE == msb) { /* highest possible freelist: fall back to first fit */ rtl_arena_segment_type *head, *segment; @@ -660,9 +660,7 @@ rtl_arena_destructor (void * obj) assert(arena->m_hash_table == arena->m_hash_table_0); assert(arena->m_hash_size == RTL_ARENA_HASH_SIZE); - assert( - arena->m_hash_shift == - sal::static_int_cast< unsigned >(highbit(arena->m_hash_size) - 1)); + assert(arena->m_hash_shift == highbit(arena->m_hash_size) - 1); } /* ================================================================= */ diff --git a/sal/rtl/alloc_cache.cxx b/sal/rtl/alloc_cache.cxx index d919088..29d2008 100644 --- a/sal/rtl/alloc_cache.cxx +++ b/sal/rtl/alloc_cache.cxx @@ -767,7 +767,7 @@ rtl_cache_destructor (void * obj) assert(cache->m_hash_table == cache->m_hash_table_0); assert(cache->m_hash_size == RTL_CACHE_HASH_SIZE); - assert(cache->m_hash_shift == (sal_Size)(highbit(cache->m_hash_size) - 1)); + assert(cache->m_hash_shift == highbit(cache->m_hash_size) - 1); /* depot layer */ (void)RTL_MEMORY_LOCK_DESTROY(&(cache->m_depot_lock)); @@ -838,7 +838,7 @@ rtl_cache_activate ( if (flags & RTL_CACHE_FLAG_QUANTUMCACHE) { /* next power of 2 above 3 * qcache_max */ - if(slabsize < (((sal_Size)1) << highbit(3 * source->m_qcache_max))) + if (slabsize < (((sal_Size)1) << highbit(3 * source->m_qcache_max))) { slabsize = (((sal_Size)1) << highbit(3 * source->m_qcache_max)); } diff --git a/sal/rtl/alloc_impl.hxx b/sal/rtl/alloc_impl.hxx index d10ba93..fada227 100644 --- a/sal/rtl/alloc_impl.hxx +++ b/sal/rtl/alloc_impl.hxx @@ -65,10 +65,10 @@ /** highbit(): log2() + 1 * (complexity O(1)) */ -static inline int +static inline unsigned int highbit(sal_Size n) { - int k = 1; + unsigned int k = 1; if (n == 0) return 0; @@ -108,10 +108,10 @@ highbit(sal_Size n) /** lowbit(): find first bit set * (complexity O(1)) */ -static inline int +static inline unsigned int lowbit(sal_Size n) { - int k = 1; + unsigned int k = 1; if (n == 0) return 0; commit b3fa8afe903dd4bc3b6dd5f73be1c68a729b378b Author: Caolán McNamara <[email protected]> Date: Fri Jan 20 08:54:31 2017 +0000 these are bitmaps now Change-Id: Ic713dae0f25b286c5c1d1cc5b08c8e32d7641991 diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index cb46469..12333ec 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -267,9 +267,9 @@ struct ContentEntry_Impl ContentListBox_Impl::ContentListBox_Impl(vcl::Window* pParent, WinBits nStyle) : SvTreeListBox(pParent, nStyle) - , aOpenBookImage(SfxResId(BMP_HELP_CONTENT_BOOK_OPEN)) - , aClosedBookImage(SfxResId(BMP_HELP_CONTENT_BOOK_CLOSED)) - , aDocumentImage(SfxResId(BMP_HELP_CONTENT_DOC)) + , aOpenBookImage(BitmapEx(SfxResId(BMP_HELP_CONTENT_BOOK_OPEN))) + , aClosedBookImage(BitmapEx(SfxResId(BMP_HELP_CONTENT_BOOK_CLOSED))) + , aDocumentImage(BitmapEx(SfxResId(BMP_HELP_CONTENT_DOC))) { SetStyle( GetStyle() | WB_HIDESELECTION | WB_HSCROLL );
_______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
