summaryrefslogtreecommitdiff
path: root/fpicker
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-12-06 09:18:34 +0000
committerCaolán McNamara <caolanm@redhat.com>2016-12-06 10:12:32 +0000
commitb80dc5827125a0ab3bc6b5479330ba2469a6afb9 (patch)
treeb51196d55b321133f367dd2320d6f17e858ea2f2 /fpicker
parent13e77648265a91ec2b7d649d30a108e4e1eff3c8 (diff)
unwind fpicker RID_FILEPICKER_IMAGES imagelist
Change-Id: I1b55e4581c7fcbdf228c3b903269e28d37e53297
Diffstat (limited to 'fpicker')
-rw-r--r--fpicker/source/office/PlacesListBox.cxx4
-rw-r--r--fpicker/source/office/RemoteFilesDialog.cxx3
-rw-r--r--fpicker/source/office/RemoteFilesDialog.hxx2
-rw-r--r--fpicker/source/office/iodlg.cxx14
-rw-r--r--fpicker/source/office/iodlg.hrc9
-rw-r--r--fpicker/source/office/iodlg.hxx3
-rw-r--r--fpicker/source/office/iodlg.src34
-rw-r--r--fpicker/source/office/iodlgimp.cxx2
8 files changed, 35 insertions, 36 deletions
diff --git a/fpicker/source/office/PlacesListBox.cxx b/fpicker/source/office/PlacesListBox.cxx
index eb77e55d548a..26844d216ee1 100644
--- a/fpicker/source/office/PlacesListBox.cxx
+++ b/fpicker/source/office/PlacesListBox.cxx
@@ -186,9 +186,9 @@ bool PlacesListBox::EventNotify( NotifyEvent& rNEvt )
Image PlacesListBox::getEntryIcon( const PlacePtr& pPlace )
{
- Image theImage = mpDlg->GetButtonImage( IMG_FILEDLG_PLACE_LOCAL );
+ Image theImage = mpDlg->GetButtonImage( BMP_FILEDLG_PLACE_LOCAL );
if ( !pPlace->IsLocal( ) )
- theImage = mpDlg->GetButtonImage( IMG_FILEDLG_PLACE_REMOTE );
+ theImage = mpDlg->GetButtonImage( BMP_FILEDLG_PLACE_REMOTE );
return theImage;
}
diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index f598eaee7d51..bda6faf11315 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -214,8 +214,7 @@ RemoteFilesDialog::RemoteFilesDialog( vcl::Window* pParent, PickerFlags nBits )
{
get( m_pOk_btn, "save" );
- m_aImages = ImageList( fpicker::SvtResId( RID_FILEPICKER_IMAGES ) );
- m_pNewFolder->SetModeImage( m_aImages.GetImage( IMG_FILEDLG_CREATEFOLDER ) );
+ m_pNewFolder->SetModeImage(Image(BitmapEx(fpicker::SvtResId(BMP_FILEDLG_CREATEFOLDER))));
m_pNewFolder->SetClickHdl( LINK( this, RemoteFilesDialog, NewFolderHdl ) );
}
diff --git a/fpicker/source/office/RemoteFilesDialog.hxx b/fpicker/source/office/RemoteFilesDialog.hxx
index 995a7b715c0d..ab8b8131bf6b 100644
--- a/fpicker/source/office/RemoteFilesDialog.hxx
+++ b/fpicker/source/office/RemoteFilesDialog.hxx
@@ -164,8 +164,6 @@ private:
VclPtr< AutocompleteEdit > m_pName_ed;
VclPtr<PopupMenu> m_pAddMenu;
- ImageList m_aImages;
-
std::vector< ServicePtr > m_aServices;
std::vector< std::pair< OUString, OUString > > m_aFilters;
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 8b1f47a1d2cf..4877328f8404 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -566,7 +566,6 @@ void SvtFileDialog::Init_Impl
pImpl->_pLbImageTemplates->setMaxWidthChars(40);
pImpl->_pLbFilter->setMaxWidthChars(40);
- m_aImages = ImageList( SvtResId( RID_FILEPICKER_IMAGES ) );
vcl::Window *pUpContainer = get<vcl::Window>("up");
pImpl->_pBtnUp = VclPtr<SvtUpButton_Impl>::Create(pUpContainer, this, 0);
pImpl->_pBtnUp->SetHelpId( HID_FILEOPEN_LEVELUP );
@@ -622,7 +621,7 @@ void SvtFileDialog::Init_Impl
_pSplitter->SetBackground( Wallpaper( Application::GetSettings().GetStyleSettings().GetFaceColor() ));
_pSplitter->SetSplitHdl( LINK( this, SvtFileDialog, Split_Hdl ) );
- Image aNewFolderImg( GetButtonImage( IMG_FILEDLG_CREATEFOLDER ) );
+ Image aNewFolderImg( GetButtonImage( BMP_FILEDLG_CREATEFOLDER ) );
pImpl->_pBtnNewFolder->SetModeImage( aNewFolderImg );
if ( nStyle & PickerFlags::ReadOnly )
@@ -2266,14 +2265,12 @@ bool SvtFileDialog::IsolateFilterFromPath_Impl( OUString& rPath, OUString& rFilt
void SvtFileDialog::implUpdateImages( )
{
- m_aImages = ImageList( SvtResId( RID_FILEPICKER_IMAGES ) );
-
// set the appropriate images on the buttons
if ( pImpl->_pBtnUp )
- pImpl->_pBtnUp->SetModeImage( GetButtonImage( IMG_FILEDLG_BTN_UP ) );
+ pImpl->_pBtnUp->SetModeImage( GetButtonImage( BMP_FILEDLG_BTN_UP ) );
if ( pImpl->_pBtnNewFolder )
- pImpl->_pBtnNewFolder->SetModeImage( GetButtonImage( IMG_FILEDLG_CREATEFOLDER ) );
+ pImpl->_pBtnNewFolder->SetModeImage( GetButtonImage( BMP_FILEDLG_CREATEFOLDER ) );
}
@@ -2735,6 +2732,11 @@ IMPL_LINK_NOARG( SvtFileDialog, Split_Hdl, Splitter*, void )
_pSplitter->SetPosPixel( Point( placeSize.Width(), _pSplitter->GetPosPixel().Y() ) );
}
+Image SvtFileDialog::GetButtonImage( sal_uInt16 _nButtonId ) const
+{
+ return Image(BitmapEx(SvtResId(_nButtonId)));
+}
+
QueryFolderNameDialog::QueryFolderNameDialog(vcl::Window* _pParent,
const OUString& rTitle, const OUString& rDefaultText)
: ModalDialog(_pParent, "FolderNameDialog", "fps/ui/foldernamedialog.ui")
diff --git a/fpicker/source/office/iodlg.hrc b/fpicker/source/office/iodlg.hrc
index 9653e0891ece..4b403265332c 100644
--- a/fpicker/source/office/iodlg.hrc
+++ b/fpicker/source/office/iodlg.hrc
@@ -23,11 +23,6 @@
#include "svtools/helpid.hrc"
#include <vcl/fpicker.hrc>
-#define IMG_FILEDLG_BTN_UP 10
-#define IMG_FILEDLG_CREATEFOLDER 14
-#define IMG_FILEDLG_PLACE_LOCAL 15
-#define IMG_FILEDLG_PLACE_REMOTE 16
-
#define STR_EXPLORERFILE_OPEN (RID_FPICKER_START+31)
#define STR_EXPLORERFILE_SAVE (RID_FPICKER_START+32)
#define STR_EXPLORERFILE_BUTTONSAVE (RID_FPICKER_START+33)
@@ -38,6 +33,10 @@
#define STR_PREVIEW (RID_FPICKER_START+38)
#define STR_DEFAULT_DIRECTORY (RID_FPICKER_START+39)
#define STR_PLACES_TITLE (RID_FPICKER_START+40)
+#define BMP_FILEDLG_BTN_UP (RID_FPICKER_START+41)
+#define BMP_FILEDLG_CREATEFOLDER (RID_FPICKER_START+42)
+#define BMP_FILEDLG_PLACE_LOCAL (RID_FPICKER_START+43)
+#define BMP_FILEDLG_PLACE_REMOTE (RID_FPICKER_START+44)
#endif
diff --git a/fpicker/source/office/iodlg.hxx b/fpicker/source/office/iodlg.hxx
index 04f3ebfe8262..0f005f889646 100644
--- a/fpicker/source/office/iodlg.hxx
+++ b/fpicker/source/office/iodlg.hxx
@@ -81,7 +81,6 @@ private:
PickerFlags _nPickerFlags;
bool _bIsInExecute : 1;
- ImageList m_aImages;
::svt::SmartContent m_aContent;
::std::set< VclPtr<Control> >
@@ -238,7 +237,7 @@ public:
inline void EraseDefaultExt( sal_Int32 _nIndex = 0 );
inline const OUString& GetDefaultExt() const;
- inline Image GetButtonImage( sal_uInt16 _nButtonId ) const { return m_aImages.GetImage( _nButtonId ); }
+ Image GetButtonImage( sal_uInt16 _nButtonId ) const;
bool ContentIsFolder( const OUString& rURL ) override { return m_aContent.isFolder( rURL ) && m_aContent.isValid(); }
bool ContentHasParentFolder( const OUString& rURL );
diff --git a/fpicker/source/office/iodlg.src b/fpicker/source/office/iodlg.src
index f017c4bdf42b..176f94e8578c 100644
--- a/fpicker/source/office/iodlg.src
+++ b/fpicker/source/office/iodlg.src
@@ -22,22 +22,24 @@
#include "iodlg.hrc"
#include "OfficeFilePicker.hrc"
-// image lists ***************************************************************
-
-ImageList RID_FILEPICKER_IMAGES
-{
- Prefix = "fp";
- IdList =
- {
- IMG_FILEDLG_BTN_UP;
- IMG_FILEDLG_CREATEFOLDER;
- IMG_FILEDLG_PLACE_LOCAL;
- IMG_FILEDLG_PLACE_REMOTE;
- };
- IdCount =
- {
- 4;
- };
+Bitmap BMP_FILEDLG_BTN_UP
+{
+ File = "fp010.png";
+};
+
+Bitmap BMP_FILEDLG_CREATEFOLDER
+{
+ File = "fp014.png";
+};
+
+Bitmap BMP_FILEDLG_PLACE_LOCAL
+{
+ File = "fp015.png";
+};
+
+Bitmap BMP_FILEDLG_PLACE_REMOTE
+{
+ File = "fp016.png";
};
// strings *******************************************************************
diff --git a/fpicker/source/office/iodlgimp.cxx b/fpicker/source/office/iodlgimp.cxx
index 62ed95d92af8..7df00c0b42f3 100644
--- a/fpicker/source/office/iodlgimp.cxx
+++ b/fpicker/source/office/iodlgimp.cxx
@@ -127,7 +127,7 @@ void SvtFileDialogURLSelector::Activate()
SvtUpButton_Impl::SvtUpButton_Impl( vcl::Window *pParent, SvtFileDialog* pDlg, WinBits nBits )
- :SvtFileDialogURLSelector( pParent, pDlg, nBits, IMG_FILEDLG_BTN_UP )
+ :SvtFileDialogURLSelector( pParent, pDlg, nBits, BMP_FILEDLG_BTN_UP )
{
}