[Libreoffice-commits] core.git: fpicker/source
Caolán McNamara
caolanm at redhat.com
Tue Dec 6 10:13:10 UTC 2016
fpicker/source/office/PlacesListBox.cxx | 4 +--
fpicker/source/office/RemoteFilesDialog.cxx | 3 --
fpicker/source/office/RemoteFilesDialog.hxx | 2 -
fpicker/source/office/iodlg.cxx | 14 ++++++-----
fpicker/source/office/iodlg.hrc | 9 +++----
fpicker/source/office/iodlg.hxx | 3 --
fpicker/source/office/iodlg.src | 34 ++++++++++++++--------------
fpicker/source/office/iodlgimp.cxx | 2 -
8 files changed, 35 insertions(+), 36 deletions(-)
New commits:
commit b80dc5827125a0ab3bc6b5479330ba2469a6afb9
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Dec 6 09:18:34 2016 +0000
unwind fpicker RID_FILEPICKER_IMAGES imagelist
Change-Id: I1b55e4581c7fcbdf228c3b903269e28d37e53297
diff --git a/fpicker/source/office/PlacesListBox.cxx b/fpicker/source/office/PlacesListBox.cxx
index eb77e55..26844d2 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 f598eae..bda6faf 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 995a7b7..ab8b813 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 8b1f47a..4877328 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 9653e08..4b40326 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 04f3ebf..0f005f8 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 f017c4b..176f94e 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 62ed95d..7df00c0 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 )
{
}
More information about the Libreoffice-commits
mailing list