[Libreoffice-commits] .: unotools/source

2012-04-20 Thread Stephan Bergmann
 unotools/source/config/historyoptions.cxx |   38 ++
 1 file changed, 28 insertions(+), 10 deletions(-)

New commits:
commit 4ccb4bda483eb548eb6efb5e2f1952f094522320
Author: Stephan Bergmann sberg...@redhat.com
Date:   Fri Apr 20 09:21:42 2012 +0200

fdo#46074 Ignore corrupted items in Recent Documents

diff --git a/unotools/source/config/historyoptions.cxx 
b/unotools/source/config/historyoptions.cxx
index 2045074..8ee53cc 100644
--- a/unotools/source/config/historyoptions.cxx
+++ b/unotools/source/config/historyoptions.cxx
@@ -33,6 +33,7 @@
 #include com/sun/star/uno/Any.hxx
 #include com/sun/star/uno/Sequence.hxx
 
+#include cassert
 #include deque
 #include algorithm
 
@@ -391,20 +392,37 @@ Sequence Sequence PropertyValue   
SvtHistoryOptions_Impl::GetList( EHistoryT
 
 const sal_Int32 nLength = 
xOrderList-getElementNames().getLength();
 Sequence Sequence PropertyValue   aRet(nLength);
+sal_Int32 nCount = 0;
 
 for(sal_Int32 nItem=0; nItemnLength; ++nItem)
 {
-::rtl::OUString sUrl;
-xOrderList-getByName(::rtl::OUString::valueOf(nItem)) = 
xSet;
-xSet-getPropertyValue(rtl::OUString(s_sHistoryItemRef)) = 
sUrl;
-
-xItemList-getByName(sUrl) = xSet;
-seqProperties[s_nOffsetURL  ].Value = sUrl;
-xSet-getPropertyValue(rtl::OUString(s_sFilter))   = 
seqProperties[s_nOffsetFilter   ].Value;
-xSet-getPropertyValue(rtl::OUString(s_sTitle))= 
seqProperties[s_nOffsetTitle].Value;
-xSet-getPropertyValue(rtl::OUString(s_sPassword)) = 
seqProperties[s_nOffsetPassword ].Value;
-aRet[nItem] = seqProperties;
+try
+{
+::rtl::OUString sUrl;
+xOrderList-getByName(::rtl::OUString::valueOf(nItem)) = 
xSet;
+xSet-getPropertyValue(rtl::OUString(s_sHistoryItemRef)) 
= sUrl;
+
+xItemList-getByName(sUrl) = xSet;
+seqProperties[s_nOffsetURL  ].Value = sUrl;
+xSet-getPropertyValue(rtl::OUString(s_sFilter))   = 
seqProperties[s_nOffsetFilter   ].Value;
+xSet-getPropertyValue(rtl::OUString(s_sTitle))= 
seqProperties[s_nOffsetTitle].Value;
+xSet-getPropertyValue(rtl::OUString(s_sPassword)) = 
seqProperties[s_nOffsetPassword ].Value;
+aRet[nCount++] = seqProperties;
+}
+catch(const css::uno::Exception ex)
+{
+// https://bugs.freedesktop.org/show_bug.cgi?id=46074
+// FILEOPEN: No Recent Documents... discusses a problem
+// with corrupted 
/org.openoffice.Office/Histories/Histories
+// configuration items; to work around that problem, simply
+// ignore such corrupted individual items here, so that at
+// least newly added items are successfully reported back
+// from this function:
+LogHelper::logIt(ex);
+}
 }
+assert(nCount = nLength);
+aRet.realloc(nCount);
 seqReturn = aRet;
 }
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: unotools/source

2012-02-29 Thread Tor Lillqvist
 unotools/source/ucbhelper/ucblockbytes.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ebe26f72e90337da2d14f3029de148904e3e30b6
Author: Tor Lillqvist t...@iki.fi
Date:   Thu Mar 1 01:55:01 2012 +0200

WaE: 'unused' attribute ignored when parsing type

diff --git a/unotools/source/ucbhelper/ucblockbytes.cxx 
b/unotools/source/ucbhelper/ucblockbytes.cxx
index 816703a..49566c3 100644
--- a/unotools/source/ucbhelper/ucblockbytes.cxx
+++ b/unotools/source/ucbhelper/ucblockbytes.cxx
@@ -1591,7 +1591,7 @@ void UcbLockBytes::Cancel()
 }
 
 //
-IMPL_LINK( UcbLockBytes, DataAvailHdl, SAL_UNUSED_PARAMETER void*, EMPTYARG )
+IMPL_LINK( UcbLockBytes, DataAvailHdl, void*, EMPTYARG )
 {
 if ( hasInputStream_Impl()  m_xHandler.Is() )
 m_xHandler-Handle( UcbLockBytesHandler::DATA_AVAILABLE, this );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: unotools/source

2011-11-21 Thread Caolán McNamara
 unotools/source/ucbhelper/tempfile.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit c6560c6f07f7f71842d7314157feaca2fa4a03c9
Author: Caolán McNamara caol...@redhat.com
Date:   Mon Nov 21 12:56:43 2011 +

Resolves fdo#41295 tmp name reuse in mass pdf export

diff --git a/unotools/source/ucbhelper/tempfile.cxx 
b/unotools/source/ucbhelper/tempfile.cxx
index d157bab..6728c80 100644
--- a/unotools/source/ucbhelper/tempfile.cxx
+++ b/unotools/source/ucbhelper/tempfile.cxx
@@ -206,8 +206,8 @@ void CreateTempName_Impl( String rName, sal_Bool bKeep, 
sal_Bool bDir = sal_Tru
 aName += String::CreateFromAscii( lu );
 
 rName.Erase();
-unsigned long nSeed = Time::GetSystemTicks() % nMax;
-for ( unsigned long u = nSeed; ++u != nSeed; )
+static unsigned long u = Time::GetSystemTicks() % nMax;
+for ( unsigned long nSeed = u; ++u != nSeed; )
 {
 u %= nMax;
 String aTmp( aName );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: unotools/source

2011-09-27 Thread Michael Meeks
 unotools/source/config/pathoptions.cxx |   33 +
 1 file changed, 9 insertions(+), 24 deletions(-)

New commits:
commit baa36ed2f1f35f311e11aa630ea16e969f841303
Author: Michael Meeks michael.me...@suse.com
Date:   Tue Sep 27 14:44:54 2011 +0100

remove obsolete and unused defines

diff --git a/unotools/source/config/pathoptions.cxx 
b/unotools/source/config/pathoptions.cxx
index 7bfbf48..b760576 100644
--- a/unotools/source/config/pathoptions.cxx
+++ b/unotools/source/config/pathoptions.cxx
@@ -70,32 +70,17 @@ using ::rtl::OUString;
 using ::rtl::OString;
 using ::rtl::OStringToOUString;
 
-// define 
-
-#define SEARCHPATH_DELIMITER';'
-
-#define ASCII_STR(s)OUString( 
RTL_CONSTASCII_USTRINGPARAM(s) )
-
-#define SIGN_STARTVARIABLE  ASCII_STR($()
-#define SIGN_ENDVARIABLEASCII_STR())
+#define SEARCHPATH_DELIMITER  ';'
+#define SIGN_STARTVARIABLEOUString( RTL_CONSTASCII_USTRINGPARAM( $( ) )
+#define SIGN_ENDVARIABLE  OUString( RTL_CONSTASCII_USTRINGPARAM( ) ) )
 
 // Supported variables by the old SvtPathOptions implementation
-#define SUBSTITUTE_INST $(inst)
-#define SUBSTITUTE_PROG $(prog)
-#define SUBSTITUTE_USER $(user)
-#define SUBSTITUTE_INSTPATH $(instpath)
-#define SUBSTITUTE_PROGPATH $(progpath)
-#define SUBSTITUTE_USERPATH $(userpath)
-#define SUBSTITUTE_INSTURL  $(insturl)
-#define SUBSTITUTE_PROGURL  $(progurl)
-#define SUBSTITUTE_USERURL  $(userurl)
-#define SUBSTITUTE_PATH $(path)
-//#define   SUBSTITUTE_LANG $(lang)
-#define SUBSTITUTE_LANGID   $(langid)
-#define SUBSTITUTE_VLANG$(vlang)
-#define SUBSTITUTE_WORKDIRURL   $(workdirurl)
-
-#define STRPOS_NOTFOUND -1
+#define SUBSTITUTE_INSTPATH   $(instpath)
+#define SUBSTITUTE_PROGPATH   $(progpath)
+#define SUBSTITUTE_USERPATH   $(userpath)
+#define SUBSTITUTE_PATH   $(path)
+
+#define STRPOS_NOTFOUND   -1
 
 struct OUStringHashCode
 {
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits