From 40f9ae367ca71e9dadb7cd76b08616b229726d7e Mon Sep 17 00:00:00 2001 From: Maxim Monastirsky Date: Wed, 13 Jan 2016 00:45:08 +0200 Subject: 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 --- framework/source/classes/resource.src | 9 +++++++++ framework/source/uielement/popuptoolbarcontroller.cxx | 12 +++++------- 2 files changed, 14 insertions(+), 7 deletions(-) (limited to 'framework/source') diff --git a/framework/source/classes/resource.src b/framework/source/classes/resource.src index 66f5a2451642..9e0fee8d26ef 100644 --- a/framework/source/classes/resource.src +++ b/framework/source/classes/resource.src @@ -205,4 +205,13 @@ String STR_LANGSTATUS_HINT 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: */ diff --git a/framework/source/uielement/popuptoolbarcontroller.cxx b/framework/source/uielement/popuptoolbarcontroller.cxx index c076652bd11d..d2c272bdd158 100644 --- a/framework/source/uielement/popuptoolbarcontroller.cxx +++ b/framework/source/uielement/popuptoolbarcontroller.cxx @@ -17,6 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include +#include + #include #include #include @@ -43,7 +46,6 @@ #include #include #include -#include #include #include #include @@ -417,12 +419,8 @@ void SaveToolbarController::updateImage() } else if ( m_xModifiable.is() && m_xModifiable->isModified() ) { - const OUString aImageURL( "private:graphicrepository/res/savemodified_" + ( bLargeIcons ? OUString( "large.png" ) : OUString( "small.png" ) ) ); - const css::uno::Reference< css::graphic::XGraphicProvider > xGraphicProvider( css::graphic::GraphicProvider::create( m_xContext ) ); - 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 ); + Image aResImage( bLargeIcons ? FwkResId( IMG_SAVEMODIFIED_LARGE ) : FwkResId( IMG_SAVEMODIFIED_SMALL ) ); + aImage = aResImage; } if ( !aImage ) -- cgit v1.2.3