Kaydet (Commit) 40f9ae36 authored tarafından Maxim Monastirsky's avatar Maxim Monastirsky

Modified state icons not packaged into zip

It seems that images must be mentioned in some src file.
Unfortunately had to copy the save icon in place of the
modified icon in galaxy, to satisfy the resource compiler.

Change-Id: If3fa7a8a194a0289c79fa10987138dfb35eaeca2
üst 6640bfc6
...@@ -53,6 +53,9 @@ ...@@ -53,6 +53,9 @@
#define STR_OPEN_REMOTE (RID_STR_START+26) #define STR_OPEN_REMOTE (RID_STR_START+26)
#define STR_REMOTE_TITLE (RID_STR_START+27) #define STR_REMOTE_TITLE (RID_STR_START+27)
#define IMG_SAVEMODIFIED_SMALL (RID_IMAGE_START+0)
#define IMG_SAVEMODIFIED_LARGE (RID_IMAGE_START+1)
#define POPUPMENU_TOOLBAR_QUICKCUSTOMIZATION (RID_MENU_START+0) #define POPUPMENU_TOOLBAR_QUICKCUSTOMIZATION (RID_MENU_START+0)
#define MENUITEM_TOOLBAR_VISIBLEBUTTON 1 #define MENUITEM_TOOLBAR_VISIBLEBUTTON 1
......
...@@ -205,4 +205,13 @@ String STR_LANGSTATUS_HINT ...@@ -205,4 +205,13 @@ String STR_LANGSTATUS_HINT
Text [ en-US ] = "Text Language. Right-click to set character or paragraph language" ; Text [ en-US ] = "Text Language. Right-click to set character or paragraph language" ;
}; };
Image IMG_SAVEMODIFIED_SMALL
{
ImageBitmap = Bitmap{File = "savemodified_small.png";};
};
Image IMG_SAVEMODIFIED_LARGE
{
ImageBitmap = Bitmap{File = "savemodified_large.png";};
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -17,6 +17,9 @@ ...@@ -17,6 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include <classes/resource.hrc>
#include <classes/fwkresid.hxx>
#include <cppuhelper/implbase.hxx> #include <cppuhelper/implbase.hxx>
#include <cppuhelper/supportsservice.hxx> #include <cppuhelper/supportsservice.hxx>
#include <comphelper/processfactory.hxx> #include <comphelper/processfactory.hxx>
...@@ -43,7 +46,6 @@ ...@@ -43,7 +46,6 @@
#include <com/sun/star/frame/XStorable.hpp> #include <com/sun/star/frame/XStorable.hpp>
#include <com/sun/star/frame/XSubToolbarController.hpp> #include <com/sun/star/frame/XSubToolbarController.hpp>
#include <com/sun/star/frame/XUIControllerFactory.hpp> #include <com/sun/star/frame/XUIControllerFactory.hpp>
#include <com/sun/star/graphic/GraphicProvider.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/ucb/CommandFailedException.hpp> #include <com/sun/star/ucb/CommandFailedException.hpp>
#include <com/sun/star/ucb/ContentCreationException.hpp> #include <com/sun/star/ucb/ContentCreationException.hpp>
...@@ -417,12 +419,8 @@ void SaveToolbarController::updateImage() ...@@ -417,12 +419,8 @@ void SaveToolbarController::updateImage()
} }
else if ( m_xModifiable.is() && m_xModifiable->isModified() ) else if ( m_xModifiable.is() && m_xModifiable->isModified() )
{ {
const OUString aImageURL( "private:graphicrepository/res/savemodified_" + ( bLargeIcons ? OUString( "large.png" ) : OUString( "small.png" ) ) ); Image aResImage( bLargeIcons ? FwkResId( IMG_SAVEMODIFIED_LARGE ) : FwkResId( IMG_SAVEMODIFIED_SMALL ) );
const css::uno::Reference< css::graphic::XGraphicProvider > xGraphicProvider( css::graphic::GraphicProvider::create( m_xContext ) ); aImage = aResImage;
const css::uno::Reference< css::graphic::XGraphic > xGraphic(
xGraphicProvider->queryGraphic( comphelper::InitPropertySequence( { { "URL", css::uno::makeAny( aImageURL ) } } ) ), css::uno::UNO_QUERY );
if ( xGraphic.is() )
aImage = Image( xGraphic );
} }
if ( !aImage ) if ( !aImage )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment