[Libreoffice-commits] core.git: Branch 'libreoffice-5-1-0' - framework/inc framework/source icon-themes/galaxy

Maxim Monastirsky momonasmon at gmail.com
Wed Jan 20 06:24:55 PST 2016


 framework/inc/classes/resource.hrc                    |    3 +++
 framework/source/classes/resource.src                 |    9 +++++++++
 framework/source/uielement/popuptoolbarcontroller.cxx |   12 +++++-------
 icon-themes/galaxy/res/savemodified_large.png         |binary
 icon-themes/galaxy/res/savemodified_small.png         |binary
 5 files changed, 17 insertions(+), 7 deletions(-)

New commits:
commit 9dfc7390a1b3d14aef9ef6b75abac40c44f4776a
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date:   Wed Jan 13 00:45:08 2016 +0200

    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.
    
    (cherry picked from commit 40f9ae367ca71e9dadb7cd76b08616b229726d7e)
    Reviewed-on: https://gerrit.libreoffice.org/21409
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
    (cherry picked from commit 3c11617d80ec1cadc150626a2da357f438f0928c)
    
    Support “savemodified” status in Galaxy as well
    
    (cherry picked from commit 8a0462791d2477ab6e77369db593c3c7ca641b23)
    Reviewed-on: https://gerrit.libreoffice.org/21465
    Reviewed-by: Maxim Monastirsky <momonasmon at gmail.com>
    Tested-by: Maxim Monastirsky <momonasmon at gmail.com>
    (cherry picked from commit 253023901355c722c2b0f71769be94a5efd77162)
    
    Change-Id: If3fa7a8a194a0289c79fa10987138dfb35eaeca2
    Reviewed-on: https://gerrit.libreoffice.org/21466
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Reviewed-by: Tor Lillqvist <tml at collabora.com>
    Reviewed-by: Maxim Monastirsky <momonasmon at gmail.com>
    Tested-by: Maxim Monastirsky <momonasmon at gmail.com>

diff --git a/framework/inc/classes/resource.hrc b/framework/inc/classes/resource.hrc
index 4331a42..d1fdfeb 100644
--- a/framework/inc/classes/resource.hrc
+++ b/framework/inc/classes/resource.hrc
@@ -53,6 +53,9 @@
 #define STR_OPEN_REMOTE                         (RID_STR_START+26)
 #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 MENUITEM_TOOLBAR_VISIBLEBUTTON          1
diff --git a/framework/source/classes/resource.src b/framework/source/classes/resource.src
index 66f5a24..9e0fee8 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 111491b..0464368 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 <classes/resource.hrc>
+#include <classes/fwkresid.hxx>
+
 #include <cppuhelper/implbase.hxx>
 #include <cppuhelper/supportsservice.hxx>
 #include <comphelper/processfactory.hxx>
@@ -43,7 +46,6 @@
 #include <com/sun/star/frame/XStorable.hpp>
 #include <com/sun/star/frame/XSubToolbarController.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/ucb/CommandFailedException.hpp>
 #include <com/sun/star/ucb/ContentCreationException.hpp>
@@ -413,12 +415,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 )
diff --git a/icon-themes/galaxy/res/savemodified_large.png b/icon-themes/galaxy/res/savemodified_large.png
new file mode 100644
index 0000000..c1052e0
Binary files /dev/null and b/icon-themes/galaxy/res/savemodified_large.png differ
diff --git a/icon-themes/galaxy/res/savemodified_small.png b/icon-themes/galaxy/res/savemodified_small.png
new file mode 100644
index 0000000..c0b5301
Binary files /dev/null and b/icon-themes/galaxy/res/savemodified_small.png differ


More information about the Libreoffice-commits mailing list