[Libreoffice-commits] core.git: 5 commits - cui/source include/tools include/vcl rsc/inc rsc/source svtools/source svx/source vcl/source
Caolán McNamara
caolanm at redhat.com
Thu Oct 6 08:09:20 UTC 2016
cui/source/customize/cfg.src | 4 ----
include/tools/rc.h | 6 ++----
include/vcl/abstdlg.hxx | 6 ++----
include/vcl/fixedhyper.hxx | 2 +-
include/vcl/image.hxx | 1 -
rsc/inc/rscdb.hxx | 4 ++--
rsc/source/parser/rscicpx.cxx | 12 ++----------
rsc/source/parser/rscinit.cxx | 4 ++--
svtools/source/control/ctrlbox.src | 4 ----
svx/source/sidebar/area/AreaPropertyPanel.src | 8 --------
vcl/source/window/menu.cxx | 17 ++---------------
vcl/source/window/toolbox2.cxx | 13 ++-----------
12 files changed, 15 insertions(+), 66 deletions(-)
New commits:
commit ae137866167f65557c64ff19dd3bcf602a55207d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Oct 5 21:27:52 2016 +0100
these other IMAGE_STDBTN_COLOR defines do nothing
Change-Id: If35bd52f973dc89b05afd283a4a89998c491b862
diff --git a/cui/source/customize/cfg.src b/cui/source/customize/cfg.src
index 48f60da..306e5d8 100644
--- a/cui/source/customize/cfg.src
+++ b/cui/source/customize/cfg.src
@@ -106,10 +106,6 @@ String RID_SVXSTR_MENU_ADDCOMMANDS_DESCRIPTION
Text [ en-US ] = "To add a command to a menu, select the category and then the command. You can also drag the command to the Commands list of the Menus tab page in the Customize dialog.";
};
-#ifndef IMAGE_STDBTN_COLOR
-#define IMAGE_STDBTN_COLOR Color { Red = 0xFFFF; Green = 0x0000; Blue = 0xFFFF; }
-#endif
-
// Strings ---------------------------------------------------------------
String RID_SVXSTR_IMPORT_ICON_ERROR
{
diff --git a/svtools/source/control/ctrlbox.src b/svtools/source/control/ctrlbox.src
index f352a99..36036d9 100644
--- a/svtools/source/control/ctrlbox.src
+++ b/svtools/source/control/ctrlbox.src
@@ -18,10 +18,6 @@
*/
#include <svtools/svtools.hrc>
-#ifndef IMAGE_STDBTN_COLOR
-#define IMAGE_STDBTN_COLOR Color { Red = 0xFFFF; Green = 0x0000; Blue = 0xFFFF; }
-#endif
-
String STR_SVT_AUTOMATIC_COLOR
{
Text [ en-US ] = "Automatic";
commit a1a10b82246667db6aaa9d59a397986886e66953
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Oct 5 21:27:10 2016 +0100
drop this newly unused IMAGE_STDBTN_COLOR define
Change-Id: Ic417cc17e1dbccc1589e7e4269ac326e6ccb7007
diff --git a/include/vcl/image.hxx b/include/vcl/image.hxx
index 1803c9b..f9f32f9 100644
--- a/include/vcl/image.hxx
+++ b/include/vcl/image.hxx
@@ -35,7 +35,6 @@ struct ImplImage;
struct ImplImageList;
namespace com { namespace sun { namespace star { namespace graphic { class XGraphic;} } } }
-#define IMAGE_STDBTN_COLOR Color( 0xC0, 0xC0, 0xC0 )
#define IMAGELIST_IMAGE_NOTFOUND ((sal_uInt16)0xFFFF)
class VCL_DLLPUBLIC Image
commit 3870de04eaed80d9eca22dc9cce2973b7ea4c649
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Oct 5 21:24:21 2016 +0100
drop now unused BitmapItem rsc fields
Change-Id: I02ed667a3573b3374fce069be0d32dbd91292e49
diff --git a/include/tools/rc.h b/include/tools/rc.h
index 8a0428f..97c9f2d 100644
--- a/include/tools/rc.h
+++ b/include/tools/rc.h
@@ -67,7 +67,6 @@ enum class RscMenuItem {
Id = 0x002,
Status = 0x004,
Text = 0x008,
- Bitmap = 0x010,
HelpText = 0x020,
HelpId = 0x040,
Menu = 0x100,
@@ -75,7 +74,7 @@ enum class RscMenuItem {
Command = 0x800
};
namespace o3tl {
- template<> struct typed_flags<RscMenuItem> : is_typed_flags<RscMenuItem, 0xd7f> {};
+ template<> struct typed_flags<RscMenuItem> : is_typed_flags<RscMenuItem, 0xd6f> {};
}
// For "Field" resources:
@@ -119,13 +118,12 @@ enum class RscToolboxItemFlags {
Status = 0x0004,
HelpId = 0x0008,
Text = 0x0010,
- Bitmap = 0x0040,
Disable = 0x0100,
Hide = 0x0400,
Command = 0x0800
};
namespace o3tl {
- template<> struct typed_flags<RscToolboxItemFlags> : is_typed_flags<RscToolboxItemFlags, 0xd5f> {};
+ template<> struct typed_flags<RscToolboxItemFlags> : is_typed_flags<RscToolboxItemFlags, 0xd1f> {};
}
// For "ToolBox" resources:
diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx
index 4edcf4a..6e3f6d9 100644
--- a/rsc/inc/rscdb.hxx
+++ b/rsc/inc/rscdb.hxx
@@ -195,7 +195,7 @@ class RscTypCont
RscTop * InitClassFixedImage( RscTop * pSuper, RscTop * pClassImage );
RscTop * InitClassRadioButton( RscTop * pSuper );
RscTop * InitClassKeyCode( RscTop * pSuper, RscEnum * pKey );
- RscTop * InitClassMenuItem( RscTop * pSuper, RscTop * pClassBitmap );
+ RscTop * InitClassMenuItem( RscTop * pSuper );
RscTop * InitClassMenu( RscTop * pSuper, RscTop * pMenuItem );
RscTop * InitClassNumericFormatter( RscTop * pSuper );
@@ -208,7 +208,7 @@ class RscTypCont
RscTop * InitClassDockingWindow( RscTop * pSuper,
RscEnum * pMapUnit );
- RscTop * InitClassToolBoxItem( RscTop * pSuper, RscTop * pClassBitmap );
+ RscTop * InitClassToolBoxItem(RscTop * pSuper);
RscTop * InitClassToolBox( RscTop * pSuper, RscTop * pClassToolBoxItem );
RscTop * InitClassSfxStyleFamilyItem( RscTop * pSuper,
RscTop * pClassBitmap,
diff --git a/rsc/source/parser/rscicpx.cxx b/rsc/source/parser/rscicpx.cxx
index 584b681..39db9c8 100644
--- a/rsc/source/parser/rscicpx.cxx
+++ b/rsc/source/parser/rscicpx.cxx
@@ -641,8 +641,7 @@ RscTop * RscTypCont::InitClassKeyCode( RscTop * pSuper, RscEnum * pKey )
return pClassKeyCode;
}
-RscTop * RscTypCont::InitClassMenuItem( RscTop * pSuper,
- RscTop * pClassBitmap )
+RscTop * RscTypCont::InitClassMenuItem( RscTop * pSuper )
{
Atom nId;
RscTop * pClassMenuItem;
@@ -725,9 +724,6 @@ RscTop * RscTypCont::InitClassMenuItem( RscTop * pSuper,
nId = aNmTb.Put( "Text", VARNAME );
pClassMenuItem->SetVariable( nId, &aLangString, nullptr, 0,
(sal_uInt32)RscMenuItem::Text );
- nId = aNmTb.Put( "ItemBitmap", VARNAME );
- pClassMenuItem->SetVariable( nId, pClassBitmap, nullptr, 0,
- (sal_uInt32)RscMenuItem::Bitmap );
nId = aNmTb.Put( "HelpText", VARNAME );
pClassMenuItem->SetVariable( nId, &aLangString, nullptr, 0,
(sal_uInt32)RscMenuItem::HelpText );
@@ -932,8 +928,7 @@ RscTop * RscTypCont::InitClassDockingWindow( RscTop * pSuper,
return pClassDockWindow;
}
-RscTop * RscTypCont::InitClassToolBoxItem( RscTop * pSuper,
- RscTop * pClassBitmap )
+RscTop * RscTypCont::InitClassToolBoxItem(RscTop * pSuper)
{
Atom nId;
RscTop * pClassToolBoxItem;
@@ -1031,9 +1026,6 @@ RscTop * RscTypCont::InitClassToolBoxItem( RscTop * pSuper,
nId = aNmTb.Put( "Text", VARNAME );
pClassToolBoxItem->SetVariable( nId, &aLangString, nullptr, 0,
(sal_uInt32)RscToolboxItemFlags::Text );
- nId = aNmTb.Put( "ItemBitmap", VARNAME );
- pClassToolBoxItem->SetVariable( nId, pClassBitmap, nullptr, 0,
- (sal_uInt32)RscToolboxItemFlags::Bitmap );
nId = aNmTb.Put( "Disable", VARNAME );
pClassToolBoxItem->SetVariable( nId, &aBool, nullptr, 0,
(sal_uInt32)RscToolboxItemFlags::Disable );
diff --git a/rsc/source/parser/rscinit.cxx b/rsc/source/parser/rscinit.cxx
index bb5d249..7a36381 100644
--- a/rsc/source/parser/rscinit.cxx
+++ b/rsc/source/parser/rscinit.cxx
@@ -353,7 +353,7 @@ void RscTypCont::Init()
}
{
- RscTop* pClassMenuItem = InitClassMenuItem( pClassMgr, pClassBitmap);
+ RscTop* pClassMenuItem = InitClassMenuItem(pClassMgr);
pRoot->Insert( pClassMenuItem );
RscTop* pClassMenu = InitClassMenu( pClassMgr, pClassMenuItem );
@@ -410,7 +410,7 @@ void RscTypCont::Init()
RscTop* pClassDockingWindow = InitClassDockingWindow( pClassWindow, pMapUnit );
pRoot->Insert( pClassDockingWindow );
- RscTop* pClassToolBoxItem = InitClassToolBoxItem( pClassMgr, pClassBitmap );
+ RscTop* pClassToolBoxItem = InitClassToolBoxItem(pClassMgr);
pRoot->Insert( pClassToolBoxItem );
RscTop* pClassToolBox = InitClassToolBox( pClassDockingWindow, pClassToolBoxItem );
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 120ff9f..a13bc63 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -446,22 +446,9 @@ void Menu::InsertItem( const ResId& rResId )
aText = ReadStringRes();
// create item
- if ( nObjMask & RscMenuItem::Bitmap )
- {
- if ( !bSep )
- {
- Bitmap aBmp( ResId( static_cast<RSHEADER_TYPE*>(GetClassRes()), *pMgr ) );
- Image const aImg(aBmp);
- if ( !aText.isEmpty() )
- InsertItem( nItemId, aText, aImg, nStatus );
- else
- InsertItem( nItemId, aImg, nStatus );
- }
- IncrementRes( GetObjSizeRes( static_cast<RSHEADER_TYPE*>(GetClassRes()) ) );
- }
- else if ( !bSep )
+ if (!bSep)
InsertItem(nItemId, aText, nStatus);
- if ( bSep )
+ else
InsertSeparator();
OUString aHelpText;
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index f35f2cd..12239a5 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -377,7 +377,6 @@ void ToolBox::Select()
void ToolBox::InsertItem( const ResId& rResId )
{
RscToolboxItemFlags nObjMask;
- bool bImage = false; // has image
// create item
ImplToolItem aItem;
@@ -405,14 +404,6 @@ void ToolBox::InsertItem( const ResId& rResId )
aItem.maText = MnemonicGenerator::EraseAllMnemonicChars(aItem.maText);
}
- if ( nObjMask & RscToolboxItemFlags::Bitmap )
- {
- Bitmap aBmp = Bitmap( ResId( static_cast<RSHEADER_TYPE*>(GetClassRes()), *rResId.GetResMgr() ) );
- IncrementRes( GetObjSizeRes( static_cast<RSHEADER_TYPE*>(GetClassRes()) ) );
- aItem.maImage = Image( aBmp, IMAGE_STDBTN_COLOR );
- aItem.maImageOriginal = aItem.maImage;
- bImage = true;
- }
if ( nObjMask & RscToolboxItemFlags::Disable )
aItem.mbEnabled = ReadShortRes() == 0;
@@ -422,8 +413,8 @@ void ToolBox::InsertItem( const ResId& rResId )
if ( nObjMask & RscToolboxItemFlags::Command )
aItem.maCommandStr = ReadStringRes();
- // if no image is loaded, try to load one from the image list
- if ( !bImage && aItem.mnId )
+ // Try to load an image from the image list
+ if (aItem.mnId)
{
aItem.maImage = maImageList.GetImage( aItem.mnId );
aItem.maImageOriginal = aItem.maImage;
commit 924eff5cf02844ae35d0345fe361be4323371b50
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Oct 5 21:15:18 2016 +0100
drop empty ItemBitmap field
Change-Id: If59c1a2bda49229ff48f8ec28c23491e6d9c8c83
diff --git a/svx/source/sidebar/area/AreaPropertyPanel.src b/svx/source/sidebar/area/AreaPropertyPanel.src
index 4dea34c..555273c 100644
--- a/svx/source/sidebar/area/AreaPropertyPanel.src
+++ b/svx/source/sidebar/area/AreaPropertyPanel.src
@@ -195,10 +195,6 @@ Control RID_POPUPPANEL_AREAPAGE_TRGR
{
Identifier = TBI_LEFT ;
Text = "Rotate Left" ;
- ItemBitmap = Bitmap
- {
- // File = "symphony/rotate_left.png" ;
- };
};
};
};
@@ -216,10 +212,6 @@ Control RID_POPUPPANEL_AREAPAGE_TRGR
{
Identifier = TBI_RIGHT ;
Text = "Rotate Right" ;
- ItemBitmap = Bitmap
- {
- // File = "symphony/rotate_right.png" ;
- };
};
};
};
commit a8c7e07d45f7dce54242e7b79910e1851fc47aef
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Oct 5 20:58:29 2016 +0100
outdated comment
Change-Id: If853eb56aca74764ff1250f1d121dc2f2302202d
diff --git a/include/vcl/abstdlg.hxx b/include/vcl/abstdlg.hxx
index bbbe51a..1db97cc 100644
--- a/include/vcl/abstdlg.hxx
+++ b/include/vcl/abstdlg.hxx
@@ -25,7 +25,6 @@
#include <vector>
namespace vcl { class Window; }
-class ResId;
class Dialog;
class Bitmap;
@@ -80,9 +79,8 @@ class VCL_DLLPUBLIC VclAbstractDialogFactory
public:
virtual ~VclAbstractDialogFactory(); // needed for export of vtable
static VclAbstractDialogFactory* Create();
- // nDialogId was previously a ResId without ResMgr; the ResourceId is now
- // an implementation detail of the factory
- virtual VclAbstractDialog* CreateVclDialog( vcl::Window* pParent, sal_uInt32 nResId ) = 0;
+ // The Id is an implementation detail of the factory
+ virtual VclAbstractDialog* CreateVclDialog(vcl::Window* pParent, sal_uInt32 nId) = 0;
// creates instance of PasswordToOpenModifyDialog from cui
virtual AbstractPasswordToOpenModifyDialog* CreatePasswordToOpenModifyDialog( vcl::Window * pParent, sal_uInt16 nMaxPasswdLen, bool bIsPasswordToModify ) = 0;
diff --git a/include/vcl/fixedhyper.hxx b/include/vcl/fixedhyper.hxx
index b266f74..d98343c 100644
--- a/include/vcl/fixedhyper.hxx
+++ b/include/vcl/fixedhyper.hxx
@@ -62,7 +62,7 @@ class VCL_DLLPUBLIC FixedHyperlink : public FixedText
public:
/** ctors
- With ResId or WinBits.
+ With WinBits.
*/
FixedHyperlink( vcl::Window* pParent, WinBits nWinStyle = 0 );
More information about the Libreoffice-commits
mailing list