[ooo-build-commit] 13 commits - bin/piece bin/unopkg-regenerate-cache configure.in distro-configs/SUSE-11.2.conf.in distro-configs/SUSE.conf.in patches/dev300 src/acor_ru-RU.dat src/acor_sk-SK.dat src/Makefile.am
Petr Mladek
pmladek at kemper.freedesktop.org
Mon Oct 12 11:13:50 PDT 2009
bin/piece/desktop-support-app | 33
bin/piece/install-bootstrap | 1
bin/piece/unpack-extras | 8
bin/unopkg-regenerate-cache | 7
configure.in | 1
distro-configs/SUSE-11.2.conf.in | 44 +
distro-configs/SUSE.conf.in | 2
patches/dev300/apply | 54 -
patches/dev300/autodoc-two-template-types.diff | 53 -
patches/dev300/buildfix-gcc-4.3-compiler-error.diff | 14
patches/dev300/optional-icon-themes.diff | 408 ++++++++++
patches/dev300/piece-stax.diff | 12
patches/dev300/scripting-mailmerge-python-binary.diff | 8
patches/dev300/split-icons-search-usr-share-and-optional-icons.diff | 141 +++
patches/dev300/warning-string-comparsion-sw.diff | 76 -
src/Makefile.am | 2
src/acor_ru-RU.dat |binary
src/acor_sk-SK.dat |binary
18 files changed, 676 insertions(+), 188 deletions(-)
New commits:
commit 9e55e98fb1c26e78c0552261b8cc1efa2f842bba
Author: Petr Mladek <pmladek at suse.cz>
Date: Mon Oct 12 19:50:57 2009 +0200
Enable EMFPlus section for SLED10
* patches/dev300/apply: add EMFPlus for distro SUSE-10.1
diff --git a/patches/dev300/apply b/patches/dev300/apply
index 6d8f055..ef38c25 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -61,7 +61,7 @@ SUSE-9.1 : NovellBase
SUSE-9.2 : NovellBase
SUSE-9.3 : NovellBase
SUSE-10.0 : NovellBase
-SUSE-10.1 : NovellBase, BerkeleyDB43, BrokenSystemNSS, Java14, GTK28
+SUSE-10.1 : NovellBase, BerkeleyDB43, EMFPlus, Java14, BrokenSystemNSS, GTK28
SUSE-10.2 : NovellBase, BerkeleyDB43, EMFPlus, Java14, OpenGLTransitionsMesa703
SUSE-10.3 : NovellBase, BerkeleyDB43, EMFPlus, Java14, GCC41
SUSE-11.0 : NovellBase, BerkeleyDB43, EMFPlus, CairoFonts, PostgreSQL
commit 6b8a585df076a47e5e6cfab4201f107a54b59c8a
Author: Petr Mladek <pmladek at suse.cz>
Date: Mon Oct 12 19:41:42 2009 +0200
Bin obsolete autodoc-two-template-types.diff
* patches/dev300/autodoc-two-template-types.diff:
* patches/dev300/apply: was fixed in dev300-m50 (i#103005)
diff --git a/patches/dev300/apply b/patches/dev300/apply
index b269f34..6d8f055 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -3173,15 +3173,6 @@ odf-converter-ignore-writerfilter.diff, n#348471, n#502173, jholesov
# FIXME: 2009-08-17: These don't apply either. Can't find file to patch etc. --tml
# xlsx-export-skip-auto-format.diff, n#497560, janneke
-# FIXME: similar fix already in dev300_m50
-# partial support for two template types
-# it is needed to process the new XFastSAXSerializable.idl
-# the patch fixes the semantic analyze but not the output
-# the output of template types seems to be incomplete anyway
-
-# FIXME: 2009-08-17: indeed, does not even apply to dev300-m54. --tml
-# autodoc-two-template-types.diff, i#103005, pmladek
-
# this here depends on oox changes in OOXMLExport
# FIXME: 2009-08-20: Parts do not apply to dev300-m54, some do, but presumably
# best to let thorsten look into it . --tml
diff --git a/patches/dev300/autodoc-two-template-types.diff b/patches/dev300/autodoc-two-template-types.diff
deleted file mode 100644
index 37559c9..0000000
--- a/patches/dev300/autodoc-two-template-types.diff
+++ /dev/null
@@ -1,53 +0,0 @@
---- autodoc/source/parser_i/idl/pe_type2.cxx.old 2009-06-10 21:35:32.000000000 +0200
-+++ autodoc/source/parser_i/idl/pe_type2.cxx 2009-06-11 16:58:37.000000000 +0200
-@@ -47,7 +47,7 @@
- /** Implementation Concept for Parsing a Type
-
- Example Type:
-- sequence < ::abc::TName< TplType > > AnyName;
-+ sequence < ::abc::TName< TplType, TplType > > AnyName;
-
- Status Changes:
-
-@@ -62,6 +62,8 @@ expect_type:
-
- expect_type:
- TplType ->expect_quname_separator
-+ , -> in_template_type (process in nested PE_Type instance)
-+ TplType ->expect_quname_separator
- > -> e_none (finish, '>' not handled)
-
- > -> expect_quname_separator
-@@ -172,9 +174,29 @@ PE_Type::Process_Punctuation( const TokP
- }
- else if (eState == in_template_type)
- {
-- csv_assert( i_rToken.Id() == TokPunctuation::Greater );
-- eState = expect_quname_separator;
-- SetResult(done, stay);
-+ switch (i_rToken.Id())
-+ {
-+ case TokPunctuation::Comma:
-+ eState = in_template_type;
-+ // FIXME: We started tyo call MyTemplateType() more times; we might need to create array
-+ // of nTemplateType, update the output routines, ...
-+ // Hmm, the template types are not visible in the HTML output even when only one
-+ // template type is used => there might be missing even more code
-+ // Example of the more types is in XFastSAXSerializable.idl:
-+ // sequence< beans::Pair<string, long> > registerNamespaces
-+ SetResult( done, push_sure, &MyTemplateType() );
-+ break;
-+
-+ case TokPunctuation::Greater:
-+ eState = expect_quname_separator;
-+ SetResult(done, stay);
-+ break;
-+
-+ default:
-+ Cerr() << "Syntax error: in template type." << Endl();
-+ SetResult( not_done, pop_failure);
-+ break;
-+ }
- }
- }
-
commit e6106387caf5cec6aedf09ff757a3d7c2f65a26c
Author: Petr Mladek <pmladek at suse.cz>
Date: Mon Oct 12 19:37:28 2009 +0200
Update warning-string-comparsion-sw.diff for ooo320-m1
* patches/dev300/warning-string-comparsion-sw.diff:
* patches/dev300/apply: update for ooo310-m1; htmlforw.cxx was fixed better way
upstream (replaced string by enum)
diff --git a/patches/dev300/apply b/patches/dev300/apply
index 85c56c6..b269f34 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -2322,7 +2322,7 @@ size-sal-textenc.diff, i#70166
# doesn't apply with any obvious corrections.
# sw-dont-extern-sRTF-sHTML.diff, i#86772, jholesov
# warning: comparison with string literal results in unspecified results
-# warning-string-comparsion-sw.diff, i#86880, i#86772, pmladek
+warning-string-comparsion-sw.diff, i#86880, pmladek
# don't export trivial strings in svtools, increases linking time, bloats size
# svtools-dont-extern-sRTF-sHTML.diff, i#86772, jholesov
diff --git a/patches/dev300/warning-string-comparsion-sw.diff b/patches/dev300/warning-string-comparsion-sw.diff
index 15870fb..0817c19 100644
--- a/patches/dev300/warning-string-comparsion-sw.diff
+++ b/patches/dev300/warning-string-comparsion-sw.diff
@@ -1,80 +1,20 @@
---- sw/source/filter/html/htmlforw.cxx.old 2007-09-27 11:48:34.000000000 +0200
-+++ sw/source/filter/html/htmlforw.cxx 2008-03-07 13:29:49.000000000 +0100
-@@ -1088,7 +1088,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Wri
-
- sOut += sOptions;
-
-- if( (const sal_Char *)sHTML_IT_image == (const sal_Char *)pType )
-+ if( pType && !strcmp( sHTML_IT_image, pType ) )
- {
- aTmp = xPropSet->getPropertyValue(
- OUString::createFromAscii( "ImageURL" ) );
-@@ -1153,7 +1153,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Wri
- {
- // Wenn Zeichen-Objekte nicht absolut positioniert werden duerfen,
- // das entsprechende Flag loeschen.
-- nFrmOpts |= ((const sal_Char *)sHTML_IT_image == (const sal_Char *)pType
-+ nFrmOpts |= ( ( pType && !strcmp ( sHTML_IT_image, pType ) )
- ? HTML_FRMOPTS_IMG_CONTROL_CSS1
- : HTML_FRMOPTS_CONTROL_CSS1);
- }
-@@ -1163,8 +1163,9 @@ Writer& OutHTML_DrawFrmFmtAsControl( Wri
-
- if( rHTMLWrt.bCfgOutStyles )
- {
-- sal_Bool bEdit = sHTML_textarea == pTag || (const sal_Char *)sHTML_IT_file == (const sal_Char *)pType ||
-- (const sal_Char *)sHTML_IT_text == (const sal_Char *)pType;
-+ sal_Bool bEdit = ( pTag && !strcmp ( sHTML_textarea, pTag ) ) ||
-+ ( pType && !strcmp ( sHTML_IT_file, pType ) ) ||
-+ ( pType && !strcmp ( sHTML_IT_text, pType ) );
-
- SfxItemSet aItemSet( rHTMLWrt.pDoc->GetAttrPool(), RES_CHRATR_BEGIN,
- RES_CHRATR_END );
-@@ -1286,7 +1287,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Wri
-
- rWrt.Strm() << '>';
-
-- if( sHTML_select == pTag )
-+ if( pTag && !strcmp ( sHTML_select, pTag ) )
- {
- aTmp = xPropSet->getPropertyValue(
- OUString::createFromAscii( "StringItemList" ) );
-@@ -1366,7 +1367,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Wri
- }
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), sHTML_select, sal_False );
- }
-- else if( sHTML_textarea == pTag )
-+ else if( pTag && !strcmp ( sHTML_textarea, pTag ) )
- {
- // In TextAreas duerfen keine zusaetzlichen Spaces oder LF exportiert
- // werden!
-@@ -1393,7 +1394,8 @@ Writer& OutHTML_DrawFrmFmtAsControl( Wri
- }
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), sHTML_textarea, sal_False );
- }
-- else if( (const sal_Char *)sHTML_IT_checkbox == (const sal_Char *)pType || (const sal_Char *)sHTML_IT_radio == (const sal_Char *)pType )
-+ else if( ( pType && !strcmp ( sHTML_IT_checkbox, pType ) ) ||
-+ ( pType && !strcmp ( sHTML_IT_radio, pType ) ) )
- {
- aTmp = xPropSet->getPropertyValue( OUString::createFromAscii("Label") );
- if( aTmp.getValueType() == ::getCppuType((const OUString*)0) &&
--- sw/source/filter/rtf/rtfatr.cxx.old 2007-10-22 17:12:26.000000000 +0200
+++ sw/source/filter/rtf/rtfatr.cxx 2008-03-07 13:34:55.000000000 +0100
-@@ -1615,7 +1615,7 @@ void ExportPICT(const Size &rOrig, const
+@@ -1438,7 +1438,7 @@ void ExportPICT(const Size &rOrig, const
const SwCropGrf &rCr, const char *pBLIPType, const sal_uInt8 *pGraphicAry,
unsigned long nSize, SwRTFWriter &rWrt)
{
-- bool bIsWMF = (const char *)pBLIPType == (const char *)sRTF_WMETAFILE ? true : false;
-+ bool bIsWMF = (pBLIPType && !strcmp(pBLIPType, sRTF_WMETAFILE)) ? true : false;
+- bool bIsWMF = (const char *)pBLIPType == (const char *)OOO_STRING_SVTOOLS_RTF_WMETAFILE ? true : false;
++ bool bIsWMF = (pBLIPType && !strcmp(pBLIPType, OOO_STRING_SVTOOLS_RTF_WMETAFILE)) ? true : false;
if (pBLIPType && nSize && pGraphicAry)
{
- rWrt.Strm() << '{' << sRTF_PICT;
-@@ -1760,7 +1760,7 @@ static Writer& OutRTF_SwGrfNode(Writer&
+ rWrt.Strm() << '{' << OOO_STRING_SVTOOLS_RTF_PICT;
+@@ -1583,7 +1583,7 @@ static Writer& OutRTF_SwGrfNode(Writer&
the wmf format wrapped in nonshppict, so as to keep wordpad happy. If its
a wmf already then we don't need any such wrapping
*/
-- bool bIsWMF = (const sal_Char*)pBLIPType == (const sal_Char*)sRTF_WMETAFILE ? true : false;
-+ bool bIsWMF = (pBLIPType && !strcmp(pBLIPType, sRTF_WMETAFILE)) ? true : false;
+- bool bIsWMF = (const sal_Char*)pBLIPType == (const sal_Char*)OOO_STRING_SVTOOLS_RTF_WMETAFILE ? true : false;
++ bool bIsWMF = (pBLIPType && !strcmp(pBLIPType, OOO_STRING_SVTOOLS_RTF_WMETAFILE)) ? true : false;
if (!bIsWMF)
- OutComment(rRTFWrt, sRTF_SHPPICT);
+ OutComment(rRTFWrt, OOO_STRING_SVTOOLS_RTF_SHPPICT);
commit dcd6623241f03b014511b538c1f42b72ff31e3fb
Author: Petr Mladek <pmladek at suse.cz>
Date: Mon Oct 12 19:15:44 2009 +0200
Bin obsolete scripting-mailmerge-python-binary.diff
* patches/dev300/scripting-mailmerge-python-binary.diff:
* patches/dev300/apply: the script does not longer have the #!/bin/python
line; it is called another way, so the line is not necessary
diff --git a/patches/dev300/apply b/patches/dev300/apply
index f11f4d4..85c56c6 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -476,11 +476,6 @@ xmlhelp-work-with-symlinks.diff, i#81138, pmladek
localize-pl-cygwin-paths.diff, tml
-# fix path to the python binary in the mailmerge.py script
-# /bin/python does not exists and breaks the automatic rpm dependencies
-# FIXME 2008-11-26: the mailmerge.py in dev300-m35 doesn't have any #! line at all!?
-#scripting-mailmerge-python-binary.diff, pmladek
-
# Allow some technically illegal pathname components on Win32
# (directories with trailing spaces or periods) because some SMB
# servers like Netware (and Samba, if mangled names = No) do serve
diff --git a/patches/dev300/scripting-mailmerge-python-binary.diff b/patches/dev300/scripting-mailmerge-python-binary.diff
deleted file mode 100644
index c49dcb4..0000000
--- a/patches/dev300/scripting-mailmerge-python-binary.diff
+++ /dev/null
@@ -1,8 +0,0 @@
---- scripting/source/pyprov/mailmerge.py.old 2007-12-06 11:57:39.000000000 +0100
-+++ scripting/source/pyprov/mailmerge.py 2008-09-09 22:17:28.000000000 +0200
-@@ -1,4 +1,4 @@
--#!/bin/python
-+#!/usr/bin/python
-
- # Caolan McNamara caolanm at redhat.com
- # a simple email mailmerge component
commit 71a6c1b24866eac10465ea986088fc2512d244da
Author: Petr Mladek <pmladek at suse.cz>
Date: Mon Oct 12 19:12:14 2009 +0200
Remove obsolete buildfix-gcc-4.3-compiler-error.diff
* patches/dev300/buildfix-gcc-4.3-compiler-error.diff:
* patches/dev300/apply: should not longer been needed; gcc-4.3 was fixed
quickly after this hack was introduced
diff --git a/patches/dev300/apply b/patches/dev300/apply
index 398267d..f11f4d4 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -259,10 +259,6 @@ fix-gtk-a11y-gail-version-warning.diff, pmladek
# Update linkoo for dev300 TODO file upstream
linkoo-dev300.diff, jholesov
-# temporary compile sc/source/core/tool with -O1 with gcc-4.3 on x86_64
-# until the internal compiler error is fixed
-# buildfix-gcc-4.3-compiler-error.diff, n#370383, pmladek
-
[ TemporaryHacks ]
# Make the historically very verbose build quieter, helps us see warnings.
diff --git a/patches/dev300/buildfix-gcc-4.3-compiler-error.diff b/patches/dev300/buildfix-gcc-4.3-compiler-error.diff
deleted file mode 100644
index 39c81a5..0000000
--- a/patches/dev300/buildfix-gcc-4.3-compiler-error.diff
+++ /dev/null
@@ -1,14 +0,0 @@
---- sc/source/core/tool/makefile.mk.old 2008-03-12 15:58:49.000000000 +0100
-+++ sc/source/core/tool/makefile.mk 2008-03-12 18:37:14.000000000 +0100
-@@ -58,6 +58,11 @@ CDEFS += -DSC_INFO_OSVERSION=\"$(OS)\"
- CDEFS += -DSC_INFO_OSVERSION=$(EMQ)"$(OS)$(EMQ)"
- .ENDIF
-
-+# temporary hack to avoid internal compiler error with gcc-4.3
-+.IF "$(CPUNAME)"=="X86_64" && "$(COMID)"=="gcc3" && "$(CCNUMVER)">="000300040000"
-+CFLAGSCXX += -O1
-+.ENDIF
-+
- # --- Files --------------------------------------------------------
-
- SLOFILES = \
commit 682a5f273ee3a3c090109b45fd88f4e42fbae515
Author: Petr Mladek <pmladek at suse.cz>
Date: Tue Sep 29 20:28:42 2009 +0200
Allow to apply optional-icon-themes.diff for other distros
* patches/dev300/optional-icon-themes.diff: move the Novell Linux only
split-icons-search-usr-share.diff after this diff
* patches/dev300/split-icons-search-usr-share-and-optional-icons.diff:
keep split-icons-search-usr-share.diff as is for older distributions;
add this new diff to be applied after optional-icon-themes.diff on
openSUSE-11.2
* patches/dev300/apply: update for the above
diff --git a/patches/dev300/apply b/patches/dev300/apply
index 6723737..398267d 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -1082,12 +1082,6 @@ scp2-user-config-ooo3.diff, pmladek
# Push fonts into the ps stream always
pushfont-psstream.diff, i#84481, michael
-[ NovellOnlyUnix ]
-# search also /usr/share for icons
-# it is a temporary hack; we should do more clean FHS compliant installation
-# we need a good plan before, though ;-)
-split-icons-search-usr-share.diff, n#296502, pmladek
-
[ BrokenSystemNSS ]
# fix build with system libnss installed apart from mozilla
@@ -2139,6 +2133,18 @@ kde4-kab.diff
# show only the installed icon themes in Tools/Options.../OpenOffice.org/View
optional-icon-themes.diff, i#105062, bnc#529404, pmladek
+[ NovellOnlyUnix and OptionalIconThemes ]
+# search also /usr/share for icons
+# it is a temporary hack; we should do more clean FHS compliant installation
+# we need a good plan before, though ;-)
+split-icons-search-usr-share-and-optional-icons.diff, n#296502, pmladek
+
+[ NovellOnlyUnix and not OptionalIconThemes ]
+# search also /usr/share for icons
+# it is a temporary hack; we should do more clean FHS compliant installation
+# we need a good plan before, though ;-)
+split-icons-search-usr-share.diff, n#296502, pmladek
+
[ ArkOnly ]
SectionOwner => brosenk
diff --git a/patches/dev300/optional-icon-themes.diff b/patches/dev300/optional-icon-themes.diff
index 09de084..aba6b6e 100644
--- a/patches/dev300/optional-icon-themes.diff
+++ b/patches/dev300/optional-icon-themes.diff
@@ -82,8 +82,8 @@
}
@@ -243,6 +276,7 @@ void ImplImageTree::resetZips() {
- OSL_ASSERT(ok); (void) ok;
- addUrlToZips(u.GetMainURL(INetURLObject::NO_DECODE));
+ u.GetMainURL(INetURLObject::NO_DECODE),
+ css::uno::Reference< css::container::XNameAccess >()));
}
+ if ( m_style.equals(::rtl::OUString::createFromAscii("default")) )
{
@@ -256,9 +256,9 @@
+ typedef std::hash_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/
-@@ -79,14 +84,17 @@ private:
+ rtl::OUString m_style;
+ Zips m_zips;
+@@ -79,13 +84,16 @@ private:
rtl::OUString m_style;
Zips m_zips;
@@ -268,7 +268,6 @@
void setStyle(rtl::OUString const & style);
- void addUrlToZips(const rtl::OUString &url);
void resetZips();
- bool cacheLookup(
diff --git a/patches/dev300/split-icons-search-usr-share-and-optional-icons.diff b/patches/dev300/split-icons-search-usr-share-and-optional-icons.diff
new file mode 100644
index 0000000..a7d9be9
--- /dev/null
+++ b/patches/dev300/split-icons-search-usr-share-and-optional-icons.diff
@@ -0,0 +1,141 @@
+--- vcl/inc/vcl/impimagetree.hxx.old 2009-02-13 19:31:58.000000000 +0100
++++ vcl/inc/vcl/impimagetree.hxx 2009-02-13 19:42:39.000000000 +0100
+@@ -73,13 +73,18 @@ private:
+ typedef std::hash_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;
+ Zips m_zips;
+ CheckStyleCache m_checkStyleCache;
+ IconCache m_iconCache;
+
+ void setStyle(rtl::OUString const & style);
+
++ void addUrlToZips(const rtl::OUString &url);
+ void resetZips();
+
+ bool checkStyleCacheLookup(
+--- vcl/source/gdi/impimagetree.cxx.old 2009-02-12 14:52:12.000000000 +0100
++++ vcl/source/gdi/impimagetree.cxx 2009-02-13 19:48:54.000000000 +0100
+@@ -111,7 +111,15 @@ void loadFromStream(
+
+ }
+
+-ImplImageTree::ImplImageTree() {}
++ImplImageTree::ImplImageTree()
++{
++ m_datadir = ::rtl::OUString::createFromAscii ( "/usr/share/" );
++#ifdef X86_64
++ m_libdir = ::rtl::OUString::createFromAscii ( "/usr/lib64/" );
++#else
++ m_libdir = ::rtl::OUString::createFromAscii ( "/usr/lib/" );
++#endif
++}
+
+ ImplImageTree::~ImplImageTree() {}
+
+@@ -182,6 +190,22 @@ void ImplImageTree::setStyle(rtl::OUStri
+ }
+ }
+
++void ImplImageTree::addUrlToZips(const rtl::OUString &url) {
++ if ( url.getLength() == 0 )
++ return;
++ m_zips.push_back(
++ std::make_pair(
++ url,
++ css::uno::Reference< css::container::XNameAccess >()));
++ sal_Int32 nLibDirPos = url.indexOf( m_libdir );
++ if ( nLibDirPos >= 0 ) {
++ m_zips.push_back(
++ std::make_pair(
++ url.replaceAt( nLibDirPos, m_libdir.getLength(), m_datadir ),
++ css::uno::Reference< css::container::XNameAccess >()));
++ }
++}
++
+ void ImplImageTree::resetZips() {
+ m_zips.clear();
+ {
+@@ -196,19 +220,14 @@ void ImplImageTree::resetZips() {
+ b.appendAscii(RTL_CONSTASCII_STRINGPARAM("_brand.zip"));
+ bool ok = u.Append(b.makeStringAndClear(), INetURLObject::ENCODE_ALL);
+ OSL_ASSERT(ok); (void) ok;
+- m_zips.push_back(
+- std::make_pair(
+- u.GetMainURL(INetURLObject::NO_DECODE),
+- css::uno::Reference< css::container::XNameAccess >()));
++ addUrlToZips(u.GetMainURL(INetURLObject::NO_DECODE));
+ }
+ {
+ rtl::OUString url(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "$BRAND_BASE_DIR/share/config/images_brand.zip"));
+ rtl::Bootstrap::expandMacros(url);
+- m_zips.push_back(
+- std::make_pair(
+- url, css::uno::Reference< css::container::XNameAccess >()));
++ addUrlToZips(url);
+ }
+ {
+ rtl::OUString url(
+@@ -222,20 +241,15 @@ void ImplImageTree::resetZips() {
+ b.appendAscii(RTL_CONSTASCII_STRINGPARAM(".zip"));
+ bool ok = u.Append(b.makeStringAndClear(), INetURLObject::ENCODE_ALL);
+ OSL_ASSERT(ok); (void) ok;
+- m_zips.push_back(
+- std::make_pair(
+- u.GetMainURL(INetURLObject::NO_DECODE),
+- css::uno::Reference< css::container::XNameAccess >()));
++ addUrlToZips(u.GetMainURL(INetURLObject::NO_DECODE));
+ }
+ if ( m_style.equals(::rtl::OUString::createFromAscii("default")) )
+ {
+ rtl::OUString url(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "$OOO_BASE_DIR/share/config/images.zip"));
+ rtl::Bootstrap::expandMacros(url);
+- m_zips.push_back(
+- std::make_pair(
+- url, css::uno::Reference< css::container::XNameAccess >()));
++ addUrlToZips(url);
+ }
+ }
+
+diff --git xmlhelp/source/cxxhelp/provider/provider.cxx xmlhelp/source/cxxhelp/provider/provider.cxx
+index 6d8240e..d31fdc9 100644
+--- xmlhelp/source/cxxhelp/provider/provider.cxx
++++ xmlhelp/source/cxxhelp/provider/provider.cxx
+@@ -348,7 +348,7 @@ void ContentProvider::init()
+ setupextension );
+ rtl::OUString vendorshort = vendorname;
+
+- 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" ) );
+@@ -357,6 +357,19 @@ void ContentProvider::init()
+
+ aPath = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("$OOO_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/" );
++#ifdef 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;
+
+ uno::Reference< uno::XComponentContext > xContext;
commit 9df46bb06afc51d69bedafa456915079201771ca
Author: Petr Mladek <pmladek at suse.cz>
Date: Fri Sep 25 14:41:06 2009 +0200
unopkg-regenerate-cache should not print error on non-existing cache
* bin/unopkg-regenerate-cache: do not print error when the cache does not
exist; it might be called before the firts extension is installed
diff --git a/bin/unopkg-regenerate-cache b/bin/unopkg-regenerate-cache
index 27f5ff3..f5db7f6 100755
--- a/bin/unopkg-regenerate-cache
+++ b/bin/unopkg-regenerate-cache
@@ -23,10 +23,9 @@ shift;
OOO_BROKEN_EXTENSIONS="$*"
OOO_UNO_CACHE="$OOO_HOME/share/uno_packages/cache"
-if test ! -d "$OOO_UNO_CACHE" ; then
- echo "Error: Can't find $OOO_UNO_CACHE"
- exit 1;
-fi
+
+# nothing to do if the cache does not exist (fresh installation or so)
+test -d "$OOO_UNO_CACHE" || exit 0;
# check for broken extensions
found=
commit 4fe6dab406f21908116748e8164a58d43b95919d
Author: Petr Mladek <pmladek at suse.cz>
Date: Fri Sep 25 14:34:27 2009 +0200
Use system saxon on openSUSE-11.2 (bnc#527738, bnc#481242, bnc#473232)
* distro-configs/SUSE-11.2.conf.in:
* distro-configs/SUSE.conf.in: add --with-saxon-jar=/usr/share/java/saxon8.jar,
and --with-system-saxon; note XHTML export does not work with the default
saxon-6.5
* patches/dev300/piece-stax.diff, patches/dev300/apply: allow to use the
prebuilt jsr173_1.0_api.jar on SLED10; it can't be compiled with Java 1.4
diff --git a/distro-configs/SUSE-11.2.conf.in b/distro-configs/SUSE-11.2.conf.in
index 6c46634..5fa3d87 100644
--- a/distro-configs/SUSE-11.2.conf.in
+++ b/distro-configs/SUSE-11.2.conf.in
@@ -18,6 +18,7 @@
--with-external-thes-dir=/usr/share/ooo/thesaurus
--with-java-target-version=1.5
--with-jdk-home=$JAVA_HOME
+--with-saxon-jar=/usr/share/java/saxon8.jar
--with-system-boost
--with-system-cairo
--with-system-curl
@@ -35,6 +36,7 @@
--with-system-neon
--with-system-odbc-headers
--with-system-sablot
+--with-system-saxon
--with-system-xalan
--with-system-xerces
--with-system-xml-apis
diff --git a/distro-configs/SUSE.conf.in b/distro-configs/SUSE.conf.in
index 6c46634..5fa3d87 100644
--- a/distro-configs/SUSE.conf.in
+++ b/distro-configs/SUSE.conf.in
@@ -18,6 +18,7 @@
--with-external-thes-dir=/usr/share/ooo/thesaurus
--with-java-target-version=1.5
--with-jdk-home=$JAVA_HOME
+--with-saxon-jar=/usr/share/java/saxon8.jar
--with-system-boost
--with-system-cairo
--with-system-curl
@@ -35,6 +36,7 @@
--with-system-neon
--with-system-odbc-headers
--with-system-sablot
+--with-system-saxon
--with-system-xalan
--with-system-xerces
--with-system-xml-apis
diff --git a/patches/dev300/apply b/patches/dev300/apply
index b65dc2e..6723737 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -2937,6 +2937,7 @@ piece-cppuhelper.diff
piece-cpputools.diff
piece-connectivity.diff
piece-bridges.diff
+piece-stax.diff
piece-stoc.diff
piece-unoil.diff
piece-javaunohelper.diff
diff --git a/patches/dev300/piece-stax.diff b/patches/dev300/piece-stax.diff
new file mode 100644
index 0000000..e9a461b
--- /dev/null
+++ b/patches/dev300/piece-stax.diff
@@ -0,0 +1,12 @@
+--- stax/makefile.mk.old 2009-09-23 10:11:52.000000000 +0200
++++ stax/makefile.mk 2009-09-24 21:27:33.000000000 +0200
+@@ -55,7 +55,7 @@ EXTERNAL_DIR=$(PRJ)$/..$/external/StAX
+
+ .IF "$(BUILD_STAX)" != "YES"
+
+-$(OUT)$/class$/jsr173_1.0_api.jar : $(EXTERNAL_DIR)$/jsr173_1.0_api.jar
++$(OUT)$/class$/jsr173_1.0_api.jar : $(PRJ)$/download$/jsr173_1.0_api.jar
+ +$(COPY) $< $@
+
+ .ELSE # "$(BUILD_STAX)" != "YES"
+
commit 592cc22370efbcc172191db18340dcc186e4a850
Author: Petr Mladek <pmladek at suse.cz>
Date: Mon Sep 21 20:19:10 2009 +0200
Update Russian and Slovak autocorection (i#91304)
* src/acor_ru-RU.dat: new version provided by EGD <egd dot free at gmail
dot com>; license LGPLv3
* src/acor_sk-SK.dat: new version from (i#91304); it takes ages to push it
upstream it; Stefan Silva asked me to put into ooo-build at least
* bin/piece/install-bootstrap:
* bin/piece/unpack-extras:
* src/Makefile.am: pack and install the above files
diff --git a/bin/piece/install-bootstrap b/bin/piece/install-bootstrap
index 6b83ca4..5a707e2 100755
--- a/bin/piece/install-bootstrap
+++ b/bin/piece/install-bootstrap
@@ -40,6 +40,7 @@ cp -a \
$TOOLSDIR/src/*.jpg \
$TOOLSDIR/src/*.patch \
$TOOLSDIR/src/*.odb \
+ $TOOLSDIR/src/acor*.dat \
$TOOLSDIR/src/sg3.* \
$TOOLSDIR/src/default_images \
$TOOLSDIR/src/helpcontent2 \
diff --git a/bin/piece/unpack-extras b/bin/piece/unpack-extras
index 8baf33e..ccc442d 100755
--- a/bin/piece/unpack-extras
+++ b/bin/piece/unpack-extras
@@ -9,3 +9,11 @@ $GNUCP -f $TOOLSDIR/src/evolocal.odb $OOBUILDDIR/extras/source/database || exit
echo "Copying custom user-dicts into tree"
[ -d $OOBUILDDIR/extras/source/wordbook ] || mkdir -p $OOBUILDDIR/extras/source/wordbook
$GNUCP -f $TOOLSDIR/src/*.dic $OOBUILDDIR/extras/source/wordbook || exit 1;
+
+# new version provided by EGD <egd dot free at gmail dot com> (2009-08-06)
+echo "Copying Russian autocorrection into tree"
+$GNUCP -f $TOOLSDIR/src/acor_ru-RU.dat $OOBUILDDIR/extras/source/autotext/lang/ru || exit 1;
+
+# FIXME: remove when it goes upstream (i#91304)
+echo "Copying Slovak autocorrection into tree"
+$GNUCP -f $TOOLSDIR/src/acor_sk-SK.dat $OOBUILDDIR/extras/source/autotext/lang/sk || exit 1;
diff --git a/src/Makefile.am b/src/Makefile.am
index 9d83977..a83afad 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -4,6 +4,8 @@ EXTRA_DIST=\
default_images \
${wildcard *.dic} \
Draft.jpg \
+ acor_ru-RU.dat \
+ acor_sk-SK.dat \
banner_go-oo.bmp \
banner_nld.bmp \
cli_uno_bridge.dll.config.in \
diff --git a/src/acor_ru-RU.dat b/src/acor_ru-RU.dat
new file mode 100644
index 0000000..8c918e5
Binary files /dev/null and b/src/acor_ru-RU.dat differ
diff --git a/src/acor_sk-SK.dat b/src/acor_sk-SK.dat
new file mode 100644
index 0000000..e789333
Binary files /dev/null and b/src/acor_sk-SK.dat differ
commit 3f6cbe506758d0985a236133447e4d46ee286d70
Author: Petr Mladek <pmladek at suse.cz>
Date: Tue Sep 15 17:40:38 2009 +0200
Install the extensions MIME type icon also in the split build
* bin/piece/desktop-support-app: add support to install mimetype icons;
install extensions MIME type icon
diff --git a/bin/piece/desktop-support-app b/bin/piece/desktop-support-app
index a614579..79f2386 100755
--- a/bin/piece/desktop-support-app
+++ b/bin/piece/desktop-support-app
@@ -54,31 +54,37 @@ install_desktop_file()
install_icon()
{
- icon_name=$1
+ category=$1
+ icon_name=$2
icon_dir=/usr/share/icons/hicolor
+ # FIXME: fix the structure of icons in ooo-build/desktop direcotry
+ test "$category" = "apps" && category_indir= || category_indir=$category
+
test -n "$list_icon_dirs" && echo "%dir $icon_dir" >>files-$piece.txt
for size in 16x16 22x22 24x24 32x32 48x48 scalable ; do
# note that the scalable directory includes .svg icons
- file=$OO_TOOLSDIR/../desktop/$size/$icon_name.[ps][nv]g
+ file=$OO_TOOLSDIR/../desktop/$category_indir/$size/$icon_name.[ps][nv]g
filename=`basename $file`
- target_dir="$icon_dir/$size/apps"
+ target_dir="$icon_dir/$size/$category"
test -f $file || continue;
mkdir -p "$DESTDIR$target_dir"
cp $file "$DESTDIR$target_dir/$filename" || exit 1;
test -n "$DESTDIR" && echo "$target_dir/$filename" >>files-$piece.txt
test -n "$list_icon_dirs" && echo "%dir $icon_dir/$size" >>files-$piece.txt
- test -n "$list_icon_dirs" && echo "%dir $icon_dir/$size/apps" >>files-$piece.txt
+ test -n "$list_icon_dirs" && echo "%dir $icon_dir/$size/$category" >>files-$piece.txt
done
# create symlink below share/pixmaps to keep the backward compatibility
- file=$DESTDIR/$icon_dir/48x48/apps/$icon_name.png
- if test -f $file ; then
- filename=`basename $file`
- pixmaps_dir=/usr/share/pixmaps
- mkdir -p $DESTDIR$pixmaps_dir
- ln -sf $icon_dir/48x48/apps/$filename $DESTDIR$pixmaps_dir
- test -n "$DESTDIR" && echo "$pixmaps_dir/$filename" >>files-$piece.txt
+ if test "$category" = "apps" ; then
+ file=$DESTDIR/$icon_dir/48x48/apps/$icon_name.png
+ if test -f $file ; then
+ filename=`basename $file`
+ pixmaps_dir=/usr/share/pixmaps
+ mkdir -p $DESTDIR$pixmaps_dir
+ ln -sf $icon_dir/48x48/apps/$filename $DESTDIR$pixmaps_dir
+ test -n "$DESTDIR" && echo "$pixmaps_dir/$filename" >>files-$piece.txt
+ fi
fi
}
@@ -86,12 +92,13 @@ case "$app" in
"fromtemplate")
create_wrapper "oofromtemplate" "soffice" "" || exit 1;
install_desktop_file template || exit 1;
- install_icon ooo-gulls || exit 1;
+ install_icon apps ooo-gulls || exit 1;
;;
"unopkg")
create_wrapper unopkg unopkg "" || exit 1;
install_desktop_file ooo-extension-manager || exit 1;
install_man $app || exit 1;
+ install_icon mimetypes application-vnd.openofficeorg.extension || exit 1;
;;
"ooffice")
create_wrapper ooffice soffice "" || exit 1;
@@ -102,6 +109,6 @@ case "$app" in
create_wrapper oo$app soffice "-$app" || exit 1;
create_man_link oo${app} openoffice || exit 1;
install_desktop_file $app || exit 1;
- install_icon ooo-$app || exit 1;
+ install_icon apps ooo-$app || exit 1;
;;
esac
commit 4dca08113985b2f99d4412f7ed7c23d00c558502
Author: Petr Mladek <pmladek at suse.cz>
Date: Tue Sep 15 17:38:46 2009 +0200
Will use xulrunner-1.9.1 on openSUSE-11.2
* patches/dev300/apply: add xulrunner-1.9.1.diff also for SUSE-11.2 and SUSE
diff --git a/patches/dev300/apply b/patches/dev300/apply
index 898e534..b65dc2e 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -66,8 +66,8 @@ SUSE-10.2 : NovellBase, BerkeleyDB43, EMFPlus, Java14, OpenGLTransitionsMesa703
SUSE-10.3 : NovellBase, BerkeleyDB43, EMFPlus, Java14, GCC41
SUSE-11.0 : NovellBase, BerkeleyDB43, EMFPlus, CairoFonts, PostgreSQL
SUSE-11.1 : NovellBase, BerkeleyDB43, EMFPlus, CairoFonts, ImpressFontSize, PostgreSQL
-SUSE-11.2 : NovellBase, BerkeleyDB43, EMFPlus, CairoFonts, ImpressFontSize, PostgreSQL, OptionalIconThemes
-SUSE : NovellBase, BerkeleyDB43, EMFPlus, CairoFonts, ImpressFontSize, PostgreSQL, OptionalIconThemes
+SUSE-11.2 : NovellBase, BerkeleyDB43, EMFPlus, CairoFonts, ImpressFontSize, PostgreSQL, OptionalIconThemes, SUSE112
+SUSE : NovellBase, BerkeleyDB43, EMFPlus, CairoFonts, ImpressFontSize, PostgreSQL, OptionalIconThemes, SUSE112
SUSE-reduced:NovellBase,BerkeleyDB43, ReducedDefaults
# Slackware
Slackware : LinuxCommon, SlackwareOnly, NotDebian, Mono, msaccess, CairoFonts
@@ -2338,6 +2338,8 @@ binfilter-dont-extern-sRTF-sHTML.diff, i#86772, jholesov
# search also gij32, ..., so the 32-bit package works on 64-bit
jvmfwk-gij32.diff, n#222708, pmladek
+[ SUSE112 ]
+xulrunner-1.9.1.diff, ccheney
[ SVGImport ]
# A bit less partial implementation of SVG import
commit ba169bfd075b123111928090086dd98d651ac9c3
Author: Petr Mladek <pmladek at suse.cz>
Date: Tue Sep 15 17:33:11 2009 +0200
Branch configuration for openSUSE-11.2
* configure.in:
* distro-configs/SUSE-11.2.conf.in:
* patches/dev300/apply: add support for --with-distro=SUSE-11.2;
it is based on the current setting for the distro "SUSE"
diff --git a/configure.in b/configure.in
index ef08a19..61a07c7 100644
--- a/configure.in
+++ b/configure.in
@@ -1474,6 +1474,7 @@ distro-configs/SUSE-10.2.conf
distro-configs/SUSE-10.3.conf
distro-configs/SUSE-11.0.conf
distro-configs/SUSE-11.1.conf
+distro-configs/SUSE-11.2.conf
distro-configs/Slackware.conf
distro-configs/Mandriva.conf
distro-configs/Mandriva64.conf
diff --git a/distro-configs/SUSE-11.2.conf.in b/distro-configs/SUSE-11.2.conf.in
new file mode 100644
index 0000000..6c46634
--- /dev/null
+++ b/distro-configs/SUSE-11.2.conf.in
@@ -0,0 +1,42 @@
+--with-vendor=\"Novell, Inc.\"
+--disable-access
+--disable-odk
+--disable-qadevooo
+--enable-lockdown
+--enable-minimizer
+--enable-mono
+--enable-opengl
+--enable-ogltrans
+--enable-pdfimport
+--enable-presenter-console
+--enable-report-builder
+--enable-wiki-publisher
+--without-stlport
+--with-ant-home=/usr/share/ant
+--with-external-dict-dir=/usr/share/myspell
+--with-external-hyph-dir=/usr/share/ooo/hyphen
+--with-external-thes-dir=/usr/share/ooo/thesaurus
+--with-java-target-version=1.5
+--with-jdk-home=$JAVA_HOME
+--with-system-boost
+--with-system-cairo
+--with-system-curl
+--with-system-db
+--with-system-dicts
+--with-system-expat
+--with-system-hunspell
+--with-system-icu
+--with-system-libwpd
+--with-system-libwpg
+--with-system-libwps
+--with-system-libxslt
+--with-system-lpsolve
+--with-system-mozilla=libxul
+--with-system-neon
+--with-system-odbc-headers
+--with-system-sablot
+--with-system-xalan
+--with-system-xerces
+--with-system-xml-apis
+--with-system-xrender-headers
+--without-myspell-dicts
diff --git a/patches/dev300/apply b/patches/dev300/apply
index 75f78f7..898e534 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -66,6 +66,7 @@ SUSE-10.2 : NovellBase, BerkeleyDB43, EMFPlus, Java14, OpenGLTransitionsMesa703
SUSE-10.3 : NovellBase, BerkeleyDB43, EMFPlus, Java14, GCC41
SUSE-11.0 : NovellBase, BerkeleyDB43, EMFPlus, CairoFonts, PostgreSQL
SUSE-11.1 : NovellBase, BerkeleyDB43, EMFPlus, CairoFonts, ImpressFontSize, PostgreSQL
+SUSE-11.2 : NovellBase, BerkeleyDB43, EMFPlus, CairoFonts, ImpressFontSize, PostgreSQL, OptionalIconThemes
SUSE : NovellBase, BerkeleyDB43, EMFPlus, CairoFonts, ImpressFontSize, PostgreSQL, OptionalIconThemes
SUSE-reduced:NovellBase,BerkeleyDB43, ReducedDefaults
# Slackware
commit 4cff330d78c54e5e31dc5e59965f198c66843fba
Author: Petr Mladek <pmladek at suse.cz>
Date: Mon Sep 14 17:45:38 2009 +0200
Optional icon themes (i#105062, bnc#529404, bnc#537541)
* patches/dev300/optional-icon-themes.diff:
* patches/dev300/apply: add fallback to any installed icon theme; show only
the installed icon themes in Tools/Options.../OpenOffice.org/View
diff --git a/patches/dev300/apply b/patches/dev300/apply
index 589a6e8..75f78f7 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -18,7 +18,7 @@ Common : PreprocessPatches, BuildBits, TemporaryHacks, FixesNotForUpstream, \
OOXML, OOXMLExport, SVGImport, FrameworkFeature, UnitTesting, \
PopupRemoval, LinkWarningDlg, InternalCairo, \
FedoraCommonFixes, InternalMesaHeaders, LayoutDialogs, Fuzz, \
- CalcRowLimit, Gcc44, BuildFix
+ CalcRowLimit, Gcc44, BuildFix, OptionalIconThemes
LinuxCommon : Common, Defaults, TangoIcons, FontConfigTemporaryHacks, \
FedoraLinuxOnlyFixes, LinuxOnly, SystemBits, \
@@ -66,7 +66,7 @@ SUSE-10.2 : NovellBase, BerkeleyDB43, EMFPlus, Java14, OpenGLTransitionsMesa703
SUSE-10.3 : NovellBase, BerkeleyDB43, EMFPlus, Java14, GCC41
SUSE-11.0 : NovellBase, BerkeleyDB43, EMFPlus, CairoFonts, PostgreSQL
SUSE-11.1 : NovellBase, BerkeleyDB43, EMFPlus, CairoFonts, ImpressFontSize, PostgreSQL
-SUSE : NovellBase, BerkeleyDB43, EMFPlus, CairoFonts, ImpressFontSize, PostgreSQL
+SUSE : NovellBase, BerkeleyDB43, EMFPlus, CairoFonts, ImpressFontSize, PostgreSQL, OptionalIconThemes
SUSE-reduced:NovellBase,BerkeleyDB43, ReducedDefaults
# Slackware
Slackware : LinuxCommon, SlackwareOnly, NotDebian, Mono, msaccess, CairoFonts
@@ -2132,6 +2132,12 @@ kde4-and-kde3-shell-build.diff, jholesov
# Not yet ported to co-exist with the KDE3 stuff
kde4-kab.diff
+[ OptionalIconThemes ]
+# FIXME: seems to work well but I am not brave enough to put it into common section at this stage
+# fallback to any installed icon theme
+# show only the installed icon themes in Tools/Options.../OpenOffice.org/View
+optional-icon-themes.diff, i#105062, bnc#529404, pmladek
+
[ ArkOnly ]
SectionOwner => brosenk
diff --git a/patches/dev300/optional-icon-themes.diff b/patches/dev300/optional-icon-themes.diff
new file mode 100644
index 0000000..09de084
--- /dev/null
+++ b/patches/dev300/optional-icon-themes.diff
@@ -0,0 +1,409 @@
+--- vcl/source/gdi/impimagetree.cxx.old 2009-08-26 10:25:02.000000000 +0000
++++ vcl/source/gdi/impimagetree.cxx 2009-09-11 14:53:46.000000000 +0000
+@@ -46,6 +46,7 @@
+ #include "com/sun/star/uno/RuntimeException.hpp"
+ #include "com/sun/star/uno/Sequence.hxx"
+ #include "comphelper/processfactory.hxx"
++#include "osl/file.hxx"
+ #include "osl/diagnose.h"
+ #include "rtl/bootstrap.hxx"
+ #include "rtl/string.h"
+@@ -123,12 +124,43 @@ ImplImageTree::ImplImageTree()
+
+ ImplImageTree::~ImplImageTree() {}
+
++bool ImplImageTree::checkStyle(rtl::OUString const & style)
++{
++ bool exists;
++
++ // using cache because setStyle is an expensive operation
++ // setStyle calls resetZips => closes any opened zip files with icons, cleans the icon cache, ...
++ if (checkStyleCacheLookup(style, exists)) {
++ return exists;
++ }
++
++ setStyle(style);
++
++ exists = false;
++ const rtl::OUString sBrandURLSuffix(RTL_CONSTASCII_USTRINGPARAM("_brand.zip"));
++ for (Zips::iterator i(m_zips.begin()); i != m_zips.end() && !exists;) {
++ ::rtl::OUString aZipURL = i->first;
++ sal_Int32 nFromIndex = aZipURL.getLength() - sBrandURLSuffix.getLength();
++ // skip brand-specific icon themes; they are incomplete and thus not useful for this check
++ if (nFromIndex < 0 || !aZipURL.match(sBrandURLSuffix, nFromIndex)) {
++ osl::File aZip(aZipURL);
++ if (aZip.open(OpenFlag_Read) == ::osl::FileBase::E_None) {
++ aZip.close();
++ exists = true;
++ }
++ }
++ ++i;
++ }
++ m_checkStyleCache[style] = exists;
++ return exists;
++}
++
+ bool ImplImageTree::loadImage(
+ rtl::OUString const & name, rtl::OUString const & style, BitmapEx & bitmap,
+ bool localized)
+ {
+ setStyle(style);
+- if (cacheLookup(name, localized, bitmap)) {
++ if (iconCacheLookup(name, localized, bitmap)) {
+ return true;
+ }
+ if (!bitmap.IsEmpty()) {
+@@ -169,7 +201,7 @@ bool ImplImageTree::loadImage(
+ rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).getStr());
+ }
+ if (found) {
+- m_cache[name.intern()] = std::make_pair(localized, bitmap);
++ m_iconCache[name.intern()] = std::make_pair(localized, bitmap);
+ }
+ return found;
+ }
+@@ -178,7 +210,8 @@ void ImplImageTree::shutDown() {
+ m_style = rtl::OUString();
+ // for safety; empty m_style means "not initialized"
+ m_zips.clear();
+- m_cache.clear();
++ m_iconCache.clear();
++ m_checkStyleCache.clear();
+ }
+
+ void ImplImageTree::setStyle(rtl::OUString const & style) {
+@@ -186,7 +219,7 @@ void ImplImageTree::setStyle(rtl::OUStri
+ if (style != m_style) {
+ m_style = style;
+ resetZips();
+- m_cache.clear();
++ m_iconCache.clear();
+ }
+ }
+
+@@ -243,6 +276,7 @@ void ImplImageTree::resetZips() {
+ OSL_ASSERT(ok); (void) ok;
+ addUrlToZips(u.GetMainURL(INetURLObject::NO_DECODE));
+ }
++ if ( m_style.equals(::rtl::OUString::createFromAscii("default")) )
+ {
+ rtl::OUString url(
+ RTL_CONSTASCII_USTRINGPARAM(
+@@ -252,11 +286,23 @@ void ImplImageTree::resetZips() {
+ }
+ }
+
+-bool ImplImageTree::cacheLookup(
++bool ImplImageTree::checkStyleCacheLookup(
++ rtl::OUString const & style, bool &exists)
++{
++ CheckStyleCache::iterator i(m_checkStyleCache.find(style));
++ if (i != m_checkStyleCache.end()) {
++ exists = i->second;
++ return true;
++ } else {
++ return false;
++ }
++}
++
++bool ImplImageTree::iconCacheLookup(
+ rtl::OUString const & name, bool localized, BitmapEx & bitmap)
+ {
+- Cache::iterator i(m_cache.find(name));
+- if (i != m_cache.end() && i->second.first == localized) {
++ IconCache::iterator i(m_iconCache.find(name));
++ if (i != m_iconCache.end() && i->second.first == localized) {
+ bitmap = i->second.second;
+ return true;
+ } else {
+--- vcl/source/app/settings.cxx.old 2009-08-26 10:25:12.000000000 +0000
++++ vcl/source/app/settings.cxx 2009-09-11 15:12:56.000000000 +0000
+@@ -41,6 +41,8 @@
+ #include "vcl/configsettings.hxx"
+ #include "vcl/gradient.hxx"
+ #include "vcl/unohelp.hxx"
++#include "vcl/bitmapex.hxx"
++#include "vcl/impimagetree.hxx"
+ #include "unotools/localedatawrapper.hxx"
+ #include "unotools/collatorwrapper.hxx"
+ #include "unotools/configmgr.hxx"
+@@ -770,12 +772,12 @@ ULONG StyleSettings::GetCurrentSymbolsSt
+ // style selected in Tools -> Options... -> OpenOffice.org -> View
+ ULONG nStyle = GetSymbolsStyle();
+
+- if ( nStyle == STYLE_SYMBOLS_AUTO )
++ if ( nStyle == STYLE_SYMBOLS_AUTO || ( !CheckSymbolStyle (nStyle) ) )
+ {
+ // the preferred style can be read from the desktop setting by the desktop native widgets modules
+ ULONG nPreferredStyle = GetPreferredSymbolsStyle();
+
+- if ( nPreferredStyle == STYLE_SYMBOLS_AUTO )
++ if ( nPreferredStyle == STYLE_SYMBOLS_AUTO || ( !CheckSymbolStyle (nPreferredStyle) ) )
+ {
+
+ // use a hardcoded desktop-specific fallback if no preferred style has been detected
+@@ -784,14 +786,17 @@ ULONG StyleSettings::GetCurrentSymbolsSt
+
+ if ( !sbFallbackDesktopChecked )
+ {
+- snFallbackDesktopStyle = GetAutoSymbolsStyle();
++ snFallbackDesktopStyle = GetAutoSymbolsStyle();
+ sbFallbackDesktopChecked = true;
+ }
+
+ nPreferredStyle = snFallbackDesktopStyle;
+ }
+
+- nStyle = GetHighContrastMode()? STYLE_SYMBOLS_HICONTRAST: nPreferredStyle;
++ if (GetHighContrastMode() && CheckSymbolStyle (STYLE_SYMBOLS_HICONTRAST) )
++ nStyle = STYLE_SYMBOLS_HICONTRAST;
++ else
++ nStyle = nPreferredStyle;
+ }
+
+ return nStyle;
+@@ -830,10 +835,43 @@ ULONG StyleSettings::GetAutoSymbolsStyle
+ nRet = STYLE_SYMBOLS_OXYGEN;
+ }
+
++ // falback to any existing style
++ if ( ! CheckSymbolStyle (nRet) )
++ {
++ for ( ULONG n = 0 ; n <= STYLE_SYMBOLS_THEMES_MAX ; n++ )
++ {
++ ULONG nStyleToCheck = n;
++
++ // auto is not a real theme => can't be fallback
++ if ( nStyleToCheck == STYLE_SYMBOLS_AUTO )
++ continue;
++
++ // will check hicontrast in the end
++ if ( nStyleToCheck == STYLE_SYMBOLS_HICONTRAST )
++ continue;
++ if ( nStyleToCheck == STYLE_SYMBOLS_THEMES_MAX )
++ nStyleToCheck = STYLE_SYMBOLS_HICONTRAST;
++
++ if ( CheckSymbolStyle ( nStyleToCheck ) )
++ {
++ nRet = nStyleToCheck;
++ n = STYLE_SYMBOLS_THEMES_MAX;
++ }
++ }
++ }
++
+ return nRet;
+ }
+
+ // -----------------------------------------------------------------------
++
++bool StyleSettings::CheckSymbolStyle( ULONG nStyle ) const
++{
++ static ImplImageTreeSingletonRef aImageTree;
++ return aImageTree->checkStyle( ImplSymbolsStyleToName( nStyle ) );
++}
++
++// -----------------------------------------------------------------------
+
+ void StyleSettings::SetStandardStyles()
+ {
+--- vcl/inc/vcl/settings.hxx.old 2009-08-26 10:25:12.000000000 +0000
++++ vcl/inc/vcl/settings.hxx 2009-09-10 15:27:10.000000000 +0000
+@@ -520,7 +520,7 @@ private:
+ #define STYLE_SYMBOLS_TANGO ((ULONG)5)
+ #define STYLE_SYMBOLS_CLASSIC ((ULONG)6)
+ #define STYLE_SYMBOLS_OXYGEN ((ULONG)7)
+-#define STYLE_SYMBOLS_THEMES_MAX ((ULONG)7)
++#define STYLE_SYMBOLS_THEMES_MAX ((ULONG)8)
+
+ #define STYLE_CURSOR_NOBLINKTIME ((ULONG)0xFFFFFFFF)
+
+@@ -944,6 +944,8 @@ public:
+ void SetPreferredSymbolsStyleName( const ::rtl::OUString &rName );
+ ULONG GetPreferredSymbolsStyle() const
+ { return mpData->mnPreferredSymbolsStyle; }
++ // check whether the symbols style is supported (icons are installed)
++ bool CheckSymbolStyle( ULONG nStyle ) const;
+ ULONG GetAutoSymbolsStyle() const;
+
+ ULONG GetCurrentSymbolsStyle() const;
+--- vcl/inc/vcl/impimagetree.hxx.old 2009-08-26 10:25:02.000000000 +0000
++++ vcl/inc/vcl/impimagetree.hxx 2009-09-11 14:53:11.000000000 +0000
+@@ -54,6 +54,9 @@ public:
+
+ ~ImplImageTree();
+
++ // check whether the icon style is installed
++ bool checkStyle(rtl::OUString const & style);
++
+ bool loadImage(
+ rtl::OUString const & name, rtl::OUString const & style,
+ BitmapEx & bitmap, bool localized = false);
+@@ -61,7 +64,7 @@ public:
+ void shutDown();
+ // a crude form of life cycle control (called from DeInitVCL; otherwise,
+ // if the ImplImageTree singleton were destroyed during exit that would
+- // be too late for the destructors of the bitmaps in m_cache)
++ // be too late for the destructors of the bitmaps in m_iconCache)
+
+ private:
+ typedef std::list<
+@@ -71,7 +74,9 @@ private:
+ com::sun::star::container::XNameAccess > > > Zips;
+
+ typedef std::hash_map<
+- rtl::OUString, std::pair< bool, BitmapEx >, rtl::OUStringHash > Cache;
++ rtl::OUString, bool, rtl::OUStringHash > CheckStyleCache;
++ typedef std::hash_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/
+@@ -79,14 +84,17 @@ private:
+
+ rtl::OUString m_style;
+ Zips m_zips;
+- Cache m_cache;
++ CheckStyleCache m_checkStyleCache;
++ IconCache m_iconCache;
+
+ void setStyle(rtl::OUString const & style);
+
+ void addUrlToZips(const rtl::OUString &url);
+ void resetZips();
+
+- bool cacheLookup(
++ bool checkStyleCacheLookup(
++ rtl::OUString const & style, bool &exists);
++ bool iconCacheLookup(
+ rtl::OUString const & name, bool localized, BitmapEx & bitmap);
+
+ bool find(std::vector< rtl::OUString > const & paths, BitmapEx & bitmap);
+--- svx/source/cui/optgdlg.cxx.old 2009-08-26 10:25:14.000000000 +0000
++++ svx/source/cui/optgdlg.cxx 2009-09-11 15:20:42.000000000 +0000
+@@ -802,6 +802,31 @@ OfaViewTabPage::OfaViewTabPage(Window* p
+ m_aSystemFont.Enable( FALSE );
+ }
+
++ const StyleSettings& aStyleSettings = Application::GetSettings().GetStyleSettings();
++
++ // remove non-installed icon themes
++ if( aIconStyleLB.GetEntryCount() == STYLE_SYMBOLS_THEMES_MAX )
++ {
++ // do not check 0th item == auto; it is not a real theme
++ aIconStyleItemId[0] = 0;
++ ULONG nItem = 1;
++ for ( ULONG n=0; ++n < STYLE_SYMBOLS_THEMES_MAX; )
++ {
++ if ( aStyleSettings.CheckSymbolStyle( n ) )
++ {
++ // existing style => save the item id
++ aIconStyleItemId[n] = nItem++;
++ }
++ else
++ {
++ // non-existing style => remove item;
++ aIconStyleLB.RemoveEntry( nItem );
++ aIconStyleItemId[n] = 0;
++ }
++ }
++
++ }
++
+ // add real theme name to 'auto' theme, e.g. 'auto' => 'auto (classic)'
+ if( aIconStyleLB.GetEntryCount() > 1 )
+ {
+@@ -809,20 +834,14 @@ OfaViewTabPage::OfaViewTabPage(Window* p
+
+ aAutoStr += ::rtl::OUString::createFromAscii( " (" );
+
+- switch( Application::GetSettings().GetStyleSettings().GetAutoSymbolsStyle() )
+- {
+- case STYLE_SYMBOLS_DEFAULT: aAutoStr += aIconStyleLB.GetEntry( 1 ); break;
+- case STYLE_SYMBOLS_INDUSTRIAL: aAutoStr += aIconStyleLB.GetEntry( 2 ); break;
+- case STYLE_SYMBOLS_CRYSTAL: aAutoStr += aIconStyleLB.GetEntry( 3 ); break;
+- case STYLE_SYMBOLS_TANGO: aAutoStr += aIconStyleLB.GetEntry( 4 ); break;
+- case STYLE_SYMBOLS_CLASSIC: aAutoStr += aIconStyleLB.GetEntry( 5 ); break;
+- case STYLE_SYMBOLS_HICONTRAST: aAutoStr += aIconStyleLB.GetEntry( 6 ); break;
+- case STYLE_SYMBOLS_OXYGEN: aAutoStr += aIconStyleLB.GetEntry( 7 ); break;
+- }
++ ULONG nAutoStyle = aStyleSettings.GetAutoSymbolsStyle();
++ if ( aIconStyleItemId[nAutoStyle] )
++ aAutoStr += aIconStyleLB.GetEntry( aIconStyleItemId[nAutoStyle] );
+
+ aIconStyleLB.RemoveEntry( 0 );
+ aIconStyleLB.InsertEntry( aAutoStr += ::rtl::OUString::createFromAscii( ")" ), 0 );
+- aIconStyleLB.SetSeparatorPos( aIconStyleLB.GetEntryCount() - 2 );
++ // separate auto and other icon themes
++ aIconStyleLB.SetSeparatorPos( 0 );
+ }
+ }
+
+@@ -891,26 +910,18 @@ BOOL OfaViewTabPage::FillItemSet( SfxIte
+ UINT16 nStyleLB_NewSelection = aIconStyleLB.GetSelectEntryPos();
+ if( nStyleLB_InitialSelection != nStyleLB_NewSelection )
+ {
+- sal_Int16 eSet = SFX_SYMBOLS_STYLE_AUTO;
+- switch( nStyleLB_NewSelection )
+- {
+- case 0: eSet = SFX_SYMBOLS_STYLE_AUTO; break;
+- case 1: eSet = SFX_SYMBOLS_STYLE_DEFAULT; break;
+- case 2: eSet = SFX_SYMBOLS_STYLE_HICONTRAST; break;
+- case 3: eSet = SFX_SYMBOLS_STYLE_INDUSTRIAL; break;
+- case 4: eSet = SFX_SYMBOLS_STYLE_CRYSTAL; break;
+- case 5: eSet = SFX_SYMBOLS_STYLE_TANGO; break;
+- case 6: eSet = SFX_SYMBOLS_STYLE_CLASSIC; break;
+- case 7: eSet = SFX_SYMBOLS_STYLE_OXYGEN; break;
+- default:
+- DBG_ERROR( "OfaViewTabPage::FillItemSet(): This state of aIconStyleLB should not be possible!" );
+- }
+- aMiscOptions.SetSymbolsStyle( eSet );
++ // find the style name in the aIconStyleItemId table
++ // items from the non-installed icon themes were removed
++ for ( ULONG n=0; n < STYLE_SYMBOLS_THEMES_MAX; n++ )
++ if ( aIconStyleItemId[n] == nStyleLB_NewSelection )
++ {
++ aMiscOptions.SetSymbolsStyle( n );
++ n = STYLE_SYMBOLS_THEMES_MAX;
++ }
+ }
+
+ BOOL bAppearanceChanged = FALSE;
+
+-
+ // Screen Scaling
+ UINT16 nOldScale = pAppearanceCfg->GetScaleFactor();
+ UINT16 nNewScale = (UINT16)aWindowSizeMF.GetValue();
+@@ -1052,20 +1063,7 @@ void OfaViewTabPage::Reset( const SfxIte
+ aIconSizeLB.SaveValue();
+
+ if( aMiscOptions.GetSymbolsStyle() != SFX_SYMBOLS_STYLE_AUTO )
+- {
+- switch ( aMiscOptions.GetCurrentSymbolsStyle() )
+- {
+- case SFX_SYMBOLS_STYLE_DEFAULT: nStyleLB_InitialSelection = 1; break;
+- case SFX_SYMBOLS_STYLE_HICONTRAST: nStyleLB_InitialSelection = 2; break;
+- case SFX_SYMBOLS_STYLE_INDUSTRIAL: nStyleLB_InitialSelection = 3; break;
+- case SFX_SYMBOLS_STYLE_CRYSTAL: nStyleLB_InitialSelection = 4; break;
+- case SFX_SYMBOLS_STYLE_TANGO: nStyleLB_InitialSelection = 5; break;
+- case SFX_SYMBOLS_STYLE_CLASSIC: nStyleLB_InitialSelection = 6; break;
+- case SFX_SYMBOLS_STYLE_OXYGEN: nStyleLB_InitialSelection = 7; break;
+- default: nStyleLB_InitialSelection = 0; break;
+- }
+- }
+-
++ nStyleLB_InitialSelection = aIconStyleItemId[aMiscOptions.GetCurrentSymbolsStyle()];
+ aIconStyleLB.SelectEntryPos( nStyleLB_InitialSelection );
+ aIconStyleLB.SaveValue();
+
+--- svx/source/cui/optgdlg.hxx.old 2009-08-26 10:25:14.000000000 +0000
++++ svx/source/cui/optgdlg.hxx 2009-09-09 15:40:36.000000000 +0000
+@@ -136,6 +136,9 @@ private:
+ UINT16 nStyleLB_InitialSelection;
+ BOOL bSfxSymbolsAuto;
+
++ // item ID for the given icon theme
++ // might be zero when the theme is not installed and the item is removed
++ ULONG aIconStyleItemId[STYLE_SYMBOLS_THEMES_MAX];
+ SvtTabAppearanceCfg* pAppearanceCfg;
+ CanvasSettings* pCanvasSettings;
+ SvtOptionsDrawinglayer* mpDrawinglayerOpt;
More information about the ooo-build-commit
mailing list