- update to 4.0.2.2.1 (SUSE 4.0-rc1, tag suse-4.0-1, based on upstream 4.0.2.2) OBS-URL: https://build.opensuse.org/request/show/171281 OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=30
152 lines
5.6 KiB
Diff
152 lines
5.6 KiB
Diff
diff -urN libreoffice-4.0.0.0.beta1.old/vcl/inc/impimagetree.hxx libreoffice-4.0.0.0.beta1/vcl/inc/impimagetree.hxx
|
|
--- libreoffice-4.0.0.0.beta1.old/vcl/inc/impimagetree.hxx 2012-12-17 12:47:09.692137928 +0100
|
|
+++ libreoffice-4.0.0.0.beta1/vcl/inc/impimagetree.hxx 2012-12-17 12:48:30.214130463 +0100
|
|
@@ -76,6 +76,10 @@
|
|
typedef boost::unordered_map<
|
|
rtl::OUString, std::pair< bool, BitmapEx >, rtl::OUStringHash > IconCache;
|
|
|
|
+ // we want to search zip files (icons) also in /usr/share/
|
|
+ ::rtl::OUString m_datadir; // /usr/share/
|
|
+ ::rtl::OUString m_libdir; // /usr/lib or /usr/lib64
|
|
+
|
|
rtl::OUString m_style;
|
|
Paths m_paths;
|
|
CheckStyleCache m_checkStyleCache;
|
|
@@ -84,6 +88,7 @@
|
|
|
|
void setStyle(rtl::OUString const & style );
|
|
|
|
+ void addUrlToPaths(const rtl::OUString &url);
|
|
void resetPaths();
|
|
|
|
bool checkStyleCacheLookup( rtl::OUString const & style, bool &exists );
|
|
diff -urN libreoffice-4.0.0.0.beta1.old/vcl/source/gdi/impimagetree.cxx libreoffice-4.0.0.0.beta1/vcl/source/gdi/impimagetree.cxx
|
|
--- libreoffice-4.0.0.0.beta1.old/vcl/source/gdi/impimagetree.cxx 2012-12-17 12:47:09.685137929 +0100
|
|
+++ libreoffice-4.0.0.0.beta1/vcl/source/gdi/impimagetree.cxx 2012-12-17 12:48:30.214130463 +0100
|
|
@@ -146,7 +146,16 @@
|
|
|
|
}
|
|
|
|
-ImplImageTree::ImplImageTree() { m_cacheIcons = true; }
|
|
+ImplImageTree::ImplImageTree()
|
|
+{
|
|
+ m_cacheIcons = true;
|
|
+ m_datadir = ::rtl::OUString( "/usr/share/" );
|
|
+#if defined(X86_64)
|
|
+ m_libdir = ::rtl::OUString( "/usr/lib64/" );
|
|
+#else
|
|
+ m_libdir = ::rtl::OUString( "/usr/lib/" );
|
|
+#endif
|
|
+}
|
|
|
|
ImplImageTree::~ImplImageTree() {}
|
|
|
|
@@ -288,6 +297,22 @@
|
|
}
|
|
}
|
|
|
|
+void ImplImageTree::addUrlToPaths(const rtl::OUString &url) {
|
|
+ if ( url.getLength() == 0 )
|
|
+ return;
|
|
+ m_paths.push_back(
|
|
+ std::make_pair(
|
|
+ url,
|
|
+ css::uno::Reference< css::container::XNameAccess >()));
|
|
+ sal_Int32 nLibDirPos = url.indexOf( m_libdir );
|
|
+ if ( nLibDirPos >= 0 ) {
|
|
+ m_paths.push_back(
|
|
+ std::make_pair(
|
|
+ url.replaceAt( nLibDirPos, m_libdir.getLength(), m_datadir ),
|
|
+ css::uno::Reference< css::container::XNameAccess >()));
|
|
+ }
|
|
+}
|
|
+
|
|
void ImplImageTree::resetPaths() {
|
|
m_paths.clear();
|
|
{
|
|
@@ -296,10 +321,7 @@
|
|
rtl::Bootstrap::expandMacros(url);
|
|
INetURLObject u(url);
|
|
OSL_ASSERT(!u.HasError());
|
|
- m_paths.push_back(
|
|
- std::make_pair(
|
|
- u.GetMainURL(INetURLObject::NO_DECODE),
|
|
- css::uno::Reference< css::container::XNameAccess >()));
|
|
+ addUrlToPaths(u.GetMainURL(INetURLObject::NO_DECODE));
|
|
}
|
|
{
|
|
rtl::OUString url(
|
|
@@ -313,17 +335,12 @@
|
|
b.appendAscii(RTL_CONSTASCII_STRINGPARAM("_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 >()));
|
|
+ addUrlToPaths(u.GetMainURL(INetURLObject::NO_DECODE));
|
|
}
|
|
{
|
|
rtl::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 >()));
|
|
+ addUrlToPaths(url);
|
|
}
|
|
{
|
|
rtl::OUString url(
|
|
@@ -336,18 +353,13 @@
|
|
b.append(m_style);
|
|
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 >()));
|
|
+ addUrlToPaths(u.GetMainURL(INetURLObject::NO_DECODE));
|
|
}
|
|
if ( m_style == "default" )
|
|
{
|
|
rtl::OUString url( "$BRAND_BASE_DIR/share/config/images");
|
|
rtl::Bootstrap::expandMacros(url);
|
|
- m_paths.push_back(
|
|
- std::make_pair(
|
|
- url, css::uno::Reference< css::container::XNameAccess >()));
|
|
+ addUrlToPaths(url);
|
|
}
|
|
}
|
|
|
|
diff -urN libreoffice-4.0.0.0.beta1.old/xmlhelp/source/cxxhelp/provider/provider.cxx libreoffice-4.0.0.0.beta1/xmlhelp/source/cxxhelp/provider/provider.cxx
|
|
--- libreoffice-4.0.0.0.beta1.old/xmlhelp/source/cxxhelp/provider/provider.cxx 2012-12-17 12:47:12.392137678 +0100
|
|
+++ libreoffice-4.0.0.0.beta1/xmlhelp/source/cxxhelp/provider/provider.cxx 2012-12-17 12:48:30.214130463 +0100
|
|
@@ -326,7 +326,7 @@
|
|
rtl::OUString( " " ) +
|
|
setupextension );
|
|
|
|
- uno::Sequence< rtl::OUString > aImagesZipPaths( 2 );
|
|
+ uno::Sequence< rtl::OUString > aImagesZipPaths( 3 );
|
|
xHierAccess = getHierAccess( sProvider, "org.openoffice.Office.Common" );
|
|
|
|
rtl::OUString aPath( getKey( xHierAccess, "Path/Current/UserConfig" ) );
|
|
@@ -335,6 +335,19 @@
|
|
|
|
aPath = rtl::OUString("$BRAND_BASE_DIR/share/config");
|
|
rtl::Bootstrap::expandMacros(aPath);
|
|
+ aImagesZipPaths[ 2 ] = aPath;
|
|
+
|
|
+ // try also /usr/share and even before /usr/lib
|
|
+ ::rtl::OUString aDataDir = ::rtl::OUString::createFromAscii ( "/usr/share/" );
|
|
+#if defined(X86_64)
|
|
+ ::rtl::OUString aLibDir = ::rtl::OUString::createFromAscii ( "/usr/lib64/" );
|
|
+#else
|
|
+ ::rtl::OUString aLibDir = ::rtl::OUString::createFromAscii ( "/usr/lib/" );
|
|
+#endif
|
|
+ sal_Int32 nLibDirPos = aPath.indexOf( aLibDir );
|
|
+
|
|
+ if ( nLibDirPos >= 0 )
|
|
+ aPath = aPath.replaceAt( nLibDirPos, aLibDir.getLength(), aDataDir );
|
|
aImagesZipPaths[ 1 ] = aPath;
|
|
|
|
sal_Bool showBasic = getBooleanKey(xHierAccess,"Help/ShowBasic");
|