summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-12-21 09:51:13 +0000
committerCaolán McNamara <caolanm@redhat.com>2016-12-21 11:07:21 +0000
commitc6797f77635e543ad82ba30115bdd80535d52620 (patch)
tree5347d2357876c453b07d7ec67e927eed956c5272 /sc/source/ui
parent43b3748fdac59f46480aafef7e4b624cd859fd45 (diff)
drop GetImageManager use in sc and unwind ImageList
Change-Id: Ida10f14fa74785964efdc4b6645668562297895a
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/app/inputwin.cxx40
-rw-r--r--sc/source/ui/src/toolbox.src42
2 files changed, 31 insertions, 51 deletions
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 0b88697d62ee..3801cefffe86 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -140,8 +140,6 @@ SfxChildWinInfo ScInputWindowWrapper::GetInfo() const
return aInfo;
}
-#define IMAGE(id) pImgMgr->SeekImage(id)
-
// class ScInputWindow
static VclPtr<ScTextWndBase> lcl_chooseRuntimeImpl( vcl::Window* pParent, SfxBindings* pBind )
@@ -173,9 +171,6 @@ ScInputWindow::ScInputWindow( vcl::Window* pParent, SfxBindings* pBind ) :
bIsOkCancelMode ( false ),
bInResize ( false )
{
- ScModule* pScMod = SC_MOD();
- SfxImageManager* pImgMgr = SfxImageManager::GetImageManager(*pScMod);
-
// #i73615# don't rely on SfxViewShell::Current while constructing the input line
// (also for GetInputHdl below)
ScTabViewShell* pViewSh = nullptr;
@@ -191,9 +186,9 @@ ScInputWindow::ScInputWindow( vcl::Window* pParent, SfxBindings* pBind ) :
// Position window, 3 buttons, input window
InsertWindow (1, aWndPos.get(), ToolBoxItemBits::NONE, 0);
InsertSeparator (1);
- InsertItem (SID_INPUT_FUNCTION, IMAGE(SID_INPUT_FUNCTION), ToolBoxItemBits::NONE, 2);
- InsertItem (SID_INPUT_SUM, IMAGE(SID_INPUT_SUM), ToolBoxItemBits::NONE, 3);
- InsertItem (SID_INPUT_EQUAL, IMAGE(SID_INPUT_EQUAL), ToolBoxItemBits::NONE, 4);
+ InsertItem (SID_INPUT_FUNCTION, Image(BitmapEx(ScResId(RID_BMP_INPUT_FUNCTION))), ToolBoxItemBits::NONE, 2);
+ InsertItem (SID_INPUT_SUM, Image(BitmapEx(ScResId(RID_BMP_INPUT_SUM))), ToolBoxItemBits::NONE, 3);
+ InsertItem (SID_INPUT_EQUAL, Image(BitmapEx(ScResId(RID_BMP_INPUT_EQUAL))), ToolBoxItemBits::NONE, 4);
InsertSeparator (5);
InsertWindow (7, &aTextWindow, ToolBoxItemBits::NONE, 6);
@@ -240,7 +235,6 @@ ScInputWindow::ScInputWindow( vcl::Window* pParent, SfxBindings* pBind ) :
else if (pViewSh)
pViewSh->UpdateInputHandler(true); // Absolutely necessary update
- pImgMgr->RegisterToolBox(this);
SetAccessibleName(ScResId(STR_ACC_TOOLBAR_FORMULA));
}
@@ -272,8 +266,6 @@ void ScInputWindow::dispose()
}
}
- SfxImageManager::GetImageManager( *SC_MOD() )->ReleaseToolBox( this );
-
pRuntimeWindow.disposeAndClear();
aWndPos.disposeAndClear();
@@ -509,14 +501,12 @@ void ScInputWindow::SetOkCancelMode()
SfxViewFrame* pViewFrm = SfxViewFrame::Current();
EnableButtons( pViewFrm && !pViewFrm->GetChildWindow( SID_OPENDLG_FUNCTION ) );
- ScModule* pScMod = SC_MOD();
- SfxImageManager* pImgMgr = SfxImageManager::GetImageManager(*pScMod);
if (!bIsOkCancelMode)
{
RemoveItem( 3 ); // Remove SID_INPUT_SUM and SID_INPUT_EQUAL
RemoveItem( 3 );
- InsertItem( SID_INPUT_CANCEL, IMAGE( SID_INPUT_CANCEL ), ToolBoxItemBits::NONE, 3 );
- InsertItem( SID_INPUT_OK, IMAGE( SID_INPUT_OK ), ToolBoxItemBits::NONE, 4 );
+ InsertItem( SID_INPUT_CANCEL, Image(BitmapEx(ScResId(RID_BMP_INPUT_CANCEL))), ToolBoxItemBits::NONE, 3 );
+ InsertItem( SID_INPUT_OK, Image(BitmapEx(ScResId(RID_BMP_INPUT_OK))), ToolBoxItemBits::NONE, 4 );
SetItemText ( SID_INPUT_CANCEL, aTextCancel );
SetHelpId ( SID_INPUT_CANCEL, HID_INSWIN_CANCEL );
SetItemText ( SID_INPUT_OK, aTextOk );
@@ -531,15 +521,13 @@ void ScInputWindow::SetSumAssignMode()
SfxViewFrame* pViewFrm = SfxViewFrame::Current();
EnableButtons( pViewFrm && !pViewFrm->GetChildWindow( SID_OPENDLG_FUNCTION ) );
- ScModule* pScMod = SC_MOD();
- SfxImageManager* pImgMgr = SfxImageManager::GetImageManager(*pScMod);
if (bIsOkCancelMode)
{
// Remove SID_INPUT_CANCEL, and SID_INPUT_OK
RemoveItem( 3 );
RemoveItem( 3 );
- InsertItem( SID_INPUT_SUM, IMAGE( SID_INPUT_SUM ), ToolBoxItemBits::NONE, 3 );
- InsertItem( SID_INPUT_EQUAL, IMAGE( SID_INPUT_EQUAL ), ToolBoxItemBits::NONE, 4 );
+ InsertItem( SID_INPUT_SUM, Image(BitmapEx(ScResId(RID_BMP_INPUT_SUM))), ToolBoxItemBits::NONE, 3 );
+ InsertItem( SID_INPUT_EQUAL, Image(BitmapEx(ScResId(RID_BMP_INPUT_EQUAL))), ToolBoxItemBits::NONE, 4 );
SetItemText ( SID_INPUT_SUM, aTextSum );
SetHelpId ( SID_INPUT_SUM, HID_INSWIN_SUMME );
SetItemText ( SID_INPUT_EQUAL, aTextEqual );
@@ -634,20 +622,16 @@ void ScInputWindow::DataChanged( const DataChangedEvent& rDCEvt )
if ( rDCEvt.GetType() == DataChangedEventType::SETTINGS && (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) )
{
// update item images
- ScModule* pScMod = SC_MOD();
- SfxImageManager* pImgMgr = SfxImageManager::GetImageManager(*pScMod);
-
- // IMAGE macro uses pScMod, pImgMg
- SetItemImage( SID_INPUT_FUNCTION, IMAGE( SID_INPUT_FUNCTION ) );
+ SetItemImage(SID_INPUT_FUNCTION, Image(BitmapEx(ScResId(RID_BMP_INPUT_FUNCTION))));
if ( bIsOkCancelMode )
{
- SetItemImage( SID_INPUT_CANCEL, IMAGE( SID_INPUT_CANCEL ) );
- SetItemImage( SID_INPUT_OK, IMAGE( SID_INPUT_OK ) );
+ SetItemImage(SID_INPUT_CANCEL, Image(BitmapEx(ScResId(RID_BMP_INPUT_CANCEL))));
+ SetItemImage(SID_INPUT_OK, Image(BitmapEx(ScResId(RID_BMP_INPUT_OK))));
}
else
{
- SetItemImage( SID_INPUT_SUM, IMAGE( SID_INPUT_SUM ) );
- SetItemImage( SID_INPUT_EQUAL, IMAGE( SID_INPUT_EQUAL ) );
+ SetItemImage(SID_INPUT_SUM, Image(BitmapEx(ScResId(RID_BMP_INPUT_SUM))));
+ SetItemImage(SID_INPUT_EQUAL, Image(BitmapEx(ScResId(RID_BMP_INPUT_EQUAL))));
}
}
diff --git a/sc/source/ui/src/toolbox.src b/sc/source/ui/src/toolbox.src
index b0955c09c884..6d3d2322eb4b 100644
--- a/sc/source/ui/src/toolbox.src
+++ b/sc/source/ui/src/toolbox.src
@@ -64,33 +64,29 @@ String SCSTR_QHELP_COLLAPSE_FORMULA
Text [ en-US ] = "Collapse Formula Bar" ;
};
-// Don't use this image list for normal toolbar images. We have now our commandimagelist
-// folder in icon-themes/(name of theme)/cmd. This list is now only used for special
-//toolboxes that are used in floating windows.
-
-#define DEFAULT_IDLIST \
- IdList = { \
- /* Eingabezeile */ \
- SID_INPUT_FUNCTION; /* 26047 */ \
- SID_INPUT_SUM; /* 26048 */ \
- SID_INPUT_EQUAL; /* 26049 */ \
- SID_INPUT_CANCEL; /* 26050 */ \
- SID_INPUT_OK; /* 26051 */ \
- }; \
- IdCount = { \
- 5; \
- };
-
-ImageList RID_DEFAULTIMAGELIST_SC
+Bitmap RID_BMP_INPUT_FUNCTION
{
- Prefix = "sc";
- DEFAULT_IDLIST
+ File = "sc26047.png";
};
-ImageList RID_DEFAULTIMAGELIST_LC
+Bitmap RID_BMP_INPUT_SUM
{
- Prefix = "lc";
- DEFAULT_IDLIST
+ File = "sc26048.png";
+};
+
+Bitmap RID_BMP_INPUT_EQUAL
+{
+ File = "sc26049.png";
+};
+
+Bitmap RID_BMP_INPUT_CANCEL
+{
+ File = "sc26050.png";
+};
+
+Bitmap RID_BMP_INPUT_OK
+{
+ File = "sc26051.png";
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */