[Libreoffice-commits] core.git: 2 commits - postprocess/CustomTarget_images.mk postprocess/Package_images_install.mk postprocess/Package_images.mk scp2/source vcl/source

Stephan Bergmann sbergman at redhat.com
Mon Apr 29 09:38:42 PDT 2013


 postprocess/CustomTarget_images.mk    |    6 ---
 postprocess/Package_images.mk         |    2 -
 postprocess/Package_images_install.mk |    1 
 scp2/source/ooo/common_brand.scp      |    8 ----
 vcl/source/gdi/impimagetree.cxx       |   61 ++++++++--------------------------
 5 files changed, 16 insertions(+), 62 deletions(-)

New commits:
commit 8b324e21f2ae4345f41b32e6c4b9c8a658dd5492
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Apr 29 18:38:12 2013 +0200

    There is no images*_brand.zip files
    
    Change-Id: I6ddeff7ae72693fd0951d71bd7b5444938bc7286

diff --git a/postprocess/CustomTarget_images.mk b/postprocess/CustomTarget_images.mk
index e7d08c7..6c59c1f 100644
--- a/postprocess/CustomTarget_images.mk
+++ b/postprocess/CustomTarget_images.mk
@@ -35,7 +35,6 @@ helpimages_DIR := $(call gb_CustomTarget_get_workdir,helpcontent2/source/auxilia
 packimages_CUSTOM_FALLBACKS := -c $(SRCDIR)/icon-themes/tango -c $(SRCDIR)/icon-themes/industrial
 
 $(eval $(call gb_CustomTarget_register_targets,postprocess/images,\
-	images_brand.zip \
 	$(if $(filter default,$(WITH_THEMES)),images.zip) \
 	$(foreach theme,$(filter-out default,$(WITH_THEMES)),images_$(theme).zip) \
 	commandimagelist.ilst \
@@ -68,11 +67,6 @@ $(packimages_DIR)/%.zip : \
 			-s $< -o $@ \
 			$(if $(findstring s,$(MAKEFLAGS)),> /dev/null))
 
-# make sure to have one to keep packing happy
-$(packimages_DIR)/images_brand.zip :
-	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),TCH,2)
-	touch $@
-
 # commandimagelist.ilst and sorted.lst are phony to rebuild everything each time
 .PHONY : $(packimages_DIR)/commandimagelist.ilst $(packimages_DIR)/sorted.lst
 
diff --git a/postprocess/Package_images.mk b/postprocess/Package_images.mk
index 6d60590..749da1e 100644
--- a/postprocess/Package_images.mk
+++ b/postprocess/Package_images.mk
@@ -27,8 +27,6 @@
 
 $(eval $(call gb_Package_Package,postprocess_images,$(call gb_CustomTarget_get_workdir,postprocess/images)))
 
-$(eval $(call gb_Package_add_file,postprocess_images,bin/images_brand.zip,images_brand.zip))
-
 $(if $(filter default,$(WITH_THEMES)),\
 $(eval $(call gb_Package_add_file,postprocess_images,bin/images.zip,images.zip)))
 
diff --git a/postprocess/Package_images_install.mk b/postprocess/Package_images_install.mk
index 1759d6c..af0f269 100644
--- a/postprocess/Package_images_install.mk
+++ b/postprocess/Package_images_install.mk
@@ -12,7 +12,6 @@ $(eval $(call gb_Package_Package,postprocess_images_install,$(call gb_CustomTarg
 $(eval $(call gb_Package_set_outdir,postprocess_images_install,$(INSTDIR)))
 
 $(eval $(call gb_Package_add_files,postprocess_images_install,share/config,\
-	images_brand.zip \
 	$(if $(filter default,$(WITH_THEMES)),images.zip) \
 	$(foreach theme,$(filter-out default,$(WITH_THEMES)),images_$(theme).zip) \
 ))
diff --git a/scp2/source/ooo/common_brand.scp b/scp2/source/ooo/common_brand.scp
index 60024a7..c4fe20a 100644
--- a/scp2/source/ooo/common_brand.scp
+++ b/scp2/source/ooo/common_brand.scp
@@ -61,7 +61,6 @@ Module gid_Module_Root_Brand
              gid_Brand_File_Bin_Libxml2,
              gid_Brand_File_Bmp_IntroAboutShell,
              gid_Brand_File_Html_Thirdpartylicensereadme,
-             gid_Brand_File_Images_Brand_Zip,
              gid_Brand_File_Lib_Dbghelp,
              gid_Brand_File_Lib_Mingw_GccS,
              gid_Brand_File_Lib_Mingw_Stdcpp,
@@ -619,13 +618,6 @@ File gid_Brand_File_Bmp_IntroAboutShell
     Styles = (ARCHIVE);
 End
 
-File gid_Brand_File_Images_Brand_Zip
-    TXT_FILE_BODY;
-    Dir = gid_Brand_Dir_Share_Config;
-    Name = "images_brand.zip";
-    Styles = (PACKED);
-End
-
 File gid_Brand_File_Txt_Package
     TXT_FILE_BODY;
     Dir = gid_Brand_Dir_Share_Extensions;
diff --git a/vcl/source/gdi/impimagetree.cxx b/vcl/source/gdi/impimagetree.cxx
index 8b45375..7a2fbdd 100644
--- a/vcl/source/gdi/impimagetree.cxx
+++ b/vcl/source/gdi/impimagetree.cxx
@@ -163,26 +163,22 @@ bool ImplImageTree::checkStyle(OUString const & style)
     setStyle(style);
 
     exists = false;
-    const OUString sBrandURLSuffix("_brand");
     for (Paths::iterator i(m_paths.begin()); i != m_paths.end() && !exists; ++i) {
         OUString aURL = i->first;
-        sal_Int32 nFromIndex = aURL.getLength() - sBrandURLSuffix.getLength();
-        // skip brand-specific icon themes; they are incomplete and thus not useful for this check
-        if (nFromIndex < 0 || !aURL.match(sBrandURLSuffix, nFromIndex)) {
-            osl::File aZip(aURL + ".zip");
-            if (aZip.open(osl_File_OpenFlag_Read) == ::osl::FileBase::E_None) {
-                aZip.close();
-                exists = true;
-            }
 
-            osl::Directory aLookaside(aURL);
-            if (aLookaside.open() == ::osl::FileBase::E_None) {
-                aLookaside.close();
-                exists = true;
-                m_cacheIcons = false;
-            } else {
-                m_cacheIcons = true;
-            }
+        osl::File aZip(aURL + ".zip");
+        if (aZip.open(osl_File_OpenFlag_Read) == ::osl::FileBase::E_None) {
+            aZip.close();
+            exists = true;
+        }
+
+        osl::Directory aLookaside(aURL);
+        if (aLookaside.open() == ::osl::FileBase::E_None) {
+            aLookaside.close();
+            exists = true;
+            m_cacheIcons = false;
+        } else {
+            m_cacheIcons = true;
         }
     }
     m_checkStyleCache[style] = exists;
@@ -286,30 +282,6 @@ void ImplImageTree::resetPaths() {
         OUStringBuffer b;
         b.appendAscii("images_");
         b.append(m_style);
-        b.appendAscii("_brand");
-        bool ok = u.Append(b.makeStringAndClear(), INetURLObject::ENCODE_ALL);
-        OSL_ASSERT(ok); (void) ok;
-        m_paths.push_back(
-            std::make_pair(
-                u.GetMainURL(INetURLObject::NO_DECODE),
-                css::uno::Reference< css::container::XNameAccess >()));
-    }
-    {
-        OUString url( "$BRAND_BASE_DIR/share/config/images_brand");
-        rtl::Bootstrap::expandMacros(url);
-        m_paths.push_back(
-            std::make_pair(
-                url, css::uno::Reference< css::container::XNameAccess >()));
-    }
-    {
-        OUString url(
-            "$BRAND_BASE_DIR/share/config");
-        rtl::Bootstrap::expandMacros(url);
-        INetURLObject u(url);
-        OSL_ASSERT(!u.HasError());
-        OUStringBuffer b;
-        b.appendAscii("images_");
-        b.append(m_style);
         bool ok = u.Append(b.makeStringAndClear(), INetURLObject::ENCODE_ALL);
         OSL_ASSERT(ok); (void) ok;
         m_paths.push_back(
commit d7ebca515a63b34343a044443fadf9064c8d9195
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Apr 29 18:28:55 2013 +0200

    Fix indentation
    
    Change-Id: Iaec745dc1c8eb0614cc2fe1d70a94a00d18cc934

diff --git a/vcl/source/gdi/impimagetree.cxx b/vcl/source/gdi/impimagetree.cxx
index 2ff71ea..8b45375 100644
--- a/vcl/source/gdi/impimagetree.cxx
+++ b/vcl/source/gdi/impimagetree.cxx
@@ -357,8 +357,8 @@ bool ImplImageTree::find(
     if (!m_cacheIcons) {
         for (Paths::iterator i(m_paths.begin()); i != m_paths.end(); ++i) {
             for (std::vector< OUString >::const_reverse_iterator j(
-                paths.rbegin());
-            j != paths.rend(); ++j)
+                     paths.rbegin());
+                 j != paths.rend(); ++j)
             {
                 osl::File file(i->first + "/" + *j);
                 if (file.open(osl_File_OpenFlag_Read) == ::osl::FileBase::E_None) {
@@ -389,8 +389,7 @@ bool ImplImageTree::find(
                 continue;
             }
         }
-        for (std::vector< OUString >::const_reverse_iterator j(
-                 paths.rbegin());
+        for (std::vector< OUString >::const_reverse_iterator j(paths.rbegin());
              j != paths.rend(); ++j)
         {
             if (i->second->hasByName(*j)) {


More information about the Libreoffice-commits mailing list