[Libreoffice-commits] core.git: include/osl

2017-05-26 Thread Chris Sherlock
 include/osl/file.h |  150 +
 1 file changed, 62 insertions(+), 88 deletions(-)

New commits:
commit 998325386625823d0368df42ac848d8cfbb5568b
Author: Chris Sherlock 
Date:   Fri May 26 01:31:37 2017 +1000

osl: file.h comments clarification and minor formatting cleanup

Change-Id: I1011665787ccec2500efc4492a9f19e53de3bf12
Reviewed-on: https://gerrit.libreoffice.org/38033
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/include/osl/file.h b/include/osl/file.h
index 44ce6a13dc5b..73349572063c 100644
--- a/include/osl/file.h
+++ b/include/osl/file.h
@@ -81,9 +81,7 @@ seconds (!!!).
 
 */
 
-
 /* Error codes according to errno */
-
 typedef enum {
 osl_File_E_None,/*!< on success
  */
 osl_File_E_PERM,/*!< operation not permitted   
  */
@@ -139,7 +137,6 @@ typedef enum {
 typedef void *oslDirectory;
 typedef void *oslDirectoryItem;
 
-
 /** Open a directory for enumerating its contents.
 
 @param  pustrDirectoryURL [in]
@@ -163,11 +160,9 @@ typedef void *oslDirectoryItem;
 @see osl_getNextDirectoryItem()
 @see osl_closeDirectory()
 */
-
 SAL_DLLPUBLIC oslFileError SAL_CALL osl_openDirectory(
 rtl_uString *pustrDirectoryURL, oslDirectory *pDirectory);
 
-
 /** Retrieve the next item of a previously opened directory.
 
 Retrieves the next item of a previously opened directory.
@@ -197,14 +192,12 @@ SAL_DLLPUBLIC oslFileError SAL_CALL osl_openDirectory(
 @see osl_getDirectoryItem()
 @see osl_getFileStatus()
 */
-
 SAL_DLLPUBLIC oslFileError SAL_CALL osl_getNextDirectoryItem(
 oslDirectory Directory,
 oslDirectoryItem *pItem,
 sal_uInt32   uHint
 );
 
-
 /** Release a directory handle.
 
 @param Directory [in]
@@ -218,11 +211,9 @@ SAL_DLLPUBLIC oslFileError SAL_CALL 
osl_getNextDirectoryItem(
 
 @see osl_openDirectory()
 */
-
 SAL_DLLPUBLIC oslFileError SAL_CALL osl_closeDirectory(
 oslDirectory Directory);
 
-
 /** Retrieve a single directory item.
 
 Retrieves a single directory item. The returned handle has an initial 
refcount of 1.
@@ -257,13 +248,11 @@ SAL_DLLPUBLIC oslFileError SAL_CALL osl_closeDirectory(
 @see osl_getFileStatus()
 @see osl_getNextDirectoryItem()
 */
-
 SAL_DLLPUBLIC oslFileError SAL_CALL osl_getDirectoryItem(
 rtl_uString *pustrFileURL,
 oslDirectoryItem *pItem
 );
 
-
 /** Increase the refcount of a directory item handle.
 
 The caller responsible for releasing the directory item handle using 
osl_releaseDirectoryItem().
@@ -279,7 +268,6 @@ SAL_DLLPUBLIC oslFileError SAL_CALL osl_getDirectoryItem(
 @see osl_getNextDirectoryItem()
 @see osl_releaseDirectoryItem()
 */
-
 SAL_DLLPUBLIC oslFileError SAL_CALL osl_acquireDirectoryItem(
 oslDirectoryItem Item );
 
@@ -301,7 +289,6 @@ SAL_DLLPUBLIC oslFileError SAL_CALL 
osl_acquireDirectoryItem(
 @see osl_getNextDirectoryItem()
 @see osl_acquireDirectoryItem()
 */
-
 SAL_DLLPUBLIC oslFileError SAL_CALL osl_releaseDirectoryItem(
 oslDirectoryItem Item );
 
@@ -323,13 +310,11 @@ SAL_DLLPUBLIC oslFileError SAL_CALL 
osl_releaseDirectoryItem(
 
 @since LibreOffice 3.6
 */
-
 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_identicalDirectoryItem(
 oslDirectoryItem pItemA,
 oslDirectoryItem pItemB );
 
 /* File types */
-
 typedef enum {
 osl_File_Type_Directory,
 osl_File_Type_Volume,
@@ -369,16 +354,12 @@ typedef enum {
 #define osl_FileStatus_Mask_All 0x7FFF
 #define osl_FileStatus_Mask_Validate0x8000
 
-
-typedef
-
 /** Structure containing information about files and directories
 
 @seeosl_getFileStatus()
 @seeoslFileType
 */
-
-struct _oslFileStatus {
+typedef struct _oslFileStatus {
 /** Must be initialized with the size in bytes of the structure before passing 
it to any function */
 sal_uInt32  uStructSize;
 /** Determines which members of the structure contain valid data */
@@ -409,7 +390,6 @@ struct _oslFileStatus {
 rtl_uString *ustrLinkTargetURL;
 } oslFileStatus;
 
-
 /** Retrieve information about a single file or directory.
 
 @param  Item [in]
@@ -447,11 +427,9 @@ struct _oslFileStatus {
 @see osl_getNextDirectoryItem()
 @see oslFileStatus
 */
-
 SAL_DLLPUBLIC oslFileError SAL_CALL osl_getFileStatus(
 oslDirectoryItem Item, oslFileStatus *pStatus, sal_uInt32 uFieldMask );
 
-
 typedef void *oslVolumeDeviceHandle;
 
 /** Release a volume device handle.
@@ -471,7 +449,6 @@ typedef void *oslVolumeDeviceHandle;
 @see osl_acquireVolumeDeviceHandle()
 @see osl_getVolumeInformation()
 */
-
 SAL_DLLPUBLIC oslFileError SAL_CALL osl_releaseVolumeDeviceHandle(
 oslVolumeDeviceHandle Handle );
 
@@ -492,11 +469,9 @@ SAL_DLLPUBLIC oslFileError SA

[Libreoffice-commits] core.git: registry/source

2017-05-26 Thread Chris Sherlock
 registry/source/regimpl.hxx |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 5628195324941e29af1713ca3dd60bfcdc7a1ad8
Author: Chris Sherlock 
Date:   Sat May 27 00:10:52 2017 +1000

registry: fix indenting caused by automated namespace scripts, etc.

Change-Id: Ia14ebebafe957891f8a3f0b1bf8519e906211ef8
Reviewed-on: https://gerrit.libreoffice.org/38076
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/registry/source/regimpl.hxx b/registry/source/regimpl.hxx
index 8d9ed6185d91..4e96a8818747 100644
--- a/registry/source/regimpl.hxx
+++ b/registry/source/regimpl.hxx
@@ -137,13 +137,13 @@ private:
 
 typedef std::unordered_map< OUString, ORegKey*, OUStringHash > KeyMap;
 
-sal_uInt32  m_refCount;
+sal_uInt32  m_refCount;
 osl::Mutex  m_mutex;
-boolm_readOnly;
-boolm_isOpen;
-OUString   m_name;
+boolm_readOnly;
+boolm_isOpen;
+OUStringm_name;
 store::OStoreFile   m_file;
-KeyMap  m_openKeyTable;
+KeyMap  m_openKeyTable;
 
 const OUString ROOT;
 };
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: registry/source

2017-05-26 Thread Chris Sherlock
 registry/source/regimpl.cxx |   64 
 1 file changed, 64 deletions(-)

New commits:
commit 56824276de139cb5ed8b5f6d115724712a8ca4ef
Author: Chris Sherlock 
Date:   Fri May 26 22:20:56 2017 +1000

registry: remove comment cruft from regimpl.cxx

Change-Id: Ic728b6d975cfaf59c5d28c5587c488a245b4c961
Reviewed-on: https://gerrit.libreoffice.org/38068
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/registry/source/regimpl.cxx b/registry/source/regimpl.cxx
index a9ee6289d844..21a15d4c9f69 100644
--- a/registry/source/regimpl.cxx
+++ b/registry/source/regimpl.cxx
@@ -421,9 +421,6 @@ void dumpType(typereg::Reader const & reader, OString const 
& indent) {
 
 }
 
-
-//  ORegistry()
-
 ORegistry::ORegistry()
 : m_refCount(1)
 , m_readOnly(false)
@@ -432,9 +429,6 @@ ORegistry::ORegistry()
 {
 }
 
-
-//  ~ORegistry()
-
 ORegistry::~ORegistry()
 {
 ORegKey* pRootKey = m_openKeyTable[ROOT];
@@ -445,9 +439,6 @@ ORegistry::~ORegistry()
 m_file.close();
 }
 
-
-//  initRegistry
-
 RegError ORegistry::initRegistry(const OUString& regName, RegAccessMode 
accessMode, bool bCreate)
 {
 RegError eRet = RegError::INVALID_REGISTRY;
@@ -511,9 +502,6 @@ RegError ORegistry::initRegistry(const OUString& regName, 
RegAccessMode accessMo
 return eRet;
 }
 
-
-//  closeRegistry
-
 RegError ORegistry::closeRegistry()
 {
 REG_GUARD(m_mutex);
@@ -530,9 +518,6 @@ RegError ORegistry::closeRegistry()
 }
 }
 
-
-//  destroyRegistry
-
 RegError ORegistry::destroyRegistry(const OUString& regName)
 {
 REG_GUARD(m_mutex);
@@ -592,9 +577,6 @@ RegError ORegistry::destroyRegistry(const OUString& regName)
 return RegError::NO_ERROR;
 }
 
-
-//  acquireKey
-
 RegError ORegistry::acquireKey (RegKeyHandle hKey)
 {
 ORegKey* pKey = static_cast< ORegKey* >(hKey);
@@ -607,9 +589,6 @@ RegError ORegistry::acquireKey (RegKeyHandle hKey)
 return RegError::NO_ERROR;
 }
 
-
-//  releaseKey
-
 RegError ORegistry::releaseKey (RegKeyHandle hKey)
 {
 ORegKey* pKey = static_cast< ORegKey* >(hKey);
@@ -625,9 +604,6 @@ RegError ORegistry::releaseKey (RegKeyHandle hKey)
 return RegError::NO_ERROR;
 }
 
-
-//  createKey
-
 RegError ORegistry::createKey(RegKeyHandle hKey, const OUString& keyName,
   RegKeyHandle* phNewKey)
 {
@@ -685,9 +661,6 @@ RegError ORegistry::createKey(RegKeyHandle hKey, const 
OUString& keyName,
 return RegError::NO_ERROR;
 }
 
-
-//  openKey
-
 RegError ORegistry::openKey(RegKeyHandle hKey, const OUString& keyName,
 RegKeyHandle* phOpenKey)
 {
@@ -733,9 +706,6 @@ RegError ORegistry::openKey(RegKeyHandle hKey, const 
OUString& keyName,
 return RegError::NO_ERROR;
 }
 
-
-//  closeKey
-
 RegError ORegistry::closeKey(RegKeyHandle hKey)
 {
 ORegKey* pKey = static_cast< ORegKey* >(hKey);
@@ -766,9 +736,6 @@ RegError ORegistry::closeKey(RegKeyHandle hKey)
 return releaseKey(pKey);
 }
 
-
-//  deleteKey
-
 RegError ORegistry::deleteKey(RegKeyHandle hKey, const OUString& keyName)
 {
 ORegKey* pKey = static_cast< ORegKey* >(hKey);
@@ -848,9 +815,6 @@ RegError ORegistry::eraseKey(ORegKey* pKey, const OUString& 
keyName)
 return pKey->closeKey(pOldKey);
 }
 
-
-//  deleteSubKeysAndValues
-
 RegError ORegistry::deleteSubkeysAndValues(ORegKey* pKey)
 {
 OStoreDirectory::iterator   iter;
@@ -888,9 +852,6 @@ RegError ORegistry::deleteSubkeysAndValues(ORegKey* pKey)
 return RegError::NO_ERROR;
 }
 
-
-//  loadKey
-
 RegError ORegistry::loadKey(RegKeyHandle hKey, const OUString& regFileName,
 bool bWarnings, bool bReport)
 {
@@ -934,9 +895,6 @@ RegError ORegistry::loadKey(RegKeyHandle hKey, const 
OUString& regFileName,
 return _ret;
 }
 
-
-//  loadAndSaveValue()
-
 RegError ORegistry::loadAndSaveValue(ORegKey* pTargetKey,
  ORegKey* pSourceKey,
  const OUString& valueName,
@@ -1038,7 +996,6 @@ RegError ORegistry::loadAndSaveValue(ORegKey* pTargetKey,
 }
 }
 
-// write
 if (rValue.create(rTargetFile, sTargetPath, valueName, 
storeAccessMode::Create))
 {
 rtl_freeMemory(pBuffer);
@@ -1061,9 +1018,6 @@ RegError ORegistry::loadAndSaveValue(ORegKey* pTargetKey,
 return _ret;
 }
 
-
-//  checkblop()
-
 RegError ORegistry::checkBlop(OStoreStream& rValue,
   const OUString& sTargetPath,
   sal_uInt32 srcValueSize,
@@ -1190,9 +1144,6 @@ static sal_uInt32 checkTypeReaders(RegistryTypeReader& 
reader1,
 return count;
 }
 
-
-//  mergeModuleValue()
-
 RegError ORegistry::mergeModuleValue(OStoreStream& rTargetValue,
  RegistryTypeReader& reader,
  RegistryTypeReader& reader2)
@@ -1263,9 +1214,6 @@ RegError ORegistry::mergeModuleValue(OStoreStream& 
rTargetValue,
 return RegError::N

[Libreoffice-commits] core.git: include/osl

2017-05-26 Thread Chris Sherlock
 include/osl/file.h |8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit f347ec8f6fa7143ad98eac96051b6f4b56e71847
Author: Chris Sherlock 
Date:   Sun May 21 20:32:53 2017 +1000

osl: osl_setFilePos uHow and uPos parameter desc. are amazingly inaccurate!

Change-Id: Ie96f31b24b4f23ef72f12adee14dfe4092fc8e2b
Reviewed-on: https://gerrit.libreoffice.org/37873
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/include/osl/file.h b/include/osl/file.h
index fd52e30e0399..44ce6a13dc5b 100644
--- a/include/osl/file.h
+++ b/include/osl/file.h
@@ -699,13 +699,15 @@ SAL_DLLPUBLIC oslFileError SAL_CALL osl_openFile(
 Handle to a file received by a previous call to osl_openFile().
 
 @param uHow [in]
-Distance to move the internal position pointer (from uPos).
+How to calculate the offset - osl_Pos_Absolut means start at the beginning 
of the file, osl_Pos_Current means
+offset from the current seek position and osl_Pos_End means the offset 
will be negative and the position will be
+calculated backwards from the end of the file by the offset provided.
 
 @param uPos [in]
-Absolute position from the beginning of the file.
+Seek offset, depending on uHow. If uHow is osl_Pos_End then the value must 
be negative.
 
 @retval osl_File_E_None on success
-@retval osl_File_E_INVAL the format of the parameters was not valid
+@retval osl_File_E_INVAL the format of the parameters was not valid (e.g. 
if uHow is osl_Pos_End then must be negative)
 @retval osl_File_E_OVERFLOW the resulting file offset would be a value 
which cannot be represented correctly for regular files
 
 @seeosl_openFile()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sal/qa

2017-05-26 Thread Chris Sherlock
 sal/qa/osl/file/osl_File.cxx |   25 +
 1 file changed, 13 insertions(+), 12 deletions(-)

New commits:
commit 95d5375b63d80c4a89ad96954934ff2e8ae213a2
Author: Chris Sherlock 
Date:   Sun May 21 16:06:56 2017 +1000

osl: remove LLA sigs, fix typos and convert to Doxygen comment

Change-Id: I07311894c25a906d0f3d64f39684851c7b23d672
Reviewed-on: https://gerrit.libreoffice.org/37872
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx
index 7176885dbbae..b3edf385561f 100644
--- a/sal/qa/osl/file/osl_File.cxx
+++ b/sal/qa/osl/file/osl_File.cxx
@@ -775,8 +775,8 @@ namespace osl_FileBase
 #endif
 }
 
-/** LLA: Test for getSystemPathFromFileURL()
-this test is splitted into 2 different OS tests,
+/** Test for getSystemPathFromFileURL()
+this test is split into 2 different OS tests,
 the first function checkUNXBehaviour... runs only on Unix based 
Systems,
 the second only on windows based systems
 the first parameter are a file URL where we want to get the system 
path of,
@@ -853,7 +853,7 @@ namespace osl_FileBase
 {
 #if 0
 OString sURL("file://c:/tmp");
-checkUNXBehaviour_getSystemPathFromFileURL(sURL, 
osl::FileBase::E_None, "c:/tmp"); // LLA: this is may be a BUG
+checkUNXBehaviour_getSystemPathFromFileURL(sURL, 
osl::FileBase::E_None, "c:/tmp"); // this is may be a BUG
 checkWNTBehaviour_getSystemPathFromFileURL(sURL, 
osl::FileBase::E_INVAL, "");
 #endif
 }
@@ -867,7 +867,7 @@ namespace osl_FileBase
 
 void SystemPath_FileURL::getSystemPathFromFileURL_001_53()
 {
-// LLA: is this a legal file path?
+// is this a legal file path?
 OString sURL("file:///c|/tmp");
 checkUNXBehaviour_getSystemPathFromFileURL(sURL, 
osl::FileBase::E_None, "/c|/tmp");
 checkWNTBehaviour_getSystemPathFromFileURL(sURL, 
osl::FileBase::E_None, "c:\\tmp");
@@ -890,7 +890,7 @@ namespace osl_FileBase
 void SystemPath_FileURL::getSystemPathFromFileURL_001_7()
 {
 OString sURL("file:///tmp/../second");
-checkUNXBehaviour_getSystemPathFromFileURL(sURL, 
osl::FileBase::E_None, "/tmp/../second"); // LLA: may be a BUG
+checkUNXBehaviour_getSystemPathFromFileURL(sURL, 
osl::FileBase::E_None, "/tmp/../second"); // may be a BUG
 checkWNTBehaviour_getSystemPathFromFileURL(sURL, 
osl::FileBase::E_INVAL, "");
 }
 
@@ -1164,7 +1164,7 @@ namespace osl_FileBase
 void getTempDirURL_001()
 {
 
-CPPUNIT_ASSERT_EQUAL_MESSAGE("test for getTempDirURL function: 
excution",
+CPPUNIT_ASSERT_EQUAL_MESSAGE("test for getTempDirURL function: 
execution",
  osl::FileBase::E_None, nError);
 }
 
@@ -1477,11 +1477,12 @@ namespace osl_FileStatus
 
 }
 
-// Link is not defined in Windows, and on Linux, we can not get the 
directory item of the link file
-// LLA: we have to differ to filesystems, normal filesystems support 
links (EXT2, ...)
-//  castrated filesystems don't (FAT, FAT32)
-//  Windows NT NTFS support links, but the windows api doesn't :-(
+/** Check if is a valid linked file.
 
+Link is not defined in Windows, and on Linux, we can not get the 
directory item of the linked file.
+We have to defer to filesystems, normal filesystems support links 
(EXT2, ...), castrated filesystems
+don't have links (FAT, FAT32) and Windows NT NTFS support links, 
but the Windows API doesn't :-(
+*/
 void isValid_003()
 {
 #if defined (UNX)
@@ -1656,7 +1657,7 @@ namespace osl_FileStatus
 
 void getFileType_007()
 {
-#if defined(__sun) // Special file is differ in Windows
+#if defined(__sun) // Special file is different in Windows
 nError1 = DirectoryItem::get(aTypeURL2, m_aSpecialItem);
 CPPUNIT_ASSERT_EQUAL(nError1, osl::FileBase::E_None);
 
@@ -2095,7 +2096,7 @@ namespace osl_FileStatus
 deleteTestFile(aTypeURL);
 }
 
-#if (defined UNX)// Link file is not define in Windows
+#if (defined UNX)// Link file is not defined in Windows
 void getLinkTargetURL_001()
 {
 // create a link file;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: registry/tools

2017-05-26 Thread Chris Sherlock
 registry/tools/fileurl.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 3a6eb7d7e5aaa455d892d63f95cced03d3e32a95
Author: Chris Sherlock 
Date:   Sat May 27 00:27:32 2017 +1000

tdf#43157 - registry: convert from OSL_ASSERT to assert

Change-Id: I527920d3e970e5028ebc0a84d0b460cdee0f140b
Reviewed-on: https://gerrit.libreoffice.org/38077
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/registry/tools/fileurl.cxx b/registry/tools/fileurl.cxx
index 94a2488c892e..5bf64a1f383b 100644
--- a/registry/tools/fileurl.cxx
+++ b/registry/tools/fileurl.cxx
@@ -58,11 +58,11 @@ OUString convertToFileUrl(char const * filename, sal_Int32 
length)
 OUString uWorkingDir;
 if (osl_getProcessWorkingDir(&uWorkingDir.pData) != 
osl_Process_E_None)
 {
-OSL_ASSERT(false);
+assert(false);
 }
 if (FileBase::getAbsoluteFileURL(uWorkingDir, uFileName, uFileUrl) 
!= FileBase::E_None)
 {
-OSL_ASSERT(false);
+assert(false);
 }
 }
 else
@@ -70,7 +70,7 @@ OUString convertToFileUrl(char const * filename, sal_Int32 
length)
 // absolute path name.
 if (FileBase::getFileURLFromSystemPath(uFileName, uFileUrl) != 
FileBase::E_None)
 {
-OSL_ASSERT(false);
+assert(false);
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sal/osl

2017-05-26 Thread Chris Sherlock
 sal/osl/w32/tempfile.cxx |   18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

New commits:
commit dbb2fff9f3f918966ddc5f55b32e247dc2bb2874
Author: Chris Sherlock 
Date:   Sun May 21 08:53:41 2017 +1000

osl: convert to variable == value, not value == variable

Change-Id: I20e68c135f43d03cf6035eda488c85a2067910e0
Reviewed-on: https://gerrit.libreoffice.org/37864
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/sal/osl/w32/tempfile.cxx b/sal/osl/w32/tempfile.cxx
index 3c2f10cdc0e6..ec50b7ec115d 100644
--- a/sal/osl/w32/tempfile.cxx
+++ b/sal/osl/w32/tempfile.cxx
@@ -52,13 +52,13 @@ static oslFileError osl_setup_base_directory_impl_(
 else
 error = osl_getTempDirURL(&dir_url);
 
-if (osl_File_E_None == error)
+if (error == osl_File_E_None)
 {
 error = osl_getSystemPathFromFileURL_(dir_url, &dir, false);
 rtl_uString_release(dir_url);
 }
 
-if (osl_File_E_None == error )
+if (error == osl_File_E_None)
 {
 rtl_uString_assign(ppustr_base_dir, dir);
 rtl_uString_release(dir);
@@ -76,9 +76,9 @@ static oslFileError osl_setup_createTempFile_impl_(
 {
 oslFileError osl_error;
 
-OSL_PRECOND(((nullptr != pHandle) || (nullptr != ppustrTempFileURL)), 
"Invalid parameter!");
+OSL_PRECOND(((pHandle != nullptr) || (ppustrTempFileURL != nullptr)), 
"Invalid parameter!");
 
-if ((nullptr == pHandle) && (nullptr == ppustrTempFileURL))
+if ((pHandle == nullptr) && (ppustrTempFileURL == nullptr))
 {
 osl_error = osl_File_E_INVAL;
 }
@@ -87,7 +87,7 @@ static oslFileError osl_setup_createTempFile_impl_(
 osl_error = osl_setup_base_directory_impl_(
 pustrDirectoryURL, ppustr_base_dir);
 
-*b_delete_on_close = nullptr == ppustrTempFileURL;
+*b_delete_on_close = (ppustrTempFileURL == nullptr);
 }
 
 return osl_error;
@@ -98,11 +98,11 @@ static oslFileError osl_win32_GetTempFileName_impl_(
 {
 oslFileError osl_error = osl_File_E_None;
 
-if (0 == GetTempFileNameW(
+if (GetTempFileNameW(
 reinterpret_cast(rtl_uString_getStr(base_directory)),
 L"",
 0,
-temp_file_name))
+temp_file_name) == 0)
 {
 osl_error = oslTranslateFileError(GetLastError());
 }
@@ -158,7 +158,7 @@ static oslFileError osl_createTempFile_impl_(
 
 } while(true); // try until success
 
-if ((osl_File_E_None == osl_error) && !b_delete_on_close)
+if ((osl_error == osl_File_E_None) && !b_delete_on_close)
 {
 rtl_uString* pustr = nullptr;
 rtl_uString_newFromStr(&pustr, reinterpret_cast(tmp_name));
@@ -186,7 +186,7 @@ oslFileError SAL_CALL osl_createTempFile(
 &base_directory,
 &b_delete_on_close);
 
-if (osl_File_E_None != osl_error)
+if (osl_error != osl_File_E_None)
 return osl_error;
 
 /* allocate enough space on the stack, the file name can not be longer 
than MAX_PATH */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: registry/source

2017-05-26 Thread Chris Sherlock
 registry/source/regimpl.cxx |   50 ++--
 1 file changed, 25 insertions(+), 25 deletions(-)

New commits:
commit 90347af0b41fa76a2a79a2b4c9258333b3bf9a25
Author: Chris Sherlock 
Date:   Fri May 26 22:29:15 2017 +1000

registry: like Rosencrantz, consistency is all I ask...

... only I do so with less existential angst.

Change-Id: Ib62c27580db845b5c00b772aef1ec798a6163b4a
Reviewed-on: https://gerrit.libreoffice.org/38070
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/registry/source/regimpl.cxx b/registry/source/regimpl.cxx
index 5499e7b5c7da..a9ee6289d844 100644
--- a/registry/source/regimpl.cxx
+++ b/registry/source/regimpl.cxx
@@ -428,7 +428,7 @@ ORegistry::ORegistry()
 : m_refCount(1)
 , m_readOnly(false)
 , m_isOpen(false)
-, ROOT( "/" )
+, ROOT("/")
 {
 }
 
@@ -495,7 +495,7 @@ RegError ORegistry::initRegistry(const OUString& regName, 
RegAccessMode accessMo
 OStoreDirectory rStoreDir;
 storeError _err = rStoreDir.create(rRegFile, OUString(), OUString(), 
sAccessMode);
 
-if ( _err == store_E_None )
+if (_err == store_E_None)
 {
 m_file = rRegFile;
 m_name = regName;
@@ -546,10 +546,10 @@ RegError ORegistry::destroyRegistry(const OUString& 
regName)
 pReg.reset();
 
 OUString systemName;
-if ( FileBase::getSystemPathFromFileURL(regName, systemName) != 
FileBase::E_None )
+if (FileBase::getSystemPathFromFileURL(regName, systemName) != 
FileBase::E_None)
 systemName = regName;
 
-OString name( OUStringToOString(systemName, 
osl_getThreadTextEncoding()) );
+OString name(OUStringToOString(systemName, 
osl_getThreadTextEncoding()));
 if (unlink(name.getStr()) != 0)
 {
 return RegError::DESTROY_REGISTRY_FAILED;
@@ -574,10 +574,10 @@ RegError ORegistry::destroyRegistry(const OUString& 
regName)
 if (!m_name.isEmpty())
 {
 OUString systemName;
-if ( FileBase::getSystemPathFromFileURL(m_name, systemName) != 
FileBase::E_None )
+if (FileBase::getSystemPathFromFileURL(m_name, systemName) != 
FileBase::E_None)
 systemName = m_name;
 
-OString name( OUStringToOString(systemName, 
osl_getThreadTextEncoding()) );
+OString name(OUStringToOString(systemName, 
osl_getThreadTextEncoding()));
 if (unlink(name.getStr()) != 0)
 {
 return RegError::DESTROY_REGISTRY_FAILED;
@@ -635,7 +635,7 @@ RegError ORegistry::createKey(RegKeyHandle hKey, const 
OUString& keyName,
 
 *phNewKey = nullptr;
 
-if ( keyName.isEmpty() )
+if (keyName.isEmpty())
 return RegError::INVALID_KEYNAME;
 
 REG_GUARD(m_mutex);
@@ -664,7 +664,7 @@ RegError ORegistry::createKey(RegKeyHandle hKey, const 
OUString& keyName,
 sal_Int32 nIndex = 0;
 do
 {
-token = sFullKeyName.getToken( 0, '/', nIndex );
+token = sFullKeyName.getToken(0, '/', nIndex);
 if (!token.isEmpty())
 {
 if (rStoreDir.create(pKey->getStoreFile(), sFullPath.getStr(), 
token, storeAccessMode::Create))
@@ -675,7 +675,7 @@ RegError ORegistry::createKey(RegKeyHandle hKey, const 
OUString& keyName,
 sFullPath.append(token);
 sFullPath.append('/');
 }
-} while( nIndex != -1 );
+} while(nIndex != -1);
 
 
 pKey = new ORegKey(sFullKeyName, this);
@@ -695,7 +695,7 @@ RegError ORegistry::openKey(RegKeyHandle hKey, const 
OUString& keyName,
 
 *phOpenKey = nullptr;
 
-if ( keyName.isEmpty() )
+if (keyName.isEmpty())
 {
 return RegError::INVALID_KEYNAME;
 }
@@ -772,7 +772,7 @@ RegError ORegistry::closeKey(RegKeyHandle hKey)
 RegError ORegistry::deleteKey(RegKeyHandle hKey, const OUString& keyName)
 {
 ORegKey* pKey = static_cast< ORegKey* >(hKey);
-if ( keyName.isEmpty() )
+if (keyName.isEmpty())
 return RegError::INVALID_KEYNAME;
 
 REG_GUARD(m_mutex);
@@ -788,7 +788,7 @@ RegError ORegistry::eraseKey(ORegKey* pKey, const OUString& 
keyName)
 {
 RegError _ret = RegError::NO_ERROR;
 
-if ( keyName.isEmpty() )
+if (keyName.isEmpty())
 {
 return RegError::INVALID_KEYNAME;
 }
@@ -798,7 +798,7 @@ RegError ORegistry::eraseKey(ORegKey* pKey, const OUString& 
keyName)
 OUString sRelativKey;
 sal_Int32lastIndex = keyName.lastIndexOf('/');
 
-if ( lastIndex >= 0 )
+if (lastIndex >= 0)
 {
 sRelativKey += keyName.copy(lastIndex + 1);
 
@@ -836,7 +836,7 @@ RegError ORegistry::eraseKey(ORegKey* pKey, const OUString& 
keyName)
 tmpName += ROOT;
 
 OStoreFile sFile(pKey->getStoreFile());
-if ( sFile.isValid() && sFile.remove(sFullPath, tmpName) )
+if (sFile.isValid() && sFile.remove(sFullPath, tmpN

[Libreoffice-commits] core.git: registry/source

2017-05-26 Thread Chris Sherlock
 registry/source/regimpl.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b6536a2ff0f9ea9ad431eeba2c8b5493823dd21b
Author: Chris Sherlock 
Date:   Sat May 27 00:07:34 2017 +1000

registry: typo in function parameter

Change-Id: I0a0e9551e427f3ca0fe15a5eec05f85e852642fe
Reviewed-on: https://gerrit.libreoffice.org/38075
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/registry/source/regimpl.hxx b/registry/source/regimpl.hxx
index b375318f359f..8d9ed6185d91 100644
--- a/registry/source/regimpl.hxx
+++ b/registry/source/regimpl.hxx
@@ -75,7 +75,7 @@ public:
 
 RegErrorloadKey(RegKeyHandle hKey,
 const OUString& regFileName,
-bool bWarings,
+bool bWarnings,
 bool bReport);
 
 RegErrordumpRegistry(RegKeyHandle hKey) const;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loleaflet/admin.strings.js loleaflet/dist loleaflet/src

2017-05-26 Thread Aditya Dewan
 loleaflet/admin.strings.js   |2 
 loleaflet/dist/admin/admin.html  |   66 +++---
 loleaflet/dist/admin/bootstrap/dashboard.css |   28 +++-
 loleaflet/src/admin/AdminSocketOverview.js   |  163 +--
 4 files changed, 224 insertions(+), 35 deletions(-)

New commits:
commit 66a3e1c273c9f967d650e65d40e9d16e3b8454d1
Author: Aditya Dewan 
Date:   Thu May 25 14:24:09 2017 +0530

tdf#106449 Admin console: adding user list

Change-Id: I41b15c6a73fa61c21ef5ab79de149b445014c99a
Reviewed-on: https://gerrit.libreoffice.org/38017
Reviewed-by: pranavk 
Tested-by: pranavk 

diff --git a/loleaflet/admin.strings.js b/loleaflet/admin.strings.js
index a56b5d47..5d21e7aa 100644
--- a/loleaflet/admin.strings.js
+++ b/loleaflet/admin.strings.js
@@ -11,7 +11,9 @@ l10nstrings.strAnalytics = _('Analytics');
 l10nstrings.strHistory = _('History');
 l10nstrings.strDashboard = _('Dashboard');
 l10nstrings.strUsersOnline = _('Users online');
+l10nstrings.strUserName = _('Users Name');
 l10nstrings.strDocumentsOpened = _('Documents opened');
+l10nstrings.strDocumentNumber = _('Number of Documents');
 l10nstrings.strMemoryConsumed = _('Memory consumed');
 l10nstrings.strPid = _('PID');
 l10nstrings.strDocument = _('Document');
diff --git a/loleaflet/dist/admin/admin.html b/loleaflet/dist/admin/admin.html
index f8268565..72308e88 100644
--- a/loleaflet/dist/admin/admin.html
+++ b/loleaflet/dist/admin/admin.html
@@ -78,28 +78,56 @@
  
document.write(l10nstrings.strMemoryConsumed)

  
+
+  
+  
+
+  
document.write(l10nstrings.strDocumentsOpened)
+
+  
+  
+
+  document.write(l10nstrings.strUsersOnline)
+
+  
+  
 
- document.write(l10nstrings.strDocumentsOpened)
- 
-   
- 
-   
- document.write(l10nstrings.strPid)
- 
document.write(l10nstrings.strDocument)
- 
document.write(l10nstrings.strNumberOfViews)
- 
document.write(l10nstrings.strMemoryConsumed)
- 
document.write(l10nstrings.strElapsedTime)
- 
document.write(l10nstrings.strIdleTime)
- 
document.write(l10nstrings.strModified)
-   
- 
- 
- 
-   
- 
-   
+  
+
+   
+ 
+   
+ 
document.write(l10nstrings.strPid)
+ 
document.write(l10nstrings.strDocument)
+ 
document.write(l10nstrings.strNumberOfViews)
+ 
document.write(l10nstrings.strMemoryConsumed)
+ 
document.write(l10nstrings.strElapsedTime)
+ 
document.write(l10nstrings.strIdleTime)
+ 
document.write(l10nstrings.strModified)
+   
+ 
+ 
+ 
+   
+
+
+
+  
+
+  
+
document.write(l10nstrings.strUserName)
+
document.write(l10nstrings.strDocumentNumber)
+
document.write(l10nstrings.strDocumentsOpened)
+  
+
+
+
+  
+
   
 
+  
+
 
 
   
diff --git a/loleaflet/dist/admin/bootstrap/dashboard.css 
b/loleaflet/dist/admin/bootstrap/dashboard.css
index 60ed98d2..cdf37a82 100644
--- a/loleaflet/dist/admin/bootstrap/dashboard.css
+++ b/loleaflet/dist/admin/bootstrap/dashboard.css
@@ -113,15 +113,29 @@ body {
   position: absolute;
   display: none;
 }
-
 .userContainer{
-  display: none;
   position: absolute;
-  border: 1px solid black;
-  padding: 5px;
-  border-radius: 4px;
-  background-color: #dd;
 }
-tr:hover .userContainer{
+tr:hover .dropdown-menu{
   display: block;
+}
+
+/*
+ * User list view
+ */
+.view-opt-button{
+  border: 1px solid lightgrey;
+  border-radius: 5px;
+  padding: 4px 5px;
+  cursor: pointer;
+  transition: background-color .3s;
+}
+.view-opt-button:hover{
+  background-color: #f5f5f5;
+}
+.selected-view-opt{
+  background-color: #f5f5f5;
+}
+.doc_list_label{
+  cursor: pointer;
 }
\ No newline at end of file
diff --git a/loleaflet/src/admin/AdminSocketOverview.js 
b/loleaflet/src/admin/AdminSocketOverview.js
index b1070fcd..dfb92b64 100644
--- a/loleaflet/src/admin/AdminSocketOverview.js
+++ b/loleaflet/src/admin/AdminSocketOverview.js
@@ -47,7 +47,7 @@ var AdminSocketOverview = AdminSocketBase.extend({
}, 1000);
 
// Allow table rows to have a context menu for terminating 
sessions
-   $('body').on('contextmenu', 'table tr', function(ev) {
+   $('body').on('contextmenu', '#docview tr', function(ev) {
$('#rowContextMenu').css({
display: 'block'

[Libreoffice-commits] core.git: sfx2/source sw/qa

2017-05-26 Thread Henry Castro
 sfx2/source/control/unoctitm.cxx   |   21 +-
 sw/qa/extras/tiledrendering/tiledrendering.cxx |   78 +
 2 files changed, 94 insertions(+), 5 deletions(-)

New commits:
commit 0582bd49b385ebcebf93fe87d0161ed4846c8805
Author: Henry Castro 
Date:   Thu May 25 21:07:25 2017 -0400

sw lok: disable undo state if conflict with other views

Change-Id: I5497c9b1f236bc803529825ba8b423d55fffa93e
Reviewed-on: https://gerrit.libreoffice.org/38049
Tested-by: Jenkins 
Reviewed-by: Henry Castro 

diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 30399c2c3cbe..3294bc0e9913 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -113,7 +113,7 @@ const char* const URLTypeNames[URLType_COUNT] =
 "double"
 };
 
-static void InterceptLOKStateChangeEvent(const SfxViewFrame* pViewFrame, const 
css::frame::FeatureStateEvent& aEvent);
+static void InterceptLOKStateChangeEvent( const SfxViewFrame* pViewFrame, 
const css::frame::FeatureStateEvent& aEvent, const SfxPoolItem* pState );
 
 void SfxStatusDispatcher::ReleaseAll()
 {
@@ -964,7 +964,7 @@ void SfxDispatchController_Impl::StateChanged( sal_uInt16 
nSID, SfxItemState eSt
 
 if (pDispatcher && pDispatcher->GetFrame())
 {
-InterceptLOKStateChangeEvent(pDispatcher->GetFrame(), aEvent);
+InterceptLOKStateChangeEvent(pDispatcher->GetFrame(), aEvent, 
pState);
 }
 
 Sequence< OUString > seqNames = 
pDispatch->GetListeners().getContainedTypes();
@@ -982,7 +982,7 @@ void SfxDispatchController_Impl::StateChanged( sal_uInt16 
nSID, SfxItemState eSt
 StateChanged( nSID, eState, pState, nullptr );
 }
 
-static void InterceptLOKStateChangeEvent(const SfxViewFrame* pViewFrame, const 
css::frame::FeatureStateEvent& aEvent)
+static void InterceptLOKStateChangeEvent(const SfxViewFrame* pViewFrame, const 
css::frame::FeatureStateEvent& aEvent, const SfxPoolItem* pState)
 {
 if (!comphelper::LibreOfficeKit::isActive())
 return;
@@ -1048,8 +1048,19 @@ static void InterceptLOKStateChangeEvent(const 
SfxViewFrame* pViewFrame, const c
 aBuffer.append(nColor);
 }
 else if (aEvent.FeatureURL.Path == "Undo" ||
- aEvent.FeatureURL.Path == "Redo" ||
- aEvent.FeatureURL.Path == "Cut" ||
+ aEvent.FeatureURL.Path == "Redo")
+{
+const SfxUInt32Item* pUndoConflict = dynamic_cast< const SfxUInt32Item 
* >( pState );
+if ( pUndoConflict && pUndoConflict->GetValue() > 0 )
+{
+aBuffer.append(OUString("disabled"));
+}
+else
+{
+aBuffer.append(aEvent.IsEnabled ? OUString("enabled") : 
OUString("disabled"));
+}
+}
+else if (aEvent.FeatureURL.Path == "Cut" ||
  aEvent.FeatureURL.Path == "Copy" ||
  aEvent.FeatureURL.Path == "Paste" ||
  aEvent.FeatureURL.Path == "SelectAll" ||
diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx 
b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index cd67c8b28fcb..d876736f8076 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -89,6 +89,7 @@ public:
 void testPaintCallbacks();
 void testUndoRepairResult();
 void testRedoRepairResult();
+void testDisableUndoRepair();
 
 
 CPPUNIT_TEST_SUITE(SwTiledRenderingTest);
@@ -134,6 +135,7 @@ public:
 CPPUNIT_TEST(testPaintCallbacks);
 CPPUNIT_TEST(testUndoRepairResult);
 CPPUNIT_TEST(testRedoRepairResult);
+CPPUNIT_TEST(testDisableUndoRepair);
 
 CPPUNIT_TEST_SUITE_END();
 
@@ -1724,6 +1726,82 @@ void SwTiledRenderingTest::testRedoRepairResult()
 comphelper::LibreOfficeKit::setActive(false);
 }
 
+void SwTiledRenderingTest::testDisableUndoRepair()
+{
+comphelper::LibreOfficeKit::setActive();
+
+// Create two views.
+SwXTextDocument* pXTextDocument = createDoc("dummy.fodt");
+ViewCallback aView1;
+SwView* pView1 = dynamic_cast(SfxViewShell::Current());
+int nView1 = SfxLokHelper::getView();
+SfxLokHelper::createView();
+ViewCallback aView2;
+SwView* pView2 = dynamic_cast(SfxViewShell::Current());
+int nView2 = SfxLokHelper::getView();
+
+{
+SfxItemSet 
aItemSet1(pXTextDocument->GetDocShell()->GetDoc()->GetAttrPool(), SID_UNDO, 
SID_UNDO);
+SfxItemSet 
aItemSet2(pXTextDocument->GetDocShell()->GetDoc()->GetAttrPool(), SID_UNDO, 
SID_UNDO);
+pView1->GetState(aItemSet1);
+CPPUNIT_ASSERT_EQUAL(SfxItemState::DISABLED, 
aItemSet1.GetItemState(SID_UNDO));
+pView2->GetState(aItemSet2);
+CPPUNIT_ASSERT_EQUAL(SfxItemState::DISABLED, 
aItemSet2.GetItemState(SID_UNDO));
+}
+
+auto fnCheckStates = [pXTextDocument, pView1, pView2]()
+{
+SfxItemSet 
aItemSet1(pXTextDocument->GetDocShell()->GetDoc()->GetAttrPool(), SID_UNDO, 
SID_UNDO);
+SfxItemSet

[Libreoffice-commits] core.git: basctl/source

2017-05-26 Thread Julien Nabet
 basctl/source/basicide/baside2.cxx |   13 +
 1 file changed, 9 insertions(+), 4 deletions(-)

New commits:
commit 95b9b46cca1da5f452af5e322af447fd27f82ea5
Author: Julien Nabet 
Date:   Fri May 26 15:30:17 2017 +0200

Revert "deleted variable bAdd because it does not make sense"

This reverts commit d0c0ebbcabb67b8dfd130cf4e9e666bba229f846.
+ fix bAdd logic

Change-Id: Iefa70e31c5747db1a881b1036e3d8a8995785603
Reviewed-on: https://gerrit.libreoffice.org/38072
Tested-by: Jenkins 
Reviewed-by: Mike Kaganski 

diff --git a/basctl/source/basicide/baside2.cxx 
b/basctl/source/basicide/baside2.cxx
index c85863afdd2f..d54141ffe7ab 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -669,6 +669,7 @@ BasicDebugFlags ModulWindow::BasicBreakHdl( StarBASIC* 
pBasic )
 void ModulWindow::BasicAddWatch()
 {
 AssertValidEditEngine();
+bool bAdd = true;
 if ( !GetEditView()->HasSelection() )
 {
 TextPaM aWordStart;
@@ -679,11 +680,15 @@ void ModulWindow::BasicAddWatch()
 aSel.GetEnd().GetIndex() += aWord.getLength();
 GetEditView()->SetSelection( aSel );
 }
+else
+bAdd = false;
+}
+if ( bAdd )
+{
+TextSelection aSel = GetEditView()->GetSelection();
+if ( aSel.GetStart().GetPara() == aSel.GetEnd().GetPara() ) // single 
line selection
+m_rLayout.BasicAddWatch(GetEditView()->GetSelected());
 }
-
-TextSelection aSel = GetEditView()->GetSelection();
-if ( aSel.GetStart().GetPara() == aSel.GetEnd().GetPara() ) // single line 
selection
-m_rLayout.BasicAddWatch(GetEditView()->GetSelected());
 }
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: icon-themes/industrial icon-themes/tango

2017-05-26 Thread Adolfo Jayme Barrientos
 dev/null   |binary
 icon-themes/industrial/README  |8 
 icon-themes/tango/cmd/lc_basicstop.png |binary
 icon-themes/tango/cmd/lc_bibliographycomponent.png |binary
 icon-themes/tango/cmd/lc_currencyfield.png |binary
 icon-themes/tango/cmd/lc_numberformatcurrency.png  |binary
 icon-themes/tango/cmd/lc_zoom100percent.png|binary
 icon-themes/tango/cmd/lc_zoomoptimal.png   |binary
 icon-themes/tango/cmd/sc_basicstop.png |binary
 icon-themes/tango/cmd/sc_bibliographycomponent.png |binary
 icon-themes/tango/cmd/sc_currencyfield.png |binary
 icon-themes/tango/cmd/sc_numberformatcurrency.png  |binary
 icon-themes/tango/cmd/sc_orientation.png   |binary
 icon-themes/tango/cmd/sc_zoom100percent.png|binary
 icon-themes/tango/cmd/sc_zoomin.png|binary
 icon-themes/tango/cmd/sc_zoomminus.png |binary
 icon-themes/tango/cmd/sc_zoomoptimal.png   |binary
 icon-themes/tango/cmd/sc_zoomout.png   |binary
 icon-themes/tango/cmd/sc_zoomplus.png  |binary
 icon-themes/tango/res/harddisk_16.png  |binary
 icon-themes/tango/sc/res/droplink.png  |binary
 21 files changed, 8 deletions(-)

New commits:
commit e2e03ffc2637c9faea8a78f04232644e66ad60c4
Author: Adolfo Jayme Barrientos 
Date:   Fri May 26 19:11:18 2017 -0500

Tiny Tango icon update, before I lose my backups again

Change-Id: I26aaeabe68f063e06062840c354521b18054d729

diff --git a/icon-themes/industrial/README b/icon-themes/industrial/README
index a736cde5cc71..4a98dd0f5710 100644
--- a/icon-themes/industrial/README
+++ b/icon-themes/industrial/README
@@ -23,7 +23,6 @@ cmd/lc_backgroundpatterncontroller.png
 cmd/lc_basicstepinto.png
 cmd/lc_basicstepout.png
 cmd/lc_basicstepover.png
-cmd/lc_basicstop.png
 cmd/lc_bezier_unfilled.png
 cmd/lc_bezierclose.png
 cmd/lc_bezierconvert.png
@@ -398,7 +397,6 @@ cmd/sc_backward.png
 cmd/sc_basicstepinto.png
 cmd/sc_basicstepout.png
 cmd/sc_basicstepover.png
-cmd/sc_basicstop.png
 cmd/sc_beforeobject.png
 cmd/sc_behindobject.png
 cmd/sc_bezier_unfilled.png
@@ -758,14 +756,8 @@ cmd/sc_wrapoff.png
 cmd/sc_wrapon.png
 cmd/sc_wrapright.png
 cmd/sc_wrapthrough.png
-cmd/sc_zoom100percent.png
-cmd/sc_zoomin.png
-cmd/sc_zoomminus.png
 cmd/sc_zoomnext.png
 cmd/sc_zoomobjects.png
-cmd/sc_zoomoptimal.png
-cmd/sc_zoomout.png
 cmd/sc_zoompage.png
 cmd/sc_zoompagewidth.png
-cmd/sc_zoomplus.png
 cmd/sc_zoomprevious.png
diff --git a/icon-themes/industrial/cmd/lc_basicstop.png 
b/icon-themes/industrial/cmd/lc_basicstop.png
deleted file mode 100644
index 4594ddaa4926..
Binary files a/icon-themes/industrial/cmd/lc_basicstop.png and /dev/null differ
diff --git a/icon-themes/industrial/cmd/sc_basicstop.png 
b/icon-themes/industrial/cmd/sc_basicstop.png
deleted file mode 100644
index 8f1d26dd3782..
Binary files a/icon-themes/industrial/cmd/sc_basicstop.png and /dev/null differ
diff --git a/icon-themes/industrial/cmd/sc_zoom100percent.png 
b/icon-themes/industrial/cmd/sc_zoom100percent.png
deleted file mode 100644
index 30daf3b47459..
Binary files a/icon-themes/industrial/cmd/sc_zoom100percent.png and /dev/null 
differ
diff --git a/icon-themes/industrial/cmd/sc_zoomin.png 
b/icon-themes/industrial/cmd/sc_zoomin.png
deleted file mode 100644
index edf8c9c06c90..
Binary files a/icon-themes/industrial/cmd/sc_zoomin.png and /dev/null differ
diff --git a/icon-themes/industrial/cmd/sc_zoomminus.png 
b/icon-themes/industrial/cmd/sc_zoomminus.png
deleted file mode 100644
index 861c44018753..
Binary files a/icon-themes/industrial/cmd/sc_zoomminus.png and /dev/null differ
diff --git a/icon-themes/industrial/cmd/sc_zoomoptimal.png 
b/icon-themes/industrial/cmd/sc_zoomoptimal.png
deleted file mode 100644
index 809f309caadd..
Binary files a/icon-themes/industrial/cmd/sc_zoomoptimal.png and /dev/null 
differ
diff --git a/icon-themes/industrial/cmd/sc_zoomout.png 
b/icon-themes/industrial/cmd/sc_zoomout.png
deleted file mode 100644
index 861c44018753..
Binary files a/icon-themes/industrial/cmd/sc_zoomout.png and /dev/null differ
diff --git a/icon-themes/industrial/cmd/sc_zoomplus.png 
b/icon-themes/industrial/cmd/sc_zoomplus.png
deleted file mode 100644
index edf8c9c06c90..
Binary files a/icon-themes/industrial/cmd/sc_zoomplus.png and /dev/null differ
diff --git a/icon-themes/tango/cmd/lc_basicstop.png 
b/icon-themes/tango/cmd/lc_basicstop.png
new file mode 100644
index ..aa460f101c0c
Binary files /dev/null and b/icon-themes/tango/cmd/lc_basicstop.png differ
diff --git a/icon-themes/tango/cmd/lc_bibliographycomponent.png 
b/icon-themes/tango/cmd/lc_bibliographycomponent.png
new file mode 100644
index ..653e635b62ec
Binary files /dev/null and b/icon-themes/tango/cmd/lc_bibliographycomponent.png 
differ
diff --git a/icon-theme

[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - extras/source

2017-05-26 Thread Laurent Balland-Poirier
 extras/source/templates/presnt/Alizarin.otp |binary
 extras/source/templates/presnt/BrightBlue.otp   |binary
 extras/source/templates/presnt/DNA.otp  |binary
 extras/source/templates/presnt/Focus.otp|binary
 extras/source/templates/presnt/Impress.otp  |binary
 extras/source/templates/presnt/Inspiration.otp  |binary
 extras/source/templates/presnt/LushGreen.otp|binary
 extras/source/templates/presnt/Metropolis.otp   |binary
 extras/source/templates/presnt/Midnightblue.otp |binary
 extras/source/templates/presnt/Pencil.otp   |binary
 extras/source/templates/presnt/Sunset.otp   |binary
 extras/source/templates/presnt/Vintage.otp  |binary
 extras/source/templates/presnt/Vivid.otp|binary
 13 files changed

New commits:
commit 49efc2d00a674e4fa16aa10c19cafbb10e1573ef
Author: Laurent Balland-Poirier 
Date:   Fri Apr 21 21:22:28 2017 +0200

tdf#107045 Change preview image in templates

thumbnail.png was modified in XML code for each Impress
template. Localized text was replaced with Lorem Ipsum
text

Change-Id: I67fbf9b957630a75227d1b595d9bdc4298ef791c
Reviewed-on: https://gerrit.libreoffice.org/36805
Tested-by: Jenkins 
Reviewed-by: Adolfo Jayme Barrientos 
(cherry picked from commit 5c16d16ed3db32f922b2aeaad49592d2615c7e2c)
Reviewed-on: https://gerrit.libreoffice.org/38087
Tested-by: Adolfo Jayme Barrientos 

diff --git a/extras/source/templates/presnt/Alizarin.otp 
b/extras/source/templates/presnt/Alizarin.otp
index 8a8252d5a0f0..7688482936f1 100644
Binary files a/extras/source/templates/presnt/Alizarin.otp and 
b/extras/source/templates/presnt/Alizarin.otp differ
diff --git a/extras/source/templates/presnt/BrightBlue.otp 
b/extras/source/templates/presnt/BrightBlue.otp
index f9f7a4536407..f1d187d26368 100644
Binary files a/extras/source/templates/presnt/BrightBlue.otp and 
b/extras/source/templates/presnt/BrightBlue.otp differ
diff --git a/extras/source/templates/presnt/DNA.otp 
b/extras/source/templates/presnt/DNA.otp
index 7640e9e1c2a2..212b6ae095e3 100644
Binary files a/extras/source/templates/presnt/DNA.otp and 
b/extras/source/templates/presnt/DNA.otp differ
diff --git a/extras/source/templates/presnt/Focus.otp 
b/extras/source/templates/presnt/Focus.otp
index d99618e841f8..953b6aa04180 100644
Binary files a/extras/source/templates/presnt/Focus.otp and 
b/extras/source/templates/presnt/Focus.otp differ
diff --git a/extras/source/templates/presnt/Impress.otp 
b/extras/source/templates/presnt/Impress.otp
index 9a33dcb7627c..ccd527332673 100644
Binary files a/extras/source/templates/presnt/Impress.otp and 
b/extras/source/templates/presnt/Impress.otp differ
diff --git a/extras/source/templates/presnt/Inspiration.otp 
b/extras/source/templates/presnt/Inspiration.otp
index 18ec2148c61a..9e16fad83519 100644
Binary files a/extras/source/templates/presnt/Inspiration.otp and 
b/extras/source/templates/presnt/Inspiration.otp differ
diff --git a/extras/source/templates/presnt/LushGreen.otp 
b/extras/source/templates/presnt/LushGreen.otp
index e2d6638e97dd..c56786ab4dbb 100644
Binary files a/extras/source/templates/presnt/LushGreen.otp and 
b/extras/source/templates/presnt/LushGreen.otp differ
diff --git a/extras/source/templates/presnt/Metropolis.otp 
b/extras/source/templates/presnt/Metropolis.otp
index f176ad79e9e9..93497a23c925 100644
Binary files a/extras/source/templates/presnt/Metropolis.otp and 
b/extras/source/templates/presnt/Metropolis.otp differ
diff --git a/extras/source/templates/presnt/Midnightblue.otp 
b/extras/source/templates/presnt/Midnightblue.otp
index 962bafa3f6f6..ca47b531002a 100644
Binary files a/extras/source/templates/presnt/Midnightblue.otp and 
b/extras/source/templates/presnt/Midnightblue.otp differ
diff --git a/extras/source/templates/presnt/Pencil.otp 
b/extras/source/templates/presnt/Pencil.otp
index fa12e50deaa5..fd870d0c057b 100644
Binary files a/extras/source/templates/presnt/Pencil.otp and 
b/extras/source/templates/presnt/Pencil.otp differ
diff --git a/extras/source/templates/presnt/Sunset.otp 
b/extras/source/templates/presnt/Sunset.otp
index b3d7b54077b6..381cdda6d8b8 100644
Binary files a/extras/source/templates/presnt/Sunset.otp and 
b/extras/source/templates/presnt/Sunset.otp differ
diff --git a/extras/source/templates/presnt/Vintage.otp 
b/extras/source/templates/presnt/Vintage.otp
index 7dbc4d4c9240..5230fbd3646e 100644
Binary files a/extras/source/templates/presnt/Vintage.otp and 
b/extras/source/templates/presnt/Vintage.otp differ
diff --git a/extras/source/templates/presnt/Vivid.otp 
b/extras/source/templates/presnt/Vivid.otp
index 5241ef42a983..a52c926414d1 100644
Binary files a/extras/source/templates/presnt/Vivid.otp and 
b/extras/source/templates/presnt/Vivid.otp differ
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: extras/source

2017-05-26 Thread Laurent Balland-Poirier
 extras/source/templates/presnt/Alizarin.otp |binary
 extras/source/templates/presnt/BrightBlue.otp   |binary
 extras/source/templates/presnt/DNA.otp  |binary
 extras/source/templates/presnt/Focus.otp|binary
 extras/source/templates/presnt/Impress.otp  |binary
 extras/source/templates/presnt/Inspiration.otp  |binary
 extras/source/templates/presnt/LushGreen.otp|binary
 extras/source/templates/presnt/Metropolis.otp   |binary
 extras/source/templates/presnt/Midnightblue.otp |binary
 extras/source/templates/presnt/Pencil.otp   |binary
 extras/source/templates/presnt/Sunset.otp   |binary
 extras/source/templates/presnt/Vintage.otp  |binary
 extras/source/templates/presnt/Vivid.otp|binary
 13 files changed

New commits:
commit 5c16d16ed3db32f922b2aeaad49592d2615c7e2c
Author: Laurent Balland-Poirier 
Date:   Fri Apr 21 21:22:28 2017 +0200

tdf#107045 Change preview image in templates

thumbnail.png was modified in XML code for each Impress
template. Localized text was replaced with Lorem Ipsum
text

Change-Id: I67fbf9b957630a75227d1b595d9bdc4298ef791c
Reviewed-on: https://gerrit.libreoffice.org/36805
Tested-by: Jenkins 
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/extras/source/templates/presnt/Alizarin.otp 
b/extras/source/templates/presnt/Alizarin.otp
index 8a8252d5a0f0..7688482936f1 100644
Binary files a/extras/source/templates/presnt/Alizarin.otp and 
b/extras/source/templates/presnt/Alizarin.otp differ
diff --git a/extras/source/templates/presnt/BrightBlue.otp 
b/extras/source/templates/presnt/BrightBlue.otp
index f9f7a4536407..f1d187d26368 100644
Binary files a/extras/source/templates/presnt/BrightBlue.otp and 
b/extras/source/templates/presnt/BrightBlue.otp differ
diff --git a/extras/source/templates/presnt/DNA.otp 
b/extras/source/templates/presnt/DNA.otp
index 7640e9e1c2a2..212b6ae095e3 100644
Binary files a/extras/source/templates/presnt/DNA.otp and 
b/extras/source/templates/presnt/DNA.otp differ
diff --git a/extras/source/templates/presnt/Focus.otp 
b/extras/source/templates/presnt/Focus.otp
index d99618e841f8..953b6aa04180 100644
Binary files a/extras/source/templates/presnt/Focus.otp and 
b/extras/source/templates/presnt/Focus.otp differ
diff --git a/extras/source/templates/presnt/Impress.otp 
b/extras/source/templates/presnt/Impress.otp
index 9a33dcb7627c..ccd527332673 100644
Binary files a/extras/source/templates/presnt/Impress.otp and 
b/extras/source/templates/presnt/Impress.otp differ
diff --git a/extras/source/templates/presnt/Inspiration.otp 
b/extras/source/templates/presnt/Inspiration.otp
index 18ec2148c61a..9e16fad83519 100644
Binary files a/extras/source/templates/presnt/Inspiration.otp and 
b/extras/source/templates/presnt/Inspiration.otp differ
diff --git a/extras/source/templates/presnt/LushGreen.otp 
b/extras/source/templates/presnt/LushGreen.otp
index e2d6638e97dd..c56786ab4dbb 100644
Binary files a/extras/source/templates/presnt/LushGreen.otp and 
b/extras/source/templates/presnt/LushGreen.otp differ
diff --git a/extras/source/templates/presnt/Metropolis.otp 
b/extras/source/templates/presnt/Metropolis.otp
index f176ad79e9e9..93497a23c925 100644
Binary files a/extras/source/templates/presnt/Metropolis.otp and 
b/extras/source/templates/presnt/Metropolis.otp differ
diff --git a/extras/source/templates/presnt/Midnightblue.otp 
b/extras/source/templates/presnt/Midnightblue.otp
index 962bafa3f6f6..ca47b531002a 100644
Binary files a/extras/source/templates/presnt/Midnightblue.otp and 
b/extras/source/templates/presnt/Midnightblue.otp differ
diff --git a/extras/source/templates/presnt/Pencil.otp 
b/extras/source/templates/presnt/Pencil.otp
index fa12e50deaa5..fd870d0c057b 100644
Binary files a/extras/source/templates/presnt/Pencil.otp and 
b/extras/source/templates/presnt/Pencil.otp differ
diff --git a/extras/source/templates/presnt/Sunset.otp 
b/extras/source/templates/presnt/Sunset.otp
index b3d7b54077b6..381cdda6d8b8 100644
Binary files a/extras/source/templates/presnt/Sunset.otp and 
b/extras/source/templates/presnt/Sunset.otp differ
diff --git a/extras/source/templates/presnt/Vintage.otp 
b/extras/source/templates/presnt/Vintage.otp
index 7dbc4d4c9240..5230fbd3646e 100644
Binary files a/extras/source/templates/presnt/Vintage.otp and 
b/extras/source/templates/presnt/Vintage.otp differ
diff --git a/extras/source/templates/presnt/Vivid.otp 
b/extras/source/templates/presnt/Vivid.otp
index 5241ef42a983..a52c926414d1 100644
Binary files a/extras/source/templates/presnt/Vivid.otp and 
b/extras/source/templates/presnt/Vivid.otp differ
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - include/unotools officecfg/registry sw/inc sw/source sw/uiconfig unotools/source

2017-05-26 Thread Miklos Vajna
 include/unotools/compatibility.hxx|1 
 officecfg/registry/schema/org/openoffice/Office/Compatibility.xcs |6 ++
 sw/inc/viewsh.hxx |2 
 sw/source/core/layout/paintfrm.cxx|   21 
--
 sw/source/core/view/viewsh.cxx|6 ++
 sw/source/ui/config/optcomp.cxx   |   16 
++-
 sw/uiconfig/swriter/ui/optcompatpage.ui   |1 
 unotools/source/config/compatibility.cxx  |4 +
 8 files changed, 50 insertions(+), 7 deletions(-)

New commits:
commit f85ded43446b17fbfdd868cc057ba39666d3d7cb
Author: Miklos Vajna 
Date:   Fri May 26 18:13:54 2017 +0200

tdf#108056 sw: add UI to disable SubtractFlysAnchoredAtFlys compat option

There is a reason this is off by default, make it a bit more easier for
users to not depend this option when they don't actually need it.

Change-Id: I21c5b942c6021fa21840779e1a9f53055fbf279f
Reviewed-on: https://gerrit.libreoffice.org/38081
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins 

diff --git a/include/unotools/compatibility.hxx 
b/include/unotools/compatibility.hxx
index defbabdf8563..5a4e2f7922ef 100644
--- a/include/unotools/compatibility.hxx
+++ b/include/unotools/compatibility.hxx
@@ -59,6 +59,7 @@ class UNOTOOLS_DLLPUBLIC SvtCompatibilityEntry
 ExpandWordSpace,
 ProtectForm,
 MsWordTrailingBlanks,
+SubtractFlysAnchoredAtFlys,
 
 /* Should be at the end. Do not remove it. */
 INVALID
diff --git a/officecfg/registry/schema/org/openoffice/Office/Compatibility.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Compatibility.xcs
index 90394f22dafe..f71c66205871 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Compatibility.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Compatibility.xcs
@@ -116,6 +116,12 @@
 
 false
   
+  
+
+  Use LibreOffice 4.3 anchoring paint order
+
+false
+  
 
   
   
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index 17fe5f6f2c9f..1678e26eea3e 100644
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -418,6 +418,8 @@ public:
 
 void SetMsWordCompTrailingBlanks( bool _bMsWordCompTrailingBlanks );
 
+void SetSubtractFlysAnchoredAtFlys(bool bSubtractFlysAnchoredAtFlys);
+
 // DOCUMENT COMPATIBILITY FLAGS END
 
 // Calls Idle-formatter of Layout.
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 8ce4de7d028c..7cbcd8b4a689 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -917,6 +917,12 @@ void SwViewShell::SetMsWordCompTrailingBlanks( bool 
_bMsWordCompTrailingBlanks )
 }
 }
 
+void SwViewShell::SetSubtractFlysAnchoredAtFlys(bool 
bSubtractFlysAnchoredAtFlys)
+{
+IDocumentSettingAccess& rIDSA = getIDocumentSettingAccess();
+rIDSA.set(DocumentSettingId::SUBTRACT_FLYS, bSubtractFlysAnchoredAtFlys);
+}
+
 void SwViewShell::Reformat()
 {
 SwWait aWait( *GetDoc()->GetDocShell(), true );
diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx
index 3dc5d377ace0..4feaf12b3684 100644
--- a/sw/source/ui/config/optcomp.cxx
+++ b/sw/source/ui/config/optcomp.cxx
@@ -114,7 +114,8 @@ sal_uLong convertBools2Ulong_Impl
 bool _bConsiderWrappingStyle,
 bool _bExpandWordSpace,
 bool _bProtectForm,
-bool _bMsWordCompTrailingBlanks
+bool _bMsWordCompTrailingBlanks,
+bool bSubtractFlysAnchoredAtFlys
 )
 {
 sal_uLong nRet = 0;
@@ -158,6 +159,9 @@ sal_uLong convertBools2Ulong_Impl
 nSetBit = nSetBit << 1;
 if ( _bMsWordCompTrailingBlanks )
 nRet |= nSetBit;
+nSetBit = nSetBit << 1;
+if (bSubtractFlysAnchoredAtFlys)
+nRet |= nSetBit;
 
 return nRet;
 }
@@ -241,7 +245,8 @@ void SwCompatibilityOptPage::InitControls( const 
SfxItemSet& rSet )
 aEntry.getValue( 
SvtCompatibilityEntry::Index::ConsiderWrappingStyle ),
 aEntry.getValue( 
SvtCompatibilityEntry::Index::ExpandWordSpace ),
 aEntry.getValue( SvtCompatibilityEntry::Index::ProtectForm ),
-aEntry.getValue( 
SvtCompatibilityEntry::Index::MsWordTrailingBlanks ) );
+aEntry.getValue( 
SvtCompatibilityEntry::Index::MsWordTrailingBlanks ),
+aEntry.getValue( 
SvtCompatibilityEntry::Index::SubtractFlysAnchoredAtFlys ) );
 m_pFormattingLB->SetEntryData( nPos, 
reinterpret_cast((sal_IntPtr)nOptions) );
 }
 
@@ -313,7 +318,8 @@ sal_uLong SwCompatibilityOptPage::GetDocumentOptions() const
 rIDocumentSettingAccess.get( 
DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION ),
 !rIDocumentSettingAccess.get( 
DocumentSettingId::DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK ),
 rIDocumentSettingAccess.get( DocumentS

[Libreoffice-commits] core.git: Changes to 'feature/lok_dialog'

2017-05-26 Thread Tomaž Vajngerl
New branch 'feature/lok_dialog' available with the following commits:
commit d6f3d8395ff15d2022159b51eacd79e8e416fce4
Author: Tomaž Vajngerl 
Date:   Fri May 26 22:55:31 2017 +0200

Add IDialogRenderable interface for rendering of dialogs

Change-Id: I1d85729a1ac1a99d33ea2bde1b50ccf4c05ca9a9

commit 0d828a3592ad5b985e54e9df8c601cedca1eb079
Author: Tomaž Vajngerl 
Date:   Fri May 26 22:37:06 2017 +0200

move ITileRenderable implementation to own file

Change-Id: Ib05ecf5f92e0ae4adf99c4dd10d60e730a95cf45

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: Branch 'libreoffice-5-4' - source/text

2017-05-26 Thread Olivier Hallot
 source/text/shared/05/0001.xhp |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 6797c4310d6692464351c23327aac99cfb07
Author: Olivier Hallot 
Date:   Fri May 26 16:19:19 2017 -0300

Fix documentation URL in help page

The URL was outdated.

Change-Id: I6c8de8a7271875fd5d6874aface4130e8e872194
Reviewed-on: https://gerrit.libreoffice.org/38086
Reviewed-by: Olivier Hallot 
Tested-by: Olivier Hallot 

diff --git a/source/text/shared/05/0001.xhp 
b/source/text/shared/05/0001.xhp
index c436c820a..1062c5aaf 100644
--- a/source/text/shared/05/0001.xhp
+++ b/source/text/shared/05/0001.xhp
@@ -57,7 +57,7 @@
 You can 
download the latest version of %PRODUCTNAME at http://www.libreoffice.org/download/";>www.libreoffice.org/download/.
 
 
 Documentation
-You can 
download documentation as PDF files, how-tos, and guides from the %PRODUCTNAME 
documentation website at http://www.libreoffice.org/get-help/documentation/";>documentation.libreoffice.org.
 You can also access the documentation website choosing the menu Help – User Guides… .
+You can 
download documentation as PDF files, how-tos, and guides from the %PRODUCTNAME 
documentation website at http://documentation.libreoffice.org";>documentation.libreoffice.org.
 You can also access the documentation website choosing the menu Help – User Guides… .
 
 Participate and give back
 If 
you want to take an active role in the worldwide %PRODUCTNAME community, you 
are very welcome to give feedback, discuss features, propose enhancements, 
write your own article in an FAQ, how-to, manual, create a video tutorial, 
etc.
@@ -65,4 +65,4 @@
 
 
 
-
\ No newline at end of file
+
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: source/text

2017-05-26 Thread Olivier Hallot
 source/text/shared/05/0001.xhp |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 2d55618673b1db54dd3439f1054413fc71d5a2a0
Author: Olivier Hallot 
Date:   Fri May 26 16:19:19 2017 -0300

Fix documentation URL in help page

The URL was outdated.

Change-Id: I6c8de8a7271875fd5d6874aface4130e8e872194
Reviewed-on: https://gerrit.libreoffice.org/38085
Reviewed-by: Olivier Hallot 
Tested-by: Olivier Hallot 

diff --git a/source/text/shared/05/0001.xhp 
b/source/text/shared/05/0001.xhp
index c436c820a..1062c5aaf 100644
--- a/source/text/shared/05/0001.xhp
+++ b/source/text/shared/05/0001.xhp
@@ -57,7 +57,7 @@
 You can 
download the latest version of %PRODUCTNAME at http://www.libreoffice.org/download/";>www.libreoffice.org/download/.
 
 
 Documentation
-You can 
download documentation as PDF files, how-tos, and guides from the %PRODUCTNAME 
documentation website at http://www.libreoffice.org/get-help/documentation/";>documentation.libreoffice.org.
 You can also access the documentation website choosing the menu Help – User Guides… .
+You can 
download documentation as PDF files, how-tos, and guides from the %PRODUCTNAME 
documentation website at http://documentation.libreoffice.org";>documentation.libreoffice.org.
 You can also access the documentation website choosing the menu Help – User Guides… .
 
 Participate and give back
 If 
you want to take an active role in the worldwide %PRODUCTNAME community, you 
are very welcome to give feedback, discuss features, propose enhancements, 
write your own article in an FAQ, how-to, manual, create a video tutorial, 
etc.
@@ -65,4 +65,4 @@
 
 
 
-
\ No newline at end of file
+
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2017-05-26 Thread Olivier Hallot
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d66700b59dacaf9bb055b222c0380cf91038dc7f
Author: Olivier Hallot 
Date:   Fri May 26 16:19:19 2017 -0300

Updated core
Project: help  2d55618673b1db54dd3439f1054413fc71d5a2a0

Fix documentation URL in help page

The URL was outdated.

Change-Id: I6c8de8a7271875fd5d6874aface4130e8e872194
Reviewed-on: https://gerrit.libreoffice.org/38085
Reviewed-by: Olivier Hallot 
Tested-by: Olivier Hallot 

diff --git a/helpcontent2 b/helpcontent2
index 6024a6602db8..2d55618673b1 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 6024a6602db8841bb67f20789371524f0d067f1c
+Subproject commit 2d55618673b1db54dd3439f1054413fc71d5a2a0
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - helpcontent2

2017-05-26 Thread Olivier Hallot
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3131b156e80ea166b974be3f2d4d59804f7ae199
Author: Olivier Hallot 
Date:   Fri May 26 16:19:19 2017 -0300

Updated core
Project: help  6797c4310d6692464351c23327aac99cfb07

Fix documentation URL in help page

The URL was outdated.

Change-Id: I6c8de8a7271875fd5d6874aface4130e8e872194
Reviewed-on: https://gerrit.libreoffice.org/38086
Reviewed-by: Olivier Hallot 
Tested-by: Olivier Hallot 

diff --git a/helpcontent2 b/helpcontent2
index 4d5d776be8e6..6797c4310d66 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 4d5d776be8e64108d39467db3227565ce1cf14e4
+Subproject commit 6797c4310d6692464351c23327aac99cfb07
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - sc/source

2017-05-26 Thread Justin Luth
 sc/source/ui/vba/vbarange.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit f82a36749a9df51d2344e4acb88f0e53b39f8e72
Author: Justin Luth 
Date:   Wed May 24 12:48:12 2017 +0300

tdf#108049 VBA exception avoided in ScVbaRange::setStyle

Change-Id: I5fc928373d70829b6e68d9000140a30f04179536
Reviewed-on: https://gerrit.libreoffice.org/37981
Tested-by: Jenkins 
Reviewed-by: Justin Luth 
Reviewed-by: Markus Mohrhard 
(cherry picked from commit 4dc3e7d5e9044be66177e467d739bd8be7556783)
Reviewed-on: https://gerrit.libreoffice.org/38063
(cherry picked from commit bb9c240046955c432d963610d5dd99edcc6b43e6)
Reviewed-on: https://gerrit.libreoffice.org/38083
Tested-by: Justin Luth 

diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index af3a4e6c48e1..955d35a2c4e8 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -5270,7 +5270,8 @@ ScVbaRange::setStyle( const uno::Any& _style ) throw 
(uno::RuntimeException, std
 uno::Reference< beans::XPropertySet > xProps( mxRange, 
uno::UNO_QUERY_THROW );
 uno::Reference< excel::XStyle > xStyle;
 _style >>= xStyle;
-xProps->setPropertyValue( CELLSTYLE, uno::makeAny( xStyle->getName() ) );
+if ( xProps.is() && xStyle.is() )
+xProps->setPropertyValue( CELLSTYLE, uno::makeAny( xStyle->getName() ) 
);
 }
 
 uno::Reference< excel::XRange >
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: registry/source

2017-05-26 Thread Chris Sherlock
 registry/source/regimpl.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 94844e60fc7d57352333d78f10bd47fae8adf6f5
Author: Chris Sherlock 
Date:   Fri May 26 22:25:23 2017 +1000

tdf#39468: translate German to English in registry's regimpl.cxx

Change-Id: Ibda59217728c9c959c4648d73005770d27644b77
Reviewed-on: https://gerrit.libreoffice.org/38069
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/registry/source/regimpl.cxx b/registry/source/regimpl.cxx
index aaf9f8f4f164..5499e7b5c7da 100644
--- a/registry/source/regimpl.cxx
+++ b/registry/source/regimpl.cxx
@@ -1526,7 +1526,7 @@ RegError ORegistry::dumpValue(const OUString& sPath, 
const OUString& sName, sal_
 stdout, "%lu = %ld\n",
 sal::static_int_cast< unsigned long >(i),
 sal::static_int_cast< long >(longValue));
-offset += 4; // 4 Bytes fuer sal_Int32
+offset += 4; // 4 Bytes for sal_Int32
 }
 }
 break;
@@ -1551,7 +1551,7 @@ RegError ORegistry::dumpValue(const OUString& sPath, 
const OUString& sName, sal_
 {
 readUINT32(pBuffer+offset, sLen);
 
-offset += 4; // 4 Bytes (sal_uInt32) fuer die Groesse des 
strings in Bytes
+offset += 4; // 4 bytes (sal_uInt32) for the string size
 
 sal_Char *pValue = 
static_cast(rtl_allocateMemory(sLen));
 readUtf8(pBuffer+offset, pValue, sLen);
@@ -1589,7 +1589,7 @@ RegError ORegistry::dumpValue(const OUString& sPath, 
const OUString& sName, sal_
 {
 readUINT32(pBuffer+offset, sLen);
 
-offset += 4; // 4 Bytes (sal_uInt32) fuer die Groesse des 
strings in Bytes
+offset += 4; // 4 bytes (sal_uInt32) for the string size
 
 sal_Unicode *pValue = 
static_cast(rtl_allocateMemory((sLen / 2) * sizeof(sal_Unicode)));
 readString(pBuffer+offset, pValue, sLen);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sc/source

2017-05-26 Thread Justin Luth
 sc/source/ui/vba/vbarange.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit bb9c240046955c432d963610d5dd99edcc6b43e6
Author: Justin Luth 
Date:   Wed May 24 12:48:12 2017 +0300

tdf#108049 VBA exception avoided in ScVbaRange::setStyle

Change-Id: I5fc928373d70829b6e68d9000140a30f04179536
Reviewed-on: https://gerrit.libreoffice.org/37981
Tested-by: Jenkins 
Reviewed-by: Justin Luth 
Reviewed-by: Markus Mohrhard 
(cherry picked from commit 4dc3e7d5e9044be66177e467d739bd8be7556783)
Reviewed-on: https://gerrit.libreoffice.org/38063

diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index bb4164303798..151403fa1f31 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -5311,7 +5311,8 @@ ScVbaRange::setStyle( const uno::Any& _style )
 uno::Reference< beans::XPropertySet > xProps( mxRange, 
uno::UNO_QUERY_THROW );
 uno::Reference< excel::XStyle > xStyle;
 _style >>= xStyle;
-xProps->setPropertyValue( CELLSTYLE, uno::makeAny( xStyle->getName() ) );
+if ( xProps.is() && xStyle.is() )
+xProps->setPropertyValue( CELLSTYLE, uno::makeAny( xStyle->getName() ) 
);
 }
 
 uno::Reference< excel::XRange >
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: net/Socket.cpp net/Socket.hpp

2017-05-26 Thread Michael Meeks
 net/Socket.cpp |4 +++-
 net/Socket.hpp |   16 +++-
 2 files changed, 18 insertions(+), 2 deletions(-)

New commits:
commit c224413a9d013a4253ed66fccb8ee40dc01be8f8
Author: Michael Meeks 
Date:   Fri May 26 15:50:08 2017 +0100

Track bytes recv'd and sent on StreamSockets.

Dump on USR1 as part of our state.

Change-Id: I4c6b87c19bca768402c9b0b8e26f16336e007749

diff --git a/net/Socket.cpp b/net/Socket.cpp
index 06afce83..13424cd3 100644
--- a/net/Socket.cpp
+++ b/net/Socket.cpp
@@ -181,6 +181,7 @@ void WebSocketHandler::dumpState(std::ostream& os)
<< std::setw(5) << 1.0*_pingTimeUs/1000 << "ms ";
 if (_wsPayload.size() > 0)
 dump_hex(os, "\t\tws queued payload:\n", "\t\t", _wsPayload);
+os << "\n";
 }
 
 void StreamSocket::dumpState(std::ostream& os)
@@ -188,7 +189,8 @@ void StreamSocket::dumpState(std::ostream& os)
 int timeoutMaxMs = SocketPoll::DefaultPollTimeoutMs;
 int events = getPollEvents(std::chrono::steady_clock::now(), timeoutMaxMs);
 os << "\t" << getFD() << "\t" << events << "\t"
-   << _inBuffer.size() << "\t" << _outBuffer.size() << "\t";
+   << _inBuffer.size() << "\t" << _outBuffer.size() << "\t"
+   << " r: " << _bytesRecvd << "\t w: " << _bytesSent << "\t";
 _socketHandler->dumpState(os);
 if (_inBuffer.size() > 0)
 dump_hex(os, "\t\tinBuffer:\n", "\t\t", _inBuffer);
diff --git a/net/Socket.hpp b/net/Socket.hpp
index 88e24f05..a7cc426d 100644
--- a/net/Socket.hpp
+++ b/net/Socket.hpp
@@ -31,6 +31,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "common/Common.hpp"
 #include "common/Log.hpp"
@@ -691,7 +692,9 @@ public:
 Socket(fd),
 _socketHandler(std::move(socketHandler)),
 _closed(false),
-_shutdownSignalled(false)
+_shutdownSignalled(false),
+_bytesSent(0),
+_bytesRecvd(0)
 {
 LOG_DBG("StreamSocket ctor #" << fd);
 
@@ -785,6 +788,7 @@ public:
 if (len > 0)
 {
 assert (len <= ssize_t(sizeof(buf)));
+_bytesRecvd += len;
 _inBuffer.insert(_inBuffer.end(), &buf[0], &buf[len]);
 }
 // else poll will handle errors.
@@ -915,6 +919,7 @@ protected:
 
 if (len > 0)
 {
+_bytesSent += len;
 _outBuffer.erase(_outBuffer.begin(), _outBuffer.begin() + len);
 }
 else
@@ -942,6 +947,12 @@ protected:
 
 void dumpState(std::ostream& os) override;
 
+void getStats(uint64_t &sent, uint64_t &recv)
+{
+sent = _bytesSent;
+recv = _bytesRecvd;
+}
+
 protected:
 /// Client handling the actual data.
 std::shared_ptr _socketHandler;
@@ -955,6 +966,9 @@ protected:
 std::vector< char > _inBuffer;
 std::vector< char > _outBuffer;
 
+std::atomic _bytesSent;
+std::atomic _bytesRecvd;
+
 // To be able to access _inBuffer and _outBuffer.
 // TODO we probably need accessors to the _inBuffer & _outBuffer
 // instead of this many friends...
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Import python module

2017-05-26 Thread jan
Hello LibO devs,

I have problems importing a python module.

Context: The main python script is in the folder [my home
directory].config/libreoffice/4/user/Scripts/python/somesubfolder/src
named "Test_embed.py"
Also in this folder, I placed another python file (qdahelpers.py) which
I want to import into Test_embed.py, using "import qdahelpers"

System: Ubuntu 16.04 with LO 5.3

What happens: The main script appears in the Tools/Macros/Run Macro…
dialog (the script to be imported, too). If I run the main Test_embed
via the dialog I get the following message:


> A Scripting Framework error occurred while running the Python script 
> vnd.sun.star.script:myDocEmbed|src|Test_embed.py$Run_Test_embed?language=Python&location=user.
> 
> Message: : No module named 'qdahelpers'
>   File "/usr/lib/libreoffice/program/pythonscript.py", line 998, in getScript
> mod = self.provCtx.getModuleByUrl( fileUri )

Is it not possible to import python files in this way when using them in
Libreoffice? Or is the file executed in another context than the folder
it resides in? If yes, is there a way how I can import nevertheless?

Kind Regards,
 Jan
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: sw/source

2017-05-26 Thread Miklos Vajna
 sw/source/core/doc/notxtfrm.cxx|3 ++-
 sw/source/core/inc/frmtool.hxx |2 ++
 sw/source/core/layout/paintfrm.cxx |   28 
 3 files changed, 16 insertions(+), 17 deletions(-)

New commits:
commit 87d62a6222932d36c91d7b69240c7bccbf4e46be
Author: Miklos Vajna 
Date:   Fri May 26 13:54:27 2017 +0200

tdf#108056 sw SubtractFlys: work with a polypolygon directly

In case the intention is that the clip rectangle should include the
page, except a fly frame, we built a list of rectangles that covered
this area. This introduces the problem if adjacent rectangles don't join
perfectly.

Instead allow lcl_SubtractFlys() to work on a clip state directly, this
way the clip polypolygon will only contain two paths (the page rectangle
and the rectangle of the fly), so rounding errors can't happen.

Change-Id: I5b2e9a382aa7d16f3b16509670de754b5e00bd6d
Reviewed-on: https://gerrit.libreoffice.org/38066
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins 

diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index 87a7b43c9055..4156753cf966 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -186,7 +186,8 @@ static void lcl_ClearArea( const SwFrame &rFrame,
 if ( rFrame.GetBackgroundBrush( aFillAttributes, pItem, pCol, 
aOrigRect, false ) )
 {
 SwRegionRects const region(rPtArea);
-const bool bDone(::DrawFillAttributes(aFillAttributes, aOrigRect, 
region, rOut));
+basegfx::tools::B2DClipState aClipState;
+const bool bDone(::DrawFillAttributes(aFillAttributes, aOrigRect, 
region, aClipState, rOut));
 
 if(!bDone)
 {
diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx
index 81453b10487c..b9093eb523c5 100644
--- a/sw/source/core/inc/frmtool.hxx
+++ b/sw/source/core/inc/frmtool.hxx
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 
 class SwPageFrame;
 class SwFlyFrame;
@@ -68,6 +69,7 @@ bool DrawFillAttributes(
 const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& 
rFillAttributes,
 const SwRect& rOriginalLayoutRect,
 const SwRegionRects& rPaintRegion,
+const basegfx::tools::B2DClipState& rClipState,
 OutputDevice& rOut);
 
 void paintGraphicUsingPrimitivesHelper(
diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index 1cd629dacba3..bb6ca5a7e2eb 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -1533,7 +1533,7 @@ static void lcl_ExtendLeftAndRight( SwRect&   
 _rRect,
 }
 
 static void lcl_SubtractFlys( const SwFrame *pFrame, const SwPageFrame *pPage,
-   const SwRect &rRect, SwRegionRects &rRegion, SwPaintProperties & 
rProperties)
+   const SwRect &rRect, SwRegionRects &rRegion, basegfx::tools::B2DClipState& 
rClipState, SwPaintProperties & rProperties)
 {
 const SwSortedObjs& rObjs = *pPage->GetSortedObjs();
 const SwFlyFrame* pSelfFly = pFrame->IsInFly() ? pFrame->FindFlyFrame() : 
gProp.pSRetoucheFly2;
@@ -1666,6 +1666,7 @@ static void lcl_SubtractFlys( const SwFrame *pFrame, 
const SwPageFrame *pPage,
 const SwBorderAttrs &rAttrs = *aAccess.Get();
 ::lcl_CalcBorderRect( aRect, pFly, rAttrs, true, rProperties );
 rRegion -= aRect;
+rClipState.subtractRange(basegfx::B2DRange(aRect.Left(), 
aRect.Top(), aRect.Right(), aRect.Bottom()));
 continue;
 }
 else
@@ -1683,12 +1684,14 @@ static void lcl_SubtractFlys( const SwFrame *pFrame, 
const SwPageFrame *pPage,
 const SwBorderAttrs &rAttrs = *aAccess.Get();
 ::lcl_CalcBorderRect( aRect, pFly, rAttrs, true, rProperties );
 rRegion -= aRect;
+rClipState.subtractRange(basegfx::B2DRange(aRect.Left(), 
aRect.Top(), aRect.Right(), aRect.Bottom()));
 }
 else
 {
 SwRect aRect( pFly->Prt() );
 aRect += pFly->Frame().Pos();
 rRegion -= aRect;
+rClipState.subtractRange(basegfx::B2DRange(aRect.Left(), 
aRect.Top(), aRect.Right(), aRect.Bottom()));
 }
 }
 if (gProp.pSRetoucheFly == gProp.pSRetoucheFly2)
@@ -1854,6 +1857,7 @@ bool DrawFillAttributes(
 const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& 
rFillAttributes,
 const SwRect& rOriginalLayoutRect,
 const SwRegionRects& rPaintRegion,
+const basegfx::tools::B2DClipState& rClipState,
 vcl::RenderContext& rOut)
 {
 if(rFillAttributes.get() && rFillAttributes->isUsed())
@@ -1916,18 +1920,7 @@ bool DrawFillAttributes(
 // tdf#86578 the awful lcl_SubtractFlys hack
 if (rPaintRegion.size() > 1 || rPaintRegion[0] != 
rPaintRegion.GetOrigin())
 {
-tools::PolyPolygon tempRegion;
-for (size_t

[Libreoffice-commits] core.git: include/sfx2 sfx2/source

2017-05-26 Thread Noel Grandin
 include/sfx2/objsh.hxx  |2 +-
 sfx2/source/doc/objmisc.cxx |   22 +++---
 sfx2/source/doc/objstor.cxx |2 +-
 3 files changed, 21 insertions(+), 5 deletions(-)

New commits:
commit e60529fdfe0502f64e3c975f71539b28146943e8
Author: Noel Grandin 
Date:   Fri May 26 15:44:37 2017 +0200

fix impress slide context menu

regression from 4a340e36e8d3713806719351f455711c1254a178
"loplugin:constantparam"

Change-Id: I3dc34fd438ba7f057e52e888e3ea8053a0b3ea78
Reviewed-on: https://gerrit.libreoffice.org/38073
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index 41845be86310..f3c916c28b1e 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -458,7 +458,7 @@ public:
 
 // Transfer IFace
 boolIsAbortingImport() const;
-voidFinishedLoading();
+voidFinishedLoading( SfxLoadedFlags nWhich = 
SfxLoadedFlags::ALL );
 
 virtual voidSetFormatSpecificCompatibilityOptions( const 
OUString& /*rFilterTypeName*/ ) { /* Do not do anything here; Derived classes 
must overload to do actual work */ };
 
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index f0f20c59ad9e..74a419b93c7f 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -1045,7 +1045,7 @@ void SfxObjectShell::InitOwnModel_Impl()
 }
 }
 
-void SfxObjectShell::FinishedLoading()
+void SfxObjectShell::FinishedLoading( SfxLoadedFlags nFlags )
 {
 std::shared_ptr pFlt = pMedium->GetFilter();
 if( pFlt )
@@ -1055,7 +1055,7 @@ void SfxObjectShell::FinishedLoading()
 
 bool bSetModifiedTRUE = false;
 const SfxStringItem* pSalvageItem = 
SfxItemSet::GetItem(pMedium->GetItemSet(), SID_DOC_SALVAGE, 
false);
-if( !(pImpl->nLoadedFlags & SfxLoadedFlags::MAINDOCUMENT )
+if( ( nFlags & SfxLoadedFlags::MAINDOCUMENT ) && !(pImpl->nLoadedFlags & 
SfxLoadedFlags::MAINDOCUMENT )
 && !(pImpl->nFlagsInProgress & SfxLoadedFlags::MAINDOCUMENT ))
 {
 pImpl->nFlagsInProgress |= SfxLoadedFlags::MAINDOCUMENT;
@@ -1083,7 +1083,23 @@ void SfxObjectShell::FinishedLoading()
 pImpl->nFlagsInProgress &= ~SfxLoadedFlags::MAINDOCUMENT;
 }
 
-pImpl->nLoadedFlags |= SfxLoadedFlags::MAINDOCUMENT;
+if( ( nFlags & SfxLoadedFlags::IMAGES ) && !(pImpl->nLoadedFlags & 
SfxLoadedFlags::IMAGES )
+&& !(pImpl->nFlagsInProgress & SfxLoadedFlags::IMAGES ))
+{
+pImpl->nFlagsInProgress |= SfxLoadedFlags::IMAGES;
+uno::Reference xDocProps(
+getDocProperties());
+const OUString url(xDocProps->getAutoloadURL());
+sal_Int32 delay(xDocProps->getAutoloadSecs());
+SetAutoLoad( INetURLObject(url), delay * 1000,
+ (delay > 0) || !url.isEmpty() );
+if( !bSetModifiedTRUE && IsEnableSetModified() )
+SetModified( false );
+Invalidate( SID_SAVEASDOC );
+pImpl->nFlagsInProgress &= ~SfxLoadedFlags::IMAGES;
+}
+
+pImpl->nLoadedFlags |= nFlags;
 
 if ( pImpl->nFlagsInProgress == SfxLoadedFlags::NONE )
 {
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index f4db742b728e..759cc16b987c 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -830,7 +830,7 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed )
 if ( !( pImpl->nLoadedFlags & SfxLoadedFlags::MAINDOCUMENT ) &&
   ( !pMedium->GetFilter() || pMedium->GetFilter()->UsesStorage() )
 )
-FinishedLoading();
+FinishedLoading( SfxLoadedFlags::MAINDOCUMENT );
 
 if( IsOwnStorageFormat(*pMed) && pMed->GetFilter() )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - forms/source

2017-05-26 Thread Lionel Elie Mamane
 forms/source/component/FormComponent.cxx |   12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)

New commits:
commit bb50f9d66540a87065f30da8fd8cadde8e730704
Author: Lionel Elie Mamane 
Date:   Tue May 9 12:53:25 2017 +0200

tdf#107720 Bound Control initFromField: consider the case of the insert row

loplugin: simplifybool
(cherry picked from commit 95b25532d24bfb08c4846b991451a36475dd439f)

Change-Id: If18e161c994c926fd86453ab5736df1e89bb61de
Reviewed-on: https://gerrit.libreoffice.org/37427
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 

diff --git a/forms/source/component/FormComponent.cxx 
b/forms/source/component/FormComponent.cxx
index 80e85758801c..743f4d47986b 100644
--- a/forms/source/component/FormComponent.cxx
+++ b/forms/source/component/FormComponent.cxx
@@ -1981,7 +1981,17 @@ void OBoundControlModel::initFromField( const Reference< 
XRowSet >& _rxRowSet )
 // but only if the rowset is positioned on a valid record
 if ( hasField() && _rxRowSet.is() )
 {
-if ( !_rxRowSet->isBeforeFirst() && !_rxRowSet->isAfterLast() )
+bool shouldTransfer(!_rxRowSet->isBeforeFirst() && 
!_rxRowSet->isAfterLast());
+if (!shouldTransfer)
+{
+const Reference< XPropertySet > xPS(_rxRowSet, UNO_QUERY);
+if (xPS.is())
+{
+assert(!shouldTransfer);
+xPS->getPropertyValue("IsNew") >>= shouldTransfer;
+}
+}
+if ( shouldTransfer )
 transferDbValueToControl();
 else
 // reset the field if the row set is empty
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2017-05-26 Thread Caolán McNamara
 l10ntools/source/localize.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 8119d0ceb7e5d4c6dba406c998ad05f143f36f67
Author: Caolán McNamara 
Date:   Fri May 26 13:23:53 2017 +0100

writerperfect translations missing

persumably because there were never extracted to be available
for translation

Change-Id: Ib9d37105a41c19898577ba8acec121b87e3af9e5

diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx
index 2dfee48d5e88..2d3265871720 100644
--- a/l10ntools/source/localize.cxx
+++ b/l10ntools/source/localize.cxx
@@ -286,6 +286,7 @@ bool includeProject(const OString& rProject) {
 "uui",
 "vcl",
 "wizards",
+"writerperfect",
 "xmlsecurity" };
 for (size_t i = 0; i != SAL_N_ELEMENTS(projects); ++i) {
 if (rProject == projects[i]) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/source

2017-05-26 Thread Armin Le Grand
 sw/source/uibase/docvw/edtdd.cxx |8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 1b27bed2d5b6915cda408c6f8d27d15bf13cc9be
Author: Armin Le Grand 
Date:   Fri May 26 11:49:58 2017 +0200

tdf#106131 no global drag when anchor drag active

If in Writer dragging the anchor is already active
it is not allowed to enter global object drag mode.
This check was missing and may lead to various
inconsistencies

Change-Id: I7d8dd2a62737e6d5d72f69747ceb21bcb73c45ed
Reviewed-on: https://gerrit.libreoffice.org/38059
Tested-by: Jenkins 
Reviewed-by: Armin Le Grand 

diff --git a/sw/source/uibase/docvw/edtdd.cxx b/sw/source/uibase/docvw/edtdd.cxx
index a355cefa2ca5..57c1d5457e54 100644
--- a/sw/source/uibase/docvw/edtdd.cxx
+++ b/sw/source/uibase/docvw/edtdd.cxx
@@ -85,11 +85,17 @@ void SwEditWin::StartDrag( sal_Int8 /*nAction*/, const 
Point& rPosPixel )
 //We are not selecting and aren't at a selection
 bStart = true;
 else if ( !g_bFrameDrag && rSh.IsSelFrameMode() &&
-rSh.IsInsideSelectedObj( aDocPos ) )
+rSh.IsInsideSelectedObj( aDocPos ) &&
+nullptr == m_pAnchorMarker)
 {
 //We are not dragging internally and are not at an
 //object (frame, draw object)
 
+// #i106131# *and* AnchorDrag is *not* active: When active,
+// entering global drag mode will destroy the AnchorHdl but
+// keep the now invalid ptr in place, next access will crash.
+// It is indeed wrong to enter drag mode when AnchorDrag is
+// already active
 bStart = true;
 }
 else if( !g_bFrameDrag && m_rView.GetDocShell()->IsReadOnly() &&
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - vcl/source

2017-05-26 Thread Caolán McNamara
 vcl/source/opengl/OpenGLContext.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 3e368230eb28cd88a9491f6ca7a16a65e2774263
Author: Caolán McNamara 
Date:   Fri May 26 12:41:10 2017 +0100

Resolves: tdf##108069 2nd OpenGLContext::init should dispose earlier results

Change-Id: If6bb9517a4081576347d71ddf26d020119d34247
(cherry picked from commit 0b9b36cafe29916a9fdeac420a49c174adb10c59)
Reviewed-on: https://gerrit.libreoffice.org/38064
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/vcl/source/opengl/OpenGLContext.cxx 
b/vcl/source/opengl/OpenGLContext.cxx
index 72e7f3cbc32d..541491100bf5 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -234,7 +234,8 @@ bool OpenGLContext::init( vcl::Window* pParent )
 mpWindow = pParent ? pParent : m_xWindow.get();
 if(m_xWindow)
 m_xWindow->setPosSizePixel(0,0,0,0);
-m_pChildWindow = nullptr;
+//tdf#108069 we may be initted twice, so dispose earlier effort
+m_pChildWindow.disposeAndClear();
 initWindow();
 return ImplInit();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/source

2017-05-26 Thread Caolán McNamara
 vcl/source/opengl/OpenGLContext.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 0b9b36cafe29916a9fdeac420a49c174adb10c59
Author: Caolán McNamara 
Date:   Fri May 26 12:41:10 2017 +0100

Resolves: tdf##108069 2nd OpenGLContext::init should dispose earlier results

Change-Id: If6bb9517a4081576347d71ddf26d020119d34247

diff --git a/vcl/source/opengl/OpenGLContext.cxx 
b/vcl/source/opengl/OpenGLContext.cxx
index 72e7f3cbc32d..541491100bf5 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -234,7 +234,8 @@ bool OpenGLContext::init( vcl::Window* pParent )
 mpWindow = pParent ? pParent : m_xWindow.get();
 if(m_xWindow)
 m_xWindow->setPosSizePixel(0,0,0,0);
-m_pChildWindow = nullptr;
+//tdf#108069 we may be initted twice, so dispose earlier effort
+m_pChildWindow.disposeAndClear();
 initWindow();
 return ImplInit();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 9 commits - cui/source filter/source sc/source svx/source sw/source

2017-05-26 Thread Caolán McNamara
 cui/source/options/optjava.cxx  |8 
 filter/source/svg/svgfilter.hxx |   12 
 sc/source/core/tool/compiler.cxx|4 ++--
 sc/source/core/tool/interpr1.cxx|4 +---
 sc/source/ui/docshell/docsh4.cxx|2 +-
 svx/source/form/datanavi.cxx|2 +-
 sw/source/core/edit/edfcol.cxx  |8 ++--
 sw/source/uibase/app/docst.cxx  |4 ++--
 sw/source/uibase/dialog/watermarkdialog.cxx |8 ++--
 9 files changed, 35 insertions(+), 17 deletions(-)

New commits:
commit dd55370d637a2f5d397a0a24ccfbc107b64a4ad1
Author: Caolán McNamara 
Date:   Fri May 26 11:22:02 2017 +0100

coverity#707857 Uninitialized scalar field

Change-Id: I2d51a2e9b56dd0dc57613f305e0834ffb1732de5

diff --git a/filter/source/svg/svgfilter.hxx b/filter/source/svg/svgfilter.hxx
index b4cbac6bf346..5d692a578b32 100644
--- a/filter/source/svg/svgfilter.hxx
+++ b/filter/source/svg/svgfilter.hxx
@@ -133,6 +133,18 @@ struct PagePropertySet
 sal_Int32  nPageNumberingType;
 bool   bIsDateTimeFieldFixed;
 sal_Int32  nDateTimeFormat;
+PagePropertySet()
+: bIsBackgroundVisible(false)
+, bAreBackgroundObjectsVisible(false)
+, bIsPageNumberFieldVisible(false)
+, bIsDateTimeFieldVisible(false)
+, bIsFooterFieldVisible(false)
+, bIsHeaderFieldVisible(false)
+, nPageNumberingType(0)
+, bIsDateTimeFieldFixed(false)
+, nDateTimeFormat(0)
+{
+}
 };
 
 struct HashReferenceXInterface
commit f76b927cc53f677128925e1353e3ecc44f105a77
Author: Caolán McNamara 
Date:   Fri May 26 11:11:14 2017 +0100

coverity#1409894 Dereference after null check

Change-Id: If475a0415c9faf98c978576743dbfdaa79d16d3f

diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index 5a382dbe6fd1..34ef5f81b31b 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -736,7 +736,7 @@ namespace svxform
 SAL_WARN( "svx.form", 
"XFormsPage::DoToolboxAction(): exception caught" );
 }
 }
-else
+else if (pNode)
 {
 try
 {
commit bc28dde1891fd6e3b7ded3f2603aaf63a906
Author: Caolán McNamara 
Date:   Fri May 26 10:39:47 2017 +0100

coverity#1409893 Division or modulo by float zero

Change-Id: I697e9c7772792b02257ed1f40666dd70bb70300c

diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index ec94e4b88a4e..16b2dcaf7689 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -404,8 +404,12 @@ void SwEditShell::SetWatermark(const SfxWatermarkItem& 
rWatermark)
 OutputDevice* pOut = Application::GetDefaultDevice();
 vcl::Font aFont(pOut->GetFont());
 aFont.SetFamilyName(sFont);
-fRatio = aFont.GetFontSize().Height();
-fRatio /= pOut->GetTextWidth(rWatermark.GetText());
+auto nTextWidth = pOut->GetTextWidth(rWatermark.GetText());
+if (nTextWidth)
+{
+fRatio = aFont.GetFontSize().Height();
+fRatio /= nTextWidth;
+}
 
 // Calc the size.
 sal_Int32 nWidth = 0;
commit a74c796865f434f6e7a8806667381d325491092b
Author: Caolán McNamara 
Date:   Fri May 26 11:17:18 2017 +0100

coverity#1242834 Unused value

and

coverity#1242871 Unused value
coverity#1242900 Unused value

Change-Id: Ic8c9afa5ac9ea9de661f15403646424486901696

diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 93e38013d35c..0c5d3877bf20 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -597,7 +597,7 @@ bool SvxJavaOptionsPage::FillItemSet( SfxItemSet* 
/*rCoreSet*/ )
 if ( m_pParamDlg )
 {
 eErr = jfw_setVMParameters( m_pParamDlg->GetParameters() );
-SAL_WARN_IF(JFW_E_NONE != eErr, "cui.options", 
"SvxJavaOptionsPage::FillItemSet(): error in jfw_setVMParameters");
+SAL_WARN_IF(JFW_E_NONE != eErr, "cui.options", 
"SvxJavaOptionsPage::FillItemSet(): error in jfw_setVMParameters"); (void)eErr;
 bModified = true;
 }
 
@@ -607,7 +607,7 @@ bool SvxJavaOptionsPage::FillItemSet( SfxItemSet* 
/*rCoreSet*/ )
 if ( m_pPathDlg->GetOldPath() != sPath )
 {
 eErr = jfw_setUserClassPath( sPath );
-SAL_WARN_IF(JFW_E_NONE != eErr, "cui.options", 
"SvxJavaOptionsPage::FillItemSet(): error in jfw_setUserClassPath");
+SAL_WARN_IF(JFW_E_NONE != eErr, "cui.options", 
"SvxJavaOptionsPage::FillItemSet(): error in jfw_setUserClassPath"); (void)eErr;
 bModified = true;
 }
 }
@@ -638,7 +638,7 @@ bool SvxJavaO

[Libreoffice-commits] core.git: sw/source

2017-05-26 Thread Justin Luth
 sw/source/core/table/swtable.cxx |   27 ---
 1 file changed, 24 insertions(+), 3 deletions(-)

New commits:
commit dae134cd793b96126aab4029f1ea83faf51d4f58
Author: Justin Luth 
Date:   Sat Jan 7 16:53:44 2017 +0300

tdf#74177 Writer table: refresh formula without losing comments

The presence of an annotation anchor was causing number replacement
to fail in Writer's table cells.  The formula's value was not
recognized as a replaceable number, so the originally computed
value remained in the cell, regardless of whether the formula's
value changed.

Allowing the value to change needs to avoid losing the comments,
so the majority of this fix is to preserve the comments.

This is not recognized as "fixed" during document loading since
the table/formulas are not refreshed at load time.
Only documents saved with incorrect results will notice this,
and any cursor access inside the table will cause a refresh.
Printing also causes a refresh (but not print preview or PDF export).

So this patch only fixes document creation or modification, which
should be adequate for this bug.

Change-Id: I6f11d62c2d56e6b0f6a37371dd5aaef28d525e25
Reviewed-on: https://gerrit.libreoffice.org/32910
Tested-by: Jenkins 
Reviewed-by: Mike Kaganski 

diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index 96d58d982162..d122f66fc4e9 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -2016,17 +2016,18 @@ void ChgTextToNum( SwTableBox& rBox, const OUString& 
rText, const Color* pCol,
 
 if( pTNd->GetText() != rText )
 {
-// Exchange text. Bugfix to keep Tabs (front and back!)
+// Exchange text. Bugfix to keep Tabs (front and back!) and 
annotations (inword comment anchors)
 const OUString& rOrig = pTNd->GetText();
 sal_Int32 n;
 
-for( n = 0; n < rOrig.getLength() && '\x9' == rOrig[n]; ++n )
+for( n = 0; n < rOrig.getLength() && ('\x9' == rOrig[n] || 
CH_TXTATR_INWORD == rOrig[n]); ++n )
 ;
 for( ; n < rOrig.getLength() && '\x01' == rOrig[n]; ++n )
 ;
 SwIndex aIdx( pTNd, n );
-for( n = rOrig.getLength(); n && '\x9' == rOrig[--n]; )
+for( n = rOrig.getLength(); n && ('\x9' == rOrig[--n] || 
CH_TXTATR_INWORD == rOrig[n]); )
 ;
+sal_Int32 nEndPos = n;
 n -= aIdx.GetIndex() - 1;
 
 // Reset DontExpand-Flags before exchange, to retrigger expansion
@@ -2041,6 +2042,22 @@ void ChgTextToNum( SwTableBox& rBox, const OUString& 
rText, const Color* pCol,
 pDoc->getIDocumentRedlineAccess().DeleteRedline(aTemp, true, 
USHRT_MAX);
 }
 
+// preserve comments inside of the number by deleting number 
portions starting from the back
+sal_Int32 nCommentPos = pTNd->GetText().lastIndexOf( 
CH_TXTATR_INWORD, nEndPos );
+while( nCommentPos > aIdx.GetIndex() )
+{
+pTNd->EraseText( SwIndex(pTNd, nCommentPos+1), nEndPos - 
nCommentPos, SwInsertFlags::EMPTYEXPAND );
+// find the next non-sequential comment anchor
+do
+{
+nEndPos = nCommentPos;
+n = nEndPos - aIdx.GetIndex();
+nCommentPos = pTNd->GetText().lastIndexOf( 
CH_TXTATR_INWORD, nEndPos );
+--nEndPos;
+}
+while( nCommentPos > aIdx.GetIndex() && nCommentPos == nEndPos 
);
+}
+
 pTNd->EraseText( aIdx, n, SwInsertFlags::EMPTYEXPAND );
 pTNd->InsertText( rText, aIdx, SwInsertFlags::EMPTYEXPAND );
 
@@ -2491,6 +2508,10 @@ sal_uLong SwTableBox::IsValidNumTextNd( bool bCheckAttr 
) const
 continue;
 }
 }
+else if( RES_TXTATR_ANNOTATION == pAttr->Which() )
+{
+continue;
+}
 nPos = ULONG_MAX;
 break;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - 2 commits - filter/source

2017-05-26 Thread Julien Nabet
 filter/source/xslt/odf2xhtml/export/xhtml/body.xsl |   14 --
 1 file changed, 12 insertions(+), 2 deletions(-)

New commits:
commit 6ee4771aff5d756f45014b88aebbcfb25b5cadfe
Author: Julien Nabet 
Date:   Wed May 17 00:13:18 2017 +0200

Related tdf#107696: deal with non empty header without number

See first case of 
https://bugs.documentfoundation.org/show_bug.cgi?id=107696#c11

Change-Id: Ic76301cb10ae891901be7dd5a385356c1cc0523b
Reviewed-on: https://gerrit.libreoffice.org/37694
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 
(cherry picked from commit 296c2296f5565556eea9fab51563050f28bbcafc)
Reviewed-on: https://gerrit.libreoffice.org/37792
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 

diff --git a/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl 
b/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
index a8edf4b14167..34bb181db569 100644
--- a/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
+++ b/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
@@ -1222,7 +1222,7 @@



-   
+   
 

commit 9b4c1e9d85445f4ddfb45359ad661d4826fe6a3c
Author: Julien Nabet 
Date:   Mon May 15 22:03:02 2017 +0200

tdf#107696: fix exports Heading style numbers

by taking into account text:is-list-header="true"
(thank you for having pointing at this attribute of header Regina!)

Change-Id: Ia0d9e0042e7ca3f31284c85f6b5336e1434bc0e6
Reviewed-on: https://gerrit.libreoffice.org/37655
Tested-by: Jenkins 
Reviewed-by: Julien Nabet 
(cherry picked from commit d67747c59c22e0346e13560810b9f3bf6c698428)
Reviewed-on: https://gerrit.libreoffice.org/37661
Reviewed-by: Michael Stahl 

diff --git a/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl 
b/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
index 7e9eb59734db..a8edf4b14167 100644
--- a/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
+++ b/filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
@@ -1416,14 +1416,24 @@

 

+   
+   

-   
+   






+   
+   
+   
+   
+   
+   
+   
+   



___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/source

2017-05-26 Thread Justin Luth
 sc/source/ui/vba/vbarange.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 4dc3e7d5e9044be66177e467d739bd8be7556783
Author: Justin Luth 
Date:   Wed May 24 12:48:12 2017 +0300

tdf#108049 VBA exception avoided in ScVbaRange::setStyle

Change-Id: I5fc928373d70829b6e68d9000140a30f04179536
Reviewed-on: https://gerrit.libreoffice.org/37981
Tested-by: Jenkins 
Reviewed-by: Justin Luth 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index bb4164303798..151403fa1f31 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -5311,7 +5311,8 @@ ScVbaRange::setStyle( const uno::Any& _style )
 uno::Reference< beans::XPropertySet > xProps( mxRange, 
uno::UNO_QUERY_THROW );
 uno::Reference< excel::XStyle > xStyle;
 _style >>= xStyle;
-xProps->setPropertyValue( CELLSTYLE, uno::makeAny( xStyle->getName() ) );
+if ( xProps.is() && xStyle.is() )
+xProps->setPropertyValue( CELLSTYLE, uno::makeAny( xStyle->getName() ) 
);
 }
 
 uno::Reference< excel::XRange >
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] cppunit.git: .gitreview

2017-05-26 Thread David Tardon
 .gitreview |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit c29651571c5e6e52dda92b85210c8ab9026a79fb
Author: David Tardon 
Date:   Fri May 26 12:40:03 2017 +0200

set up git-review

diff --git a/.gitreview b/.gitreview
new file mode 100644
index 000..ca53288
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,7 @@
+[gerrit]
+host=logerrit
+port=29418
+project=cppunit
+defaultremote=logerrit
+defaultbranch=master
+
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - sc/qa sc/source

2017-05-26 Thread Justin Luth
 sc/qa/unit/data/xlsb/tdf108017_calcProtection.xlsb |binary
 sc/qa/unit/subsequent_export-test.cxx  |   37 ++---
 sc/source/filter/oox/worksheetsettings.cxx |   30 -
 3 files changed, 41 insertions(+), 26 deletions(-)

New commits:
commit 4fbb8ad023c95266ce0882cd28bdf6703f5b67bf
Author: Justin Luth 
Date:   Tue May 23 15:35:13 2017 +0300

tdf#108017 xlsb import: protection settings were reversed

Back in LO4.3, commit 5728a56b20e01d6c9e86a23f20af64a1b68ad604
fdo#70499 selectn of lock/unlocked cells with worksheet protection reversed

...reversed finalizeImport's understanding of maSheetProt.* to match
xml import, but then it no longer matched the binary stream import.
So, .xlsb imported the opposite of what .xlsx/.xlsm imported.

Reviewed-on: https://gerrit.libreoffice.org/37952
Tested-by: Jenkins 
Reviewed-by: Justin Luth 
Reviewed-by: Markus Mohrhard 
(cherry picked from commit 0d3fcbf809852aab0d0f88272bbfd2e8507d1c5e)
Reviewed-on: https://gerrit.libreoffice.org/38041

Change-Id: I2da3967ef52187e4ef36ce7d01b17a4672f61e1c
Reviewed-on: https://gerrit.libreoffice.org/38052
Tested-by: Jenkins 
Reviewed-by: Justin Luth 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/qa/unit/data/xlsb/tdf108017_calcProtection.xlsb 
b/sc/qa/unit/data/xlsb/tdf108017_calcProtection.xlsb
new file mode 100644
index ..31661ba009a8
Binary files /dev/null and b/sc/qa/unit/data/xlsb/tdf108017_calcProtection.xlsb 
differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx 
b/sc/qa/unit/subsequent_export-test.cxx
index 7060520294d8..9ffcdd7e7223 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -123,6 +123,7 @@ public:
 
 void testFormulaReferenceXLS();
 void testSheetProtectionXLSX();
+void testSheetProtectionXLSB();
 
 void testCellBordersXLS();
 void testCellBordersXLSX();
@@ -223,6 +224,7 @@ public:
 
 CPPUNIT_TEST(testFormulaReferenceXLS);
 CPPUNIT_TEST(testSheetProtectionXLSX);
+CPPUNIT_TEST(testSheetProtectionXLSB);
 CPPUNIT_TEST(testCellBordersXLS);
 CPPUNIT_TEST(testCellBordersXLSX);
 CPPUNIT_TEST(testBordersExchangeXLSX);
@@ -1912,19 +1914,32 @@ void ScExportTest::testSheetProtectionXLSX()
 ScDocument& rDoc = xDocSh->GetDocument();
 const ScTableProtection* pTabProtect = rDoc.GetTabProtection(0);
 CPPUNIT_ASSERT(pTabProtect);
-if ( pTabProtect )
+Sequence aHash = pTabProtect->getPasswordHash(PASSHASH_XL);
+// check has
+if (aHash.getLength() >= 2)
 {
-Sequence aHash = pTabProtect->getPasswordHash(PASSHASH_XL);
-// check has
-if (aHash.getLength() >= 2)
-{
-CPPUNIT_ASSERT_EQUAL(sal_uInt8(204), (sal_uInt8)aHash[0]);
-CPPUNIT_ASSERT_EQUAL(sal_uInt8(61), (sal_uInt8)aHash[1]);
-}
-// we could flesh out this check I guess
-CPPUNIT_ASSERT ( !pTabProtect->isOptionEnabled( 
ScTableProtection::OBJECTS ) );
-CPPUNIT_ASSERT ( !pTabProtect->isOptionEnabled( 
ScTableProtection::SCENARIOS ) );
+CPPUNIT_ASSERT_EQUAL(sal_uInt8(204), (sal_uInt8)aHash[0]);
+CPPUNIT_ASSERT_EQUAL(sal_uInt8(61), (sal_uInt8)aHash[1]);
 }
+// we could flesh out this check I guess
+CPPUNIT_ASSERT ( !pTabProtect->isOptionEnabled( ScTableProtection::OBJECTS 
) );
+CPPUNIT_ASSERT ( !pTabProtect->isOptionEnabled( 
ScTableProtection::SCENARIOS ) );
+xDocSh->DoClose();
+}
+
+void ScExportTest::testSheetProtectionXLSB()
+{
+ScDocShellRef xShell = loadDoc("tdf108017_calcProtection.", FORMAT_XLSB);
+CPPUNIT_ASSERT(xShell.Is());
+
+ScDocShellRef xDocSh = saveAndReload(xShell.get(), FORMAT_XLSX);
+CPPUNIT_ASSERT(xDocSh.Is());
+
+ScDocument& rDoc = xDocSh->GetDocument();
+const ScTableProtection* pTabProtect = rDoc.GetTabProtection(0);
+CPPUNIT_ASSERT(pTabProtect);
+CPPUNIT_ASSERT(pTabProtect->isOptionEnabled( 
ScTableProtection::SELECT_UNLOCKED_CELLS ));
+CPPUNIT_ASSERT(!pTabProtect->isOptionEnabled( 
ScTableProtection::SELECT_LOCKED_CELLS ));
 xDocSh->DoClose();
 }
 
diff --git a/sc/source/filter/oox/worksheetsettings.cxx 
b/sc/source/filter/oox/worksheetsettings.cxx
index 1bbc7a82cbd3..ca956382dc7b 100644
--- a/sc/source/filter/oox/worksheetsettings.cxx
+++ b/sc/source/filter/oox/worksheetsettings.cxx
@@ -215,21 +215,21 @@ void WorksheetSettings::importSheetProtection( 
SequenceInputStream& rStrm )
 maSheetProt.mnPasswordHash = rStrm.readuInt16();
 // no flags field for all these boolean flags?!?
 maSheetProt.mbSheet= rStrm.readInt32() != 0;
-maSheetProt.mbObjects  = rStrm.readInt32() != 0;
-maSheetProt.mbScenarios= rStrm.readInt32() != 0;
-maSheetProt.mbFormatCells  = rStrm.readInt32() != 0;
-maSheetProt.mbFormatColumns= rStrm.readInt32() != 0;
-maSheetProt.mbFormatRows   = rStrm

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - common/Util.cpp common/Util.hpp tools/Config.cpp wsd/FileServer.cpp

2017-05-26 Thread Pranav Kant
 common/Util.cpp|   21 +
 common/Util.hpp|2 ++
 tools/Config.cpp   |1 +
 wsd/FileServer.cpp |   46 ++
 4 files changed, 66 insertions(+), 4 deletions(-)

New commits:
commit 711ee96432e40fe6b1432672afa440c07a5a0090
Author: Pranav Kant 
Date:   Thu May 25 01:07:20 2017 +0530

admin-console: Check the password against hashed value in config

The new password hash property is called secure_password in the config
file. `loolconfig` tool should be used to set the password hash in
appropriate format with desired salt length, password length, number of
iterations in PBKDF2.

To be backward compatible, plain-text password for admin-console in
config file is still accepted in case secure_password property is
missing from the config file.

Change-Id: If22dac62856e368555c0242c4aa6f8061fba
(cherry picked from commit 7a4bc5b95a9722a23048a7cd076bd1c4a954a9e9)
Reviewed-on: https://gerrit.libreoffice.org/38019
Reviewed-by: Michael Meeks 
Reviewed-by: pranavk 
Tested-by: pranavk 

diff --git a/common/Util.cpp b/common/Util.cpp
index 612f971e..23a74c6f 100644
--- a/common/Util.cpp
+++ b/common/Util.cpp
@@ -111,6 +111,27 @@ namespace Util
 }
 }
 
+bool dataFromHexString(const std::string& hexString, std::vector& data)
+{
+if (hexString.length() % 2 != 0)
+{
+return false;
+}
+
+data.clear();
+std::stringstream stream;
+unsigned value;
+for (unsigned offset = 0; offset < hexString.size(); offset += 2)
+{
+stream.clear();
+stream << std::hex << hexString.substr(offset, 2);
+stream >> value;
+data.push_back(static_cast(value));
+}
+
+return true;
+}
+
 std::string encodeId(const unsigned number, const int padding)
 {
 std::ostringstream oss;
diff --git a/common/Util.hpp b/common/Util.hpp
index 63bffc97..22173634 100644
--- a/common/Util.hpp
+++ b/common/Util.hpp
@@ -42,6 +42,8 @@ namespace Util
 std::string getFilename(const size_t length);
 }
 
+/// Hex to unsigned char
+bool dataFromHexString(const std::string& hexString, std::vector& data);
 /// Encode an integral ID into a string, with padding support.
 std::string encodeId(const unsigned number, const int padding = 5);
 /// Decode an integral ID from a string.
diff --git a/tools/Config.cpp b/tools/Config.cpp
index 60be997c..1692453d 100644
--- a/tools/Config.cpp
+++ b/tools/Config.cpp
@@ -216,6 +216,7 @@ int Config::main(const std::vector& args)
 
 std::cout << "Saving configuration to : " << ConfigFile << " ..." 
<< std::endl;
 _loolConfig.save(ConfigFile);
+std::cout << "Saved" << std::endl;
 }
 }
 
diff --git a/wsd/FileServer.cpp b/wsd/FileServer.cpp
index db7a38e3..058f6816 100644
--- a/wsd/FileServer.cpp
+++ b/wsd/FileServer.cpp
@@ -9,9 +9,12 @@
 
 #include "config.h"
 
+#include 
 #include 
 #include 
 
+#include 
+
 #include 
 #include 
 #include 
@@ -32,6 +35,7 @@
 #include "Auth.hpp"
 #include "Common.hpp"
 #include "FileServer.hpp"
+#include "Protocol.hpp"
 #include "LOOLWSD.hpp"
 #include "Log.hpp"
 
@@ -70,18 +74,52 @@ bool FileServerRequestHandler::isAdminLoggedIn(const 
HTTPRequest& request,
 LOG_INF("No existing JWT cookie found");
 }
 
+HTTPBasicCredentials credentials(request);
+std::string userProvidedPwd = credentials.getPassword();
+
 // If no cookie found, or is invalid, let admin re-login
-const auto user = config.getString("admin_console.username", "");
-const auto pass = config.getString("admin_console.password", "");
+const std::string user = config.getString("admin_console.username", "");
+std::string pass = config.getString("admin_console.password", "");
+if (config.has("admin_console.secure_password"))
+{
+pass = config.getString("admin_console.secure_password");
+// Extract the salt from the config
+std::vector saltData;
+std::vector tokens = LOOLProtocol::tokenize(pass, '.');
+if (tokens.size() != 5 ||
+tokens[0] != "pbkdf2" ||
+tokens[1] != "sha512" ||
+!Util::dataFromHexString(tokens[3], saltData))
+{
+LOG_ERR("Incorrect format detected for secure_password in config 
file."
+<< "Denying access until correctly set."
+<< "Use loolconfig to configure admin password.");
+return false;
+}
+
+unsigned char userProvidedPwdHash[tokens[4].size() / 2];
+PKCS5_PBKDF2_HMAC(userProvidedPwd.c_str(), -1,
+  saltData.data(), saltData.size(),
+  std::stoi(tokens[2]),
+  EVP_sha512(),
+  sizeof userProvidedPwdHash, userProvidedPwdHash);
+
+ 

[Libreoffice-commits] core.git: 2 commits - sdext/source sw/source

2017-05-26 Thread Michael Stahl
 sdext/source/presenter/PresenterTextView.cxx |9 -
 sw/source/core/para/paratr.cxx   |2 +-
 2 files changed, 9 insertions(+), 2 deletions(-)

New commits:
commit 0f2981329c6b2cf409a506ad10f1485a8fc7d686
Author: Michael Stahl 
Date:   Fri May 26 11:36:31 2017 +0200

sdext: coverity#1409900 Uncaught exception

Change-Id: I45e277440718b9d173f164eaaa3112f4c474aa3a

diff --git a/sdext/source/presenter/PresenterTextView.cxx 
b/sdext/source/presenter/PresenterTextView.cxx
index ca48c6f15f4f..39ad5591c4b9 100644
--- a/sdext/source/presenter/PresenterTextView.cxx
+++ b/sdext/source/presenter/PresenterTextView.cxx
@@ -1086,7 +1086,14 @@ PresenterTextCaret::PresenterTextCaret (
 
 PresenterTextCaret::~PresenterTextCaret()
 {
-HideCaret();
+try
+{
+HideCaret();
+}
+catch (uno::Exception const&)
+{
+SAL_WARN("sdext.presenter", "unexpected exception in 
~PresenterTextCaret");
+}
 }
 
 void PresenterTextCaret::ShowCaret()
commit 40587c191ecf6ec667f40e9148c197246e3c45a5
Author: Michael Stahl 
Date:   Fri May 26 11:25:06 2017 +0200

sw: coverity#1409899 Null pointer dereferences

Change-Id: I152def3c629980aedb705ac511f154cc6e9d1b0f

diff --git a/sw/source/core/para/paratr.cxx b/sw/source/core/para/paratr.cxx
index aa76115b6528..c5eb8ecefb36 100644
--- a/sw/source/core/para/paratr.cxx
+++ b/sw/source/core/para/paratr.cxx
@@ -64,7 +64,7 @@ SwFormatDrop::~SwFormatDrop()
 
 void SwFormatDrop::SetCharFormat( SwCharFormat *pNew )
 {
-assert(!pNew->IsDefault()); // expose cases that lead to use-after-free
+assert(!pNew || !pNew->IsDefault()); // expose cases that lead to 
use-after-free
 // Rewire
 if ( GetRegisteredIn() )
 GetRegisteredInNonConst()->Remove( this );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - wsd/ClientSession.cpp wsd/reference.txt

2017-05-26 Thread Pranav Kant
 wsd/ClientSession.cpp |4 ++--
 wsd/reference.txt |8 +++-
 2 files changed, 5 insertions(+), 7 deletions(-)

New commits:
commit e2287e5c83a9bc8f66a08f4092ba4953afa7c42d
Author: Pranav Kant 
Date:   Thu May 25 14:11:33 2017 +0530

wsd: Only disable copying when DisableCopy is mentioned

Earlier, DisableCopy was a misnomer disabling both copy and paste. Now
it only disables copy from the document but allows pasting into the
document.

Change-Id: I8ddfdd493918331276f0656468d3b94c4283fa4d
(cherry picked from commit 1a1ab5fd5751f9d6353bb91be918e96cf9c53b90)
Reviewed-on: https://gerrit.libreoffice.org/38016
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 

diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp
index 2fbd221c..026b0513 100644
--- a/wsd/ClientSession.cpp
+++ b/wsd/ClientSession.cpp
@@ -418,12 +418,12 @@ bool ClientSession::filterMessage(const std::string& 
message) const
 LOG_WRN("No value of id in downloadas message");
 }
 }
-else if (tokens[0] == "gettextselection" || tokens[0] == "paste" || 
tokens[0] == "insertfile")
+else if (tokens[0] == "gettextselection")
 {
 if (_wopiFileInfo && _wopiFileInfo->_disableCopy)
 {
 allowed = false;
-LOG_WRN("WOPI host has disabled copying to/from the document");
+LOG_WRN("WOPI host has disabled copying from the document");
 }
 }
 else if (isReadOnly())
diff --git a/wsd/reference.txt b/wsd/reference.txt
index e1af6d4b..5c706621 100644
--- a/wsd/reference.txt
+++ b/wsd/reference.txt
@@ -41,11 +41,9 @@ DisableExport
HideExportOption is assumed to be true
 
 DisableCopy
-   Disables copy/paste from/to the document in libreoffice online backend.
-   However, it is still possible to do an "internal" cut/copy/paste i.e
-   copy from the document and paste to the same document view. The context
-   menu options pertaining to cut/copy/paste would be renamed to 'Internal
-   Cut/Copy/Paste' when this option is mentioned.
+   Disables copying from the document in libreoffice online
+   backend. Pasting into the document would still be possible.
+   However, it is still possible to do an "internal" cut/copy/paste.
 
 EnableOwnerTermination
If set to true, it allows the document owner (the one with OwnerId =
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - .gitignore Makefile.am tools/Config.cpp

2017-05-26 Thread Pranav Kant
 .gitignore   |1 
 Makefile.am  |4 
 tools/Config.cpp |  228 +++
 3 files changed, 232 insertions(+), 1 deletion(-)

New commits:
commit ff553c6d542d0f9323c28edc3bf5fce99e185b8b
Author: Pranav Kant 
Date:   Wed May 24 14:22:24 2017 +0530

loolconfig: tool to generate admin password hash with PBKDF2

A normal usage to set the admin password would be like :

loolconfig set-admin-password --config-file ./loolwsd.xml

Other command line options can also be given, like --pwd-salt-length,
--pwd-hash-length, --pwd-iterations.

Change-Id: I2a6f8d25e068b53a3f945426f0779c8410b2c8ba
(cherry picked from commit 9bd89e89c31c6e0864bcfa5f550fdbf2e1cd9a49)
Reviewed-on: https://gerrit.libreoffice.org/38018
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 

diff --git a/.gitignore b/.gitignore
index 6eaa7f0f..1af727aa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -54,6 +54,7 @@ loolmount
 loolmap
 looltool
 loolstress
+loolconfig
 loolforkit-nocaps
 loadtest
 unittest
diff --git a/Makefile.am b/Makefile.am
index 0ccabbae..cff7e2ff 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,7 +2,7 @@ SUBDIRS = . test loleaflet
 
 export ENABLE_DEBUG
 
-bin_PROGRAMS = loolwsd loolforkit loolmap loolmount looltool loolstress
+bin_PROGRAMS = loolwsd loolforkit loolmap loolmount looltool loolstress 
loolconfig
 
 dist_bin_SCRIPTS = loolwsd-systemplate-setup
 
@@ -134,6 +134,8 @@ loolstress_SOURCES = tools/Stress.cpp \
  common/Log.cpp \
 common/Util.cpp
 
+loolconfig_SOURCES = tools/Config.cpp
+
 wsd_headers = wsd/Admin.hpp \
   wsd/AdminModel.hpp \
   wsd/Auth.hpp \
diff --git a/tools/Config.cpp b/tools/Config.cpp
new file mode 100644
index ..60be997c
--- /dev/null
+++ b/tools/Config.cpp
@@ -0,0 +1,228 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "config.h"
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "Util.hpp"
+
+using Poco::Util::Application;
+using Poco::Util::Option;
+using Poco::Util::OptionSet;
+using Poco::Util::XMLConfiguration;
+
+#define MIN_PWD_SALT_LENGTH 20
+#define MIN_PWD_ITERATIONS 1000
+#define MIN_PWD_HASH_LENGTH 20
+
+class LoolConfig final: public XMLConfiguration
+{
+public:
+LoolConfig() :
+XMLConfiguration()
+{}
+};
+
+struct AdminConfig
+{
+unsigned pwdSaltLength = 128;
+unsigned pwdIterations = 1;
+unsigned pwdHashLength = 128;
+};
+
+// Config tool to change loolwsd configuration (loolwsd.xml)
+class Config: public Application
+{
+// Display help information on the console
+void displayHelp();
+
+LoolConfig _loolConfig;
+
+AdminConfig _adminConfig;
+
+public:
+static std::string ConfigFile;
+
+protected:
+void defineOptions(OptionSet&) override;
+void handleOption(const std::string&, const std::string&) override;
+int main(const std::vector&) override;
+};
+
+std::string Config::ConfigFile = LOOLWSD_CONFIGDIR "/loolwsd.xml";
+
+void Config::displayHelp()
+{
+std::cout << "loolconfig - Configuration tool for LibreOffice Online." << 
std::endl
+  << "Commands:" << std::endl
+  << "  set-admin-password" << std::endl;
+}
+
+void Config::defineOptions(OptionSet& optionSet)
+{
+Application::defineOptions(optionSet);
+
+optionSet.addOption(Option("help", "", "Config helper tool to set loolwsd 
configuration")
+.required(false)
+.repeatable(false));
+optionSet.addOption(Option("pwd-salt-length", "", "Length of the salt to 
use to hash password")
+.required(false)
+.repeatable(false).
+argument("number"));
+optionSet.addOption(Option("pwd-iterations", "", "Number of iterations to 
do in PKDBF2 password hashing")
+.required(false)
+.repeatable(false)
+.argument("number"));
+optionSet.addOption(Option("pwd-hash-length", "", "Length of password hash 
to generate")
+.required(false)
+.repeatable(false)
+.argument("number"));
+optionSet.addOption(Option("config-file", "", "Specify configuration file 
path manually.")
+.required(false)
+.repeatable(false)
+.argument("path"));
+}
+
+void Config::handleOption(const std::string& optionName, const std::string& 
optionValue)
+{

Re: VclPtr tweaks post 5.4.2 ...

2017-05-26 Thread Julien Nabet

On 26/05/2017 11:23, Michael Meeks wrote:

Hi guys,

Seems like people think this is a good idea; so here is what is planned
- I'd love some help with it when we're post 5.4.2 - (it's a big change
so avoiding hurting back-porting is important - with ~3k sites all over
the code).

Three reasonably simple changes:

replace:VclPtrInstance pFoo( pParent );
with:   auto pFoo = VclPtr::Create( pParent );

replace:ScopedVclPtrInstance pFoo( pParent );
with:   auto pFoo = ScopedVclPtr::Create( pParent );

s/ScopedVclPtr/VclPtrAutoDispose/g

Unless we come up with a better name for the last sed; one suggestion
was 'guard' but guards are released - not disposed; unsure if there is a
similar UNO helper concept - Stephan ?

Hi,

To be sure we don't mixup the replace patterns, we should begin with 2nd 
replace (ScopedVclPtrInstance).

Here's a regexp:
sed -e 's/ScopedVclPtrInstance<\(.*\)>[ ]\(.*\)([ ]*pParent[ ]*)/auto \2 
= ScopedVclPtr<\1>::Create(pParent)/g'


For VclPtrInstance one:
sed -e 's/VclPtrInstance<\(.*\)>[ ]\(.*\)([ ]*pParent[ ]*)/auto \2 = 
VclPtr<\1>::Create(pParent)/g'


Julien
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


VclPtr tweaks post 5.4.2 ...

2017-05-26 Thread Michael Meeks
Hi guys,

Seems like people think this is a good idea; so here is what is planned
- I'd love some help with it when we're post 5.4.2 - (it's a big change
so avoiding hurting back-porting is important - with ~3k sites all over
the code).

Three reasonably simple changes:

replace:VclPtrInstance pFoo( pParent );
with:   auto pFoo = VclPtr::Create( pParent );

replace:ScopedVclPtrInstance pFoo( pParent );
with:   auto pFoo = ScopedVclPtr::Create( pParent );

s/ScopedVclPtr/VclPtrAutoDispose/g

Unless we come up with a better name for the last sed; one suggestion
was 'guard' but guards are released - not disposed; unsure if there is a
similar UNO helper concept - Stephan ?

Thanks,

Michael.

-- 
michael.me...@collabora.com <><, Pseudo Engineer, itinerant idiot
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: desktop/inc desktop/source officecfg/registry

2017-05-26 Thread Muhammet Kara
 desktop/inc/dp_gui.hrc   |1 
 desktop/source/deployment/gui/dp_gui_dialog.src  |6 +++
 desktop/source/deployment/gui/dp_gui_dialog2.cxx |   16 
+-
 officecfg/registry/schema/org/openoffice/Office/ExtensionManager.xcs |7 

 4 files changed, 29 insertions(+), 1 deletion(-)

New commits:
commit f09be32d0fcb176527b41cedc37814d5ed7ccad5
Author: Muhammet Kara 
Date:   Wed May 24 16:08:36 2017 +0300

tdf#36019: Dynamically enable/disable extension removal via GUI

Now extension removal via the Extension Manager dialog can be
dynamically enabled/disabled from the expert configurations.

This doesn't affect the unopkg commands.

Change-Id: I2b718d48977ca18cc3d808e98cf7804d4a47dcff
Reviewed-on: https://gerrit.libreoffice.org/37990
Tested-by: Jenkins 
Reviewed-by: Muhammet Kara 

diff --git a/desktop/inc/dp_gui.hrc b/desktop/inc/dp_gui.hrc
index b9c9c257bb63..a22629cb1e7a 100644
--- a/desktop/inc/dp_gui.hrc
+++ b/desktop/inc/dp_gui.hrc
@@ -31,6 +31,7 @@
 #define RID_STR_WARNINGBOX_VERSION_GREATER_DIFFERENT_NAMES
(RID_DEPLOYMENT_GUI_START + 8)
 #define RID_STR_WARNING_INSTALL_EXTENSION 
(RID_DEPLOYMENT_GUI_START + 9)
 #define RID_STR_WARNING_INSTALL_EXTENSION_DISABLED
(RID_DEPLOYMENT_GUI_START + 10)
+#define RID_STR_WARNING_REMOVE_EXTENSION_DISABLED 
(RID_DEPLOYMENT_GUI_START + 11)
 
 #define RID_DLG_UPDATE_NONE (RID_DEPLOYMENT_GUI_START + 13)
 #define RID_DLG_UPDATE_NOINSTALLABLE(RID_DEPLOYMENT_GUI_START + 14)
diff --git a/desktop/source/deployment/gui/dp_gui_dialog.src 
b/desktop/source/deployment/gui/dp_gui_dialog.src
index 5791c344a04d..27ebb4b7f6f1 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog.src
+++ b/desktop/source/deployment/gui/dp_gui_dialog.src
@@ -126,6 +126,12 @@ String RID_STR_WARNING_REMOVE_EXTENSION
 "Click 'Cancel' to stop removing the extension.";
 };
 
+String RID_STR_WARNING_REMOVE_EXTENSION_DISABLED
+{
+Text [en-US] = "Extension removal is currently disabled. "
+"Please consult your system administrator for more information.";
+};
+
 String RID_STR_WARNING_REMOVE_SHARED_EXTENSION
 {
 Text [en-US] = "Make sure that no further users are working with the same "
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx 
b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index a2ce1d98bda3..8acde7cc8172 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -529,6 +529,11 @@ ExtMgrDialog::ExtMgrDialog(vcl::Window *pParent, 
TheExtensionManager *pManager,
 m_pAddBtn->Disable();
 
m_pAddBtn->SetQuickHelpText(getResId(RID_STR_WARNING_INSTALL_EXTENSION_DISABLED));
 }
+if 
(officecfg::Office::ExtensionManager::ExtensionSecurity::DisableExtensionRemoval::get())
+{
+m_pRemoveBtn->Disable();
+
m_pRemoveBtn->SetQuickHelpText(getResId(RID_STR_WARNING_REMOVE_EXTENSION_DISABLED));
+}
 
 m_aIdle.SetPriority(TaskPriority::LOWEST);
 m_aIdle.SetInvokeHandler( LINK( this, ExtMgrDialog, TimeOutHdl ) );
@@ -758,7 +763,16 @@ void ExtMgrDialog::enableOptionsButton( bool bEnable )
 
 void ExtMgrDialog::enableRemoveButton( bool bEnable )
 {
-m_pRemoveBtn->Enable( bEnable );
+m_pRemoveBtn->Enable( bEnable && 
!officecfg::Office::ExtensionManager::ExtensionSecurity::DisableExtensionRemoval::get());
+
+if 
(officecfg::Office::ExtensionManager::ExtensionSecurity::DisableExtensionInstallation::get())
+{
+
m_pRemoveBtn->SetQuickHelpText(getResId(RID_STR_WARNING_REMOVE_EXTENSION_DISABLED));
+}
+else
+{
+m_pRemoveBtn->SetQuickHelpText("");
+}
 }
 
 void ExtMgrDialog::enableEnableButton( bool bEnable )
diff --git 
a/officecfg/registry/schema/org/openoffice/Office/ExtensionManager.xcs 
b/officecfg/registry/schema/org/openoffice/Office/ExtensionManager.xcs
index f600a39b7087..eaf840cd90e4 100644
--- a/officecfg/registry/schema/org/openoffice/Office/ExtensionManager.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/ExtensionManager.xcs
@@ -58,6 +58,13 @@
 
 false
   
+  
+
+  Specifies whether to disable extension removal via the 
Extension Manager dialog.
+  Disable Extension Removal
+
+false
+  
 
 
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


New Defects reported by Coverity Scan for LibreOffice

2017-05-26 Thread scan-admin

Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

10 new defect(s) introduced to LibreOffice found with Coverity Scan.
9 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent 
build analyzed by Coverity Scan.

New defect(s) Reported-by: Coverity Scan
Showing 10 of 10 defect(s)


** CID 1409901:  Code maintainability issues  (UNUSED_VALUE)
/sc/source/core/tool/interpr1.cxx: 3885 in ScInterpreter::GetStVarParams(bool, 
double (*)(double, unsigned long))()



*** CID 1409901:  Code maintainability issues  (UNUSED_VALUE)
/sc/source/core/tool/interpr1.cxx: 3885 in ScInterpreter::GetStVarParams(bool, 
double (*)(double, unsigned long))()
3879 {
3880 rArrayValue.mfSum = CreateDoubleError( nErr);
3881 }
3882 // Reset.
3883 std::vector().swap(values);
3884 fSum = 0.0;
>>> CID 1409901:  Code maintainability issues  (UNUSED_VALUE)
>>> Assigning value "18446744073709551615UL" to "nRefArrayPos" here, but 
>>> that stored value is overwritten before it can be used.
3885 nRefArrayPos = std::numeric_limits::max();
3886 break;
3887 }
3888 }
3889 SAL_FALLTHROUGH;
3890 case svDoubleRef :

** CID 1409900:  Error handling issues  (UNCAUGHT_EXCEPT)
/sdext/source/presenter/PresenterTextView.cxx: 1087 in 
sdext::presenter::PresenterTextCaret::~PresenterTextCaret()()



*** CID 1409900:  Error handling issues  (UNCAUGHT_EXCEPT)
/sdext/source/presenter/PresenterTextView.cxx: 1087 in 
sdext::presenter::PresenterTextCaret::~PresenterTextCaret()()
1081   maInvalidator(rInvalidator),
1082   maBroadcaster(),
1083   maCaretBounds()
1084 {
1085 }
1086 
>>> CID 1409900:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type "com::sun::star::uno::DeploymentException" is 
>>> thrown but the throw list "throw()" doesn't allow it to be thrown. This 
>>> will cause a call to unexpected() which usually calls terminate().
1087 PresenterTextCaret::~PresenterTextCaret()
1088 {
1089 HideCaret();
1090 }
1091 
1092 void PresenterTextCaret::ShowCaret()

** CID 1409899:  Null pointer dereferences  (REVERSE_INULL)
/sw/source/core/para/paratr.cxx: 71 in SwFormatDrop::SetCharFormat(SwCharFormat 
*)()



*** CID 1409899:  Null pointer dereferences  (REVERSE_INULL)
/sw/source/core/para/paratr.cxx: 71 in SwFormatDrop::SetCharFormat(SwCharFormat 
*)()
65 void SwFormatDrop::SetCharFormat( SwCharFormat *pNew )
66 {
67 assert(!pNew->IsDefault()); // expose cases that lead to 
use-after-free
68 // Rewire
69 if ( GetRegisteredIn() )
70 GetRegisteredInNonConst()->Remove( this );
>>> CID 1409899:  Null pointer dereferences  (REVERSE_INULL)
>>> Null-checking "pNew" suggests that it may be null, but it has already 
>>> been dereferenced on all paths leading to the check.
71 if(pNew)
72 pNew->Add( this );
73 }
74 
75 void SwFormatDrop::Modify( const SfxPoolItem*, const SfxPoolItem * )
76 {

** CID 1409898:  Null pointer dereferences  (REVERSE_INULL)
/sc/source/core/tool/compiler.cxx: 1777 in ScCompiler::ScCompiler(ScDocument *, 
const ScAddress &, ScTokenArray &, formula::FormulaGrammar::Grammar)()



*** CID 1409898:  Null pointer dereferences  (REVERSE_INULL)
/sc/source/core/tool/compiler.cxx: 1777 in ScCompiler::ScCompiler(ScDocument *, 
const ScAddress &, ScTokenArray &, formula::FormulaGrammar::Grammar)()
1771 pConv( GetRefConvention( FormulaGrammar::CONV_OOO ) ),
1772 meExtendedErrorDetection( EXTENDED_ERROR_DETECTION_NONE ),
1773 mbCloseBrackets( true ),
1774 mbRewind( false )
1775 {
1776 SetGrammar( ((eGrammar == 
formula::FormulaGrammar::GRAM_UNSPECIFIED) ?
>>> CID 1409898:  Null pointer dereferences  (REVERSE_INULL)
>>> Null-checking "pDocument" suggests that it may be null, but it has 
>>> already been dereferenced on all paths leading to the check.
1777 (pDocument ? pDocument->GetGrammar() : 
formula::FormulaGrammar::GRAM_DEFAULT) :
1778 eGrammar));
1779 nMaxTab = pDoc->GetTableCount() - 1;
1780 }
1781 
1782 ScCompiler::ScCompiler( sc::CompileFormulaContext& rCxt, const 
ScAddress& rPos ) :

** CID 1409897:  N

[Libreoffice-commits] core.git: include/rtl include/sal xmlsecurity/source

2017-05-26 Thread Noel Grandin
 include/rtl/strbuf.hxx   |4 -
 include/rtl/string.hxx   |2 
 include/rtl/ustrbuf.hxx  |4 -
 include/rtl/ustring.hxx  |2 
 include/sal/types.h  |   16 +++
 xmlsecurity/source/xmlsec/biginteger.cxx |   67 ++-
 6 files changed, 53 insertions(+), 42 deletions(-)

New commits:
commit 24b2c636a230c04ab4b9c6ed7d041f6420f959f1
Author: Noel Grandin 
Date:   Thu May 25 11:47:52 2017 +0200

create SAL_RETURNS_NONNULL annotation

and apply it to some methods in OString and OUString

Change-Id: I30e91f961b6d310799d3641f68b7ed54b3080f3a
Reviewed-on: https://gerrit.libreoffice.org/38020
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/include/rtl/strbuf.hxx b/include/rtl/strbuf.hxx
index 791eb142f9dc..eb5d4f738568 100644
--- a/include/rtl/strbuf.hxx
+++ b/include/rtl/strbuf.hxx
@@ -441,7 +441,7 @@ public:
 /**
 Return a null terminated character array.
  */
-const sal_Char* getStr() const { return pData->buffer; }
+const sal_Char* getStr() const SAL_RETURNS_NONNULL { return pData->buffer; 
}
 
 /**
   Access to individual characters.
@@ -709,7 +709,7 @@ public:
 
@since LibreOffice 4.4
 */
-char * appendUninitialized(sal_Int32 length) {
+char * appendUninitialized(sal_Int32 length) SAL_RETURNS_NONNULL {
 sal_Int32 n = getLength();
 rtl_stringbuffer_insert(&pData, &nCapacity, n, NULL, length);
 return pData->buffer + n;
diff --git a/include/rtl/string.hxx b/include/rtl/string.hxx
index 37876983cd1b..2753713fc66f 100644
--- a/include/rtl/string.hxx
+++ b/include/rtl/string.hxx
@@ -432,7 +432,7 @@ public:
   @return a pointer to a null-terminated byte string representing the
   characters of this string object.
 */
-const sal_Char * getStr() const { return pData->buffer; }
+const sal_Char * getStr() const SAL_RETURNS_NONNULL { return 
pData->buffer; }
 
 /**
   Access to individual characters.
diff --git a/include/rtl/ustrbuf.hxx b/include/rtl/ustrbuf.hxx
index 04ba896b9b48..9dbc2621a7ae 100644
--- a/include/rtl/ustrbuf.hxx
+++ b/include/rtl/ustrbuf.hxx
@@ -474,7 +474,7 @@ public:
 /**
 Return a null terminated unicode character array.
  */
-const sal_Unicode*  getStr() const { return pData->buffer; }
+const sal_Unicode*  getStr() const SAL_RETURNS_NONNULL { return 
pData->buffer; }
 
 /**
   Access to individual characters.
@@ -885,7 +885,7 @@ public:
 
@since LibreOffice 4.4
 */
-sal_Unicode * appendUninitialized(sal_Int32 length) {
+sal_Unicode * appendUninitialized(sal_Int32 length) SAL_RETURNS_NONNULL {
 sal_Int32 n = getLength();
 rtl_uStringbuffer_insert(&pData, &nCapacity, n, NULL, length);
 return pData->buffer + n;
diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx
index 50f3be69bbbd..8b1cd3a1404f 100644
--- a/include/rtl/ustring.hxx
+++ b/include/rtl/ustring.hxx
@@ -662,7 +662,7 @@ public:
 
   @return   a pointer to the Unicode characters buffer for this object.
 */
-const sal_Unicode * getStr() const { return pData->buffer; }
+const sal_Unicode * getStr() const SAL_RETURNS_NONNULL { return 
pData->buffer; }
 
 /**
   Access to individual characters.
diff --git a/include/sal/types.h b/include/sal/types.h
index 30939f130281..b6d6730e88a5 100644
--- a/include/sal/types.h
+++ b/include/sal/types.h
@@ -687,6 +687,22 @@ inline char16_t const * SAL_U(wchar_t const * p)
 /// @endcond
 #endif
 
+
+/** Indicate where function/methods that return a pointer always
+return a non-nullptr value.
+
+Note that MSVC supports this feature via it's SAL _Ret_notnull_
+annotation, but since it's in a completely different place on
+the function declaration, it's a little hard to support both.
+
+@since LibreOffice 5.5
+*/
+#if (defined __GNUC__ && __GNUC__ > 4) || defined __clang__
+#define SAL_RETURNS_NONNULL  __attribute__((returns_nonnull))
+#else
+#define SAL_RETURNS_NONNULL
+#endif
+
 #endif // INCLUDED_SAL_TYPES_H
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/biginteger.cxx 
b/xmlsecurity/source/xmlsec/biginteger.cxx
index 4f1004be1a97..3981754cb776 100644
--- a/xmlsecurity/source/xmlsec/biginteger.cxx
+++ b/xmlsecurity/source/xmlsec/biginteger.cxx
@@ -29,53 +29,48 @@ namespace xmlsecurity
 {
 Sequence< sal_Int8 > numericStringToBigInteger ( const OUString& numeral )
 {
-if( numeral.getStr() != nullptr )
-{
-xmlChar* chNumeral ;
-const xmlSecByte* bnInteger ;
-xmlSecSize length ;
-xmlSecBn bn ;
+xmlChar* chNumeral ;
+const xmlSecByte* bnInteger ;
+xmlSecSize length ;
+xmlSecBn bn ;
 
-OString onumeral = OUStringToOString( numeral , 
RTL_TEXTENCODING_ASCII_US ) ;
+OString onumeral = OUStringToOString( numeral 

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/debug loleaflet/dist loleaflet/main.js loleaflet/src

2017-05-26 Thread Jan Holesovsky
 loleaflet/debug/document/loleaflet.html  |1 -
 loleaflet/dist/loleaflet.html|1 +
 loleaflet/main.js|3 ---
 loleaflet/src/control/Control.Menubar.js |4 ++--
 4 files changed, 3 insertions(+), 6 deletions(-)

New commits:
commit 255518878d6e48ae85726838a9c7f87d5c292cb2
Author: Jan Holesovsky 
Date:   Fri May 26 10:18:05 2017 +0200

loleaflet: Let's not use a 'disableabout' param.

Instead, just disable the Help -> About choice if the 'about-dialog' div was
removed from loleaflet.html.

Change-Id: I997aa5489bcfbd02f56feb79bea14e92d3666bf2
Reviewed-on: https://gerrit.libreoffice.org/38056
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 

diff --git a/loleaflet/debug/document/loleaflet.html 
b/loleaflet/debug/document/loleaflet.html
index f5462f84..33364cea 100644
--- a/loleaflet/debug/document/loleaflet.html
+++ b/loleaflet/debug/document/loleaflet.html
@@ -106,7 +106,6 @@
 var permission = getParameterByName('permission') || 'edit';
 var timestamp = getParameterByName('timestamp');
 var closebutton = getParameterByName('closebutton');
-var disableAbout = getParameterByName('disableabout');
 if (wopiSrc === '' && filePath === '') {
 vex.dialog.alert(wrongwopisrc);
 }
diff --git a/loleaflet/dist/loleaflet.html b/loleaflet/dist/loleaflet.html
index 0d587090..dfa03200 100644
--- a/loleaflet/dist/loleaflet.html
+++ b/loleaflet/dist/loleaflet.html
@@ -68,6 +68,7 @@
 
 
 
+
 
   LibreOffice Online
   
diff --git a/loleaflet/main.js b/loleaflet/main.js
index 2fb44b3d..48200cd9 100644
--- a/loleaflet/main.js
+++ b/loleaflet/main.js
@@ -75,8 +75,6 @@ var closebutton = getParameterByName('closebutton');
 var revHistoryEnabled = getParameterByName('revisionhistory');
 // Should the document go inactive or not
 var alwaysActive = getParameterByName('alwaysactive');
-// Disable the about dialog
-var disableAbout = getParameterByName('disableabout');
 // Loleaflet Debug mode
 var debugMode = getParameterByName('debug');
 if (wopiSrc === '' && filePath === '') {
@@ -90,7 +88,6 @@ if (host === '') {
 // TODO: Get rid of these globals
 global.closebutton = closebutton;
 global.revHistoryEnabled = revHistoryEnabled;
-global.disableAbout = disableAbout;
 global.title = title;
 global.errorMessages = errorMessages;
 var docURL, docParams;
diff --git a/loleaflet/src/control/Control.Menubar.js 
b/loleaflet/src/control/Control.Menubar.js
index 29c64bbb..0b786615 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -2,7 +2,7 @@
 * Control.Menubar
 */
 
-/* global $ _ map title vex revHistoryEnabled closebutton disableAbout*/
+/* global $ _ map title vex revHistoryEnabled closebutton */
 L.Control.Menubar = L.Control.extend({
// TODO: Some mechanism to stop the need to copy duplicate menus (eg. 
Help)
options: {
@@ -541,7 +541,7 @@ L.Control.Menubar = L.Control.extend({
_createMenu: function(menu) {
var itemList = [];
for (var i in menu) {
-   if (menu[i].id === 'about' && disableAbout) {
+   if (menu[i].id === 'about' && 
(L.DomUtil.get('about-dialog') === null)) {
continue;
}
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: 2 commits - loleaflet/debug loleaflet/dist loleaflet/main.js loleaflet/src wsd/FileServer.cpp

2017-05-26 Thread Jan Holesovsky
 loleaflet/debug/document/loleaflet.html  |1 -
 loleaflet/dist/loleaflet.html|   15 ++-
 loleaflet/main.js|3 ---
 loleaflet/src/control/Control.Menubar.js |4 ++--
 wsd/FileServer.cpp   |   20 
 5 files changed, 16 insertions(+), 27 deletions(-)

New commits:
commit 82704ed7779c6141308acbfcd8f8302a117c0378
Author: Jan Holesovsky 
Date:   Fri May 26 10:18:05 2017 +0200

loleaflet: Let's not use a 'disableabout' param.

Instead, just disable the Help -> About choice if the 'about-dialog' div was
removed from loleaflet.html.

Change-Id: I997aa5489bcfbd02f56feb79bea14e92d3666bf2

diff --git a/loleaflet/debug/document/loleaflet.html 
b/loleaflet/debug/document/loleaflet.html
index f5462f84..33364cea 100644
--- a/loleaflet/debug/document/loleaflet.html
+++ b/loleaflet/debug/document/loleaflet.html
@@ -106,7 +106,6 @@
 var permission = getParameterByName('permission') || 'edit';
 var timestamp = getParameterByName('timestamp');
 var closebutton = getParameterByName('closebutton');
-var disableAbout = getParameterByName('disableabout');
 if (wopiSrc === '' && filePath === '') {
 vex.dialog.alert(wrongwopisrc);
 }
diff --git a/loleaflet/dist/loleaflet.html b/loleaflet/dist/loleaflet.html
index 0d587090..dfa03200 100644
--- a/loleaflet/dist/loleaflet.html
+++ b/loleaflet/dist/loleaflet.html
@@ -68,6 +68,7 @@
 
 
 
+
 
   LibreOffice Online
   
diff --git a/loleaflet/main.js b/loleaflet/main.js
index 2fb44b3d..48200cd9 100644
--- a/loleaflet/main.js
+++ b/loleaflet/main.js
@@ -75,8 +75,6 @@ var closebutton = getParameterByName('closebutton');
 var revHistoryEnabled = getParameterByName('revisionhistory');
 // Should the document go inactive or not
 var alwaysActive = getParameterByName('alwaysactive');
-// Disable the about dialog
-var disableAbout = getParameterByName('disableabout');
 // Loleaflet Debug mode
 var debugMode = getParameterByName('debug');
 if (wopiSrc === '' && filePath === '') {
@@ -90,7 +88,6 @@ if (host === '') {
 // TODO: Get rid of these globals
 global.closebutton = closebutton;
 global.revHistoryEnabled = revHistoryEnabled;
-global.disableAbout = disableAbout;
 global.title = title;
 global.errorMessages = errorMessages;
 var docURL, docParams;
diff --git a/loleaflet/src/control/Control.Menubar.js 
b/loleaflet/src/control/Control.Menubar.js
index 29c64bbb..0b786615 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -2,7 +2,7 @@
 * Control.Menubar
 */
 
-/* global $ _ map title vex revHistoryEnabled closebutton disableAbout*/
+/* global $ _ map title vex revHistoryEnabled closebutton */
 L.Control.Menubar = L.Control.extend({
// TODO: Some mechanism to stop the need to copy duplicate menus (eg. 
Help)
options: {
@@ -541,7 +541,7 @@ L.Control.Menubar = L.Control.extend({
_createMenu: function(menu) {
var itemList = [];
for (var i in menu) {
-   if (menu[i].id === 'about' && disableAbout) {
+   if (menu[i].id === 'about' && 
(L.DomUtil.get('about-dialog') === null)) {
continue;
}
 
commit 9aecf428f629a9ff33e6f7fd37d85a3023ac44d3
Author: Jan Holesovsky 
Date:   Fri May 26 10:03:33 2017 +0200

Revert "wsd: enable option to remove About dialog elements"

The request was meant the other way around; let's just not present "About" 
in
the menu when there is no element with "about-dialog" id.

This reverts commit b9305d17ce5ecea66d5273de4a4bbc65d47a2b45.

diff --git a/loleaflet/dist/loleaflet.html b/loleaflet/dist/loleaflet.html
index 3a0974ff..0d587090 100644
--- a/loleaflet/dist/loleaflet.html
+++ b/loleaflet/dist/loleaflet.html
@@ -68,7 +68,19 @@
 
 
 
-   %ABOUT_DIALOG%
+
+  LibreOffice Online
+  
+  
+  
+LOOLWSD
+
+  
+  
+LOKit
+
+  
+
 
 

[Libreoffice-commits] core.git: helpcompiler/source

2017-05-26 Thread Gabor Kelemen
 helpcompiler/source/HelpCompiler.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 59793d67d4c0324730e30d71d94ba5173643d79c
Author: Gabor Kelemen 
Date:   Thu May 25 23:33:03 2017 +0200

Make helpcompiler more verbose on dot ahelps

Currently we get a warning if the ahelp is one dot
and there was no previous bookmark tag.

This warning contains only the text with the problemmatic ahelp.

It would make it easier to hunt down such problems if we would
know the file names.

This patch does that, and now I see 334 problems in 137 files.

Change-Id: I364368f7affb85d5c5d526dd4674757c51956aea
Reviewed-on: https://gerrit.libreoffice.org/38044
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/helpcompiler/source/HelpCompiler.cxx 
b/helpcompiler/source/HelpCompiler.cxx
index 8f0301ca2fe0..eb1c54830ffe 100644
--- a/helpcompiler/source/HelpCompiler.cxx
+++ b/helpcompiler/source/HelpCompiler.cxx
@@ -417,7 +417,7 @@ void myparser::traverse( xmlNodePtr parentNode )
 {
 //TODO: make these asserts and flush out all our broken help 
ids
 SAL_WARN_IF(hidstr.empty(), "helpcompiler", "hid='' for text:" 
<< text);
-SAL_WARN_IF(!hidstr.empty() && extendedHelpText.empty(), 
"helpcompiler", "hid='.' with no hid bookmark branches for text:" << text);
+SAL_WARN_IF(!hidstr.empty() && extendedHelpText.empty(), 
"helpcompiler", "hid='.' with no hid bookmark branches in file: " << fileName + 
" for text: " << text);
 HashSet::const_iterator aEnd = extendedHelpText.end();
 for (HashSet::const_iterator iter = extendedHelpText.begin(); 
iter != aEnd; ++iter)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: basctl/source

2017-05-26 Thread tagezi
 basctl/source/basicide/baside2.cxx |   12 
 1 file changed, 4 insertions(+), 8 deletions(-)

New commits:
commit d0c0ebbcabb67b8dfd130cf4e9e666bba229f846
Author: tagezi 
Date:   Fri May 26 08:33:18 2017 +0300

deleted variable bAdd because it does not make sense

Change-Id: Ib65c38c7e99ff4667c021240a1412c8f57f53cbe
Reviewed-on: https://gerrit.libreoffice.org/38050
Tested-by: Jenkins 
Reviewed-by: Mike Kaganski 

diff --git a/basctl/source/basicide/baside2.cxx 
b/basctl/source/basicide/baside2.cxx
index f0070aa5fe01..c85863afdd2f 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -669,7 +669,6 @@ BasicDebugFlags ModulWindow::BasicBreakHdl( StarBASIC* 
pBasic )
 void ModulWindow::BasicAddWatch()
 {
 AssertValidEditEngine();
-bool bAdd = true;
 if ( !GetEditView()->HasSelection() )
 {
 TextPaM aWordStart;
@@ -679,15 +678,12 @@ void ModulWindow::BasicAddWatch()
 TextSelection aSel( aWordStart );
 aSel.GetEnd().GetIndex() += aWord.getLength();
 GetEditView()->SetSelection( aSel );
-bAdd = true;
 }
 }
-if ( bAdd )
-{
-TextSelection aSel = GetEditView()->GetSelection();
-if ( aSel.GetStart().GetPara() == aSel.GetEnd().GetPara() ) // single 
line selection
-m_rLayout.BasicAddWatch(GetEditView()->GetSelected());
-}
+
+TextSelection aSel = GetEditView()->GetSelection();
+if ( aSel.GetStart().GetPara() == aSel.GetEnd().GetPara() ) // single line 
selection
+m_rLayout.BasicAddWatch(GetEditView()->GetSelected());
 }
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sc/qa sc/source

2017-05-26 Thread Justin Luth
 sc/qa/unit/data/ods/tdf99856_dataValidationTest.ods |binary
 sc/qa/unit/subsequent_export-test.cxx   |   24 
 sc/source/filter/excel/xecontent.cxx|   10 
 3 files changed, 34 insertions(+)

New commits:
commit 21b7cb2737d95f281e28e248c4dad306a5c6463f
Author: Justin Luth 
Date:   Thu May 25 20:47:03 2017 +0300

tdf#99856 xlsx export: limit dataValidation list to 255 chars

Excel consider the file corrupt if it has an overly long
validation list.

includes followup commit b56d1e294d838d4b3d0f237c81325a0d1a1cff83

Change-Id: I4145859d4f76e0a70521c7bee33c96927b437ace
Reviewed-on: https://gerrit.libreoffice.org/38038
Reviewed-by: Justin Luth 
Tested-by: Jenkins 
Reviewed-by: Katarina Behrens 
Reviewed-on: https://gerrit.libreoffice.org/38053

diff --git a/sc/qa/unit/data/ods/tdf99856_dataValidationTest.ods 
b/sc/qa/unit/data/ods/tdf99856_dataValidationTest.ods
new file mode 100644
index ..b5e036e9b1f8
Binary files /dev/null and 
b/sc/qa/unit/data/ods/tdf99856_dataValidationTest.ods differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx 
b/sc/qa/unit/subsequent_export-test.cxx
index 49e52a512a88..253134d5d29f 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -43,6 +43,7 @@
 #include 
 #include 
 #include 
+#include "validat.hxx"
 
 #include 
 #include 
@@ -94,6 +95,7 @@ public:
 void testPasswordExportODS();
 void testConditionalFormatExportODS();
 void testConditionalFormatExportXLSX();
+void testTdf99856_dataValidationTest();
 void testColorScaleExportODS();
 void testColorScaleExportXLSX();
 void testDataBarExportODS();
@@ -201,6 +203,7 @@ public:
 CPPUNIT_TEST(testPasswordExportODS);
 CPPUNIT_TEST(testConditionalFormatExportODS);
 CPPUNIT_TEST(testConditionalFormatExportXLSX);
+CPPUNIT_TEST(testTdf99856_dataValidationTest);
 CPPUNIT_TEST(testColorScaleExportODS);
 CPPUNIT_TEST(testColorScaleExportXLSX);
 CPPUNIT_TEST(testDataBarExportODS);
@@ -451,6 +454,27 @@ void ScExportTest::testConditionalFormatExportXLSX()
 xDocSh->DoClose();
 }
 
+void ScExportTest::testTdf99856_dataValidationTest()
+{
+ScDocShellRef xShell = loadDoc("tdf99856_dataValidationTest.", FORMAT_ODS);
+CPPUNIT_ASSERT_MESSAGE("Failed to load doc", xShell.is());
+
+ScDocShellRef xDocSh = saveAndReload( xShell.get(), FORMAT_XLSX);
+CPPUNIT_ASSERT_MESSAGE("Failed to reload doc", xDocSh.is());
+
+ScDocument& rDoc = xDocSh->GetDocument();
+const ScValidationData* pData = rDoc.GetValidationEntry(2);
+CPPUNIT_ASSERT(pData);
+
+// Excel can't open corrupt file if the list is longer than 255 characters
+std::vector aList;
+pData->FillSelectionList(aList, ScAddress(0, 1, 1));
+CPPUNIT_ASSERT_EQUAL(size_t(18), aList.size());
+CPPUNIT_ASSERT_EQUAL(OUString("18 Missis"), aList[17].GetString());
+
+xDocSh->DoClose();
+}
+
 void ScExportTest::testColorScaleExportODS()
 {
 ScDocShellRef xShell = loadDoc("colorscale.", FORMAT_ODS);
diff --git a/sc/source/filter/excel/xecontent.cxx 
b/sc/source/filter/excel/xecontent.cxx
index 81fe1e9a922b..706dcb67b9ec 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -1671,6 +1671,16 @@ XclExpDV::XclExpDV( const XclExpRoot& rRoot, sal_uLong 
nScHandle ) :
 }
 ::set_flag( mnFlags, EXC_DV_STRINGLIST );
 
+// maximum length allowed in Excel is 255 characters, and 
don't end with an empty token
+sal_uInt32 nLen = sFormulaBuf.getLength();
+if( nLen > 256 )  // 255 + beginning quote mark
+{
+nLen = 256;
+if( sFormulaBuf[nLen - 1] == ',' )
+--nLen;
+sFormulaBuf = sFormulaBuf.copy(0, nLen);
+}
+
 sFormulaBuf.append( '"' );
 msFormula1 = sFormulaBuf.makeStringAndClear();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: oox/source sw/qa sw/source

2017-05-26 Thread Szymon Kłos
 oox/source/export/vmlexport.cxx   |4 +++-
 oox/source/vml/vmlshapecontext.cxx|   11 +--
 sw/qa/extras/ooxmlexport/ooxmlexport7.cxx |4 
 sw/qa/extras/uiwriter/data/watermark.docx |binary
 sw/qa/extras/uiwriter/uiwriter.cxx|   23 +++
 sw/source/core/edit/edfcol.cxx|   17 +++--
 6 files changed, 50 insertions(+), 9 deletions(-)

New commits:
commit 271094ad8f9e334d17176744b90b35e80528bcb2
Author: Szymon Kłos 
Date:   Wed May 24 00:15:15 2017 +0200

Watermark: docx interoperability

Before patch:

Document created in MS Word:



Imported to LO and exported:



Then again imported to MS Word and exported:



In this moment LO after import had shape in the navigator but it wasn't 
visible.

Patch:
* vmshapecontext.cxx is changed to read ShapeType from id instead of o:spt
 when o:spid is present.
* vmlexport.cxx added o:spid for Word to identify inserted watermark
* edfxol.cxx changed name of shape to "PowerPlusWaterMarkObject" for Word
* tests

Change-Id: I25322628838a98c45cbeed64144d04977b2ea9ba
Reviewed-on: https://gerrit.libreoffice.org/37969
Tested-by: Jenkins 
Reviewed-by: Miklos Vajna 

diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
index ef400be64f7c..623beaaa88ec 100644
--- a/oox/source/export/vmlexport.cxx
+++ b/oox/source/export/vmlexport.cxx
@@ -190,8 +190,10 @@ void VMLExport::AddShape( sal_uInt32 nShapeType, 
sal_uInt32 nShapeFlags, sal_uIn
 }
 else
 {
-// A watermark object - store the optional shape ID also ('o:spid')
+// A watermark object - store the optional shape ID
 m_pShapeAttrList->add( XML_id, 
OUStringToOString(m_pSdrObject->GetName(), RTL_TEXTENCODING_UTF8) );
+// also ('o:spid')
+m_pShapeAttrList->addNS( XML_o, XML_spid, ShapeIdString( nShapeId ) );
 }
 }
 
diff --git a/oox/source/vml/vmlshapecontext.cxx 
b/oox/source/vml/vmlshapecontext.cxx
index dc654223aca6..ed369ae1c7d9 100644
--- a/oox/source/vml/vmlshapecontext.cxx
+++ b/oox/source/vml/vmlshapecontext.cxx
@@ -275,11 +275,18 @@ ShapeTypeContext::ShapeTypeContext( 
ContextHandler2Helper& rParent, ShapeType& r
 mrTypeModel.maShapeId = rAttribs.getXString( bHasOspid ? O_TOKEN( spid ) : 
XML_id, OUString() );
 mrTypeModel.maLegacyId = rAttribs.getString( XML_id, OUString() );
 OSL_ENSURE( !mrTypeModel.maShapeId.isEmpty(), 
"ShapeTypeContext::ShapeTypeContext - missing shape identifier" );
+// builtin shape type identifier
+mrTypeModel.moShapeType = rAttribs.getInteger( O_TOKEN( spt ) );
 // if the o:spid attribute exists, the id attribute contains the 
user-defined shape name
 if( bHasOspid )
+{
 mrTypeModel.maShapeName = rAttribs.getXString( XML_id, OUString() );
-// builtin shape type identifier
-mrTypeModel.moShapeType = rAttribs.getInteger( O_TOKEN( spt ) );
+// get ShapeType and ShapeId from name for compatibility
+mrTypeModel.maShapeId = mrTypeModel.maShapeName;
+static const OUString sShapeTypePrefix = "shapetype_";
+if( mrTypeModel.maShapeName.startsWith( sShapeTypePrefix ) )
+mrTypeModel.moShapeType = 
mrTypeModel.maShapeName.copy(sShapeTypePrefix.getLength()).toInt32();
+}
 
 // coordinate system position/size, CSS style
 mrTypeModel.moCoordPos = lclDecodeInt32Pair( rAttribs, XML_coordorigin );
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
index f9b851175202..67179b5c14a0 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
@@ -108,6 +108,10 @@ DECLARE_OOXMLEXPORT_TEST(testTextWatermark, 
"textWatermark.docx")
return;
 
 assertXPath(pXmlHeader1, 
"/w:hdr[1]/w:p[1]/w:r[1]/w:pict[1]/v:shape[1]","id","PowerPlusWaterMarkObject93701316");
+
+//The second problem was that Word uses also "o:spid"
+const OUString& sSpid = getXPath(pXmlHeader1, 
"/w:hdr[1]/w:p[1]/w:r[1]/w:pict[1]/v:shape[1]","spid");
+CPPUNIT_ASSERT(!sSpid.isEmpty());
 }
 
 DECLARE_OOXMLEXPORT_TEST(testPictureWatermark, "pictureWatermark.docx")
diff --git a/sw/qa/extras/uiwriter/data/watermark.docx 
b/sw/qa/extras/uiwriter/data/watermark.docx
new file mode 100644
index ..0b26d4442e98
Binary files /dev/null and b/sw/qa/extras/uiwriter/data/watermark.docx differ
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx 
b/sw/qa/extras/uiwriter/uiwriter.cxx
index 8621a81884a9..1e482e1ac87d 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -104,6 +104,7 @@
 #include 
 #include 
 #include 
+#include 
 
 static const char* const DATA_DIRECTORY = "/sw/qa/extras/uiwriter/data/";
 
@@ -125,6 +126,7 @@ public:
 void testDOCXAutoTextMultiple();
 void testDOTMAutoText();
 void testDOCXAuto

[Libreoffice-commits] core.git: sw/inc sw/source writerfilter/inc writerfilter/source

2017-05-26 Thread Miklos Vajna
 sw/inc/textboxhelper.hxx |4 ++--
 sw/source/filter/ww8/rtfexport.hxx   |2 +-
 sw/source/filter/ww8/rtfstringbuffer.hxx |2 +-
 writerfilter/inc/dmapper/GraphicZOrderHelper.hxx |2 +-
 writerfilter/inc/rtftok/RTFDocument.hxx  |2 +-
 writerfilter/source/dmapper/TablePositionHandler.hxx |2 +-
 writerfilter/source/rtftok/rtfcharsets.hxx   |4 ++--
 writerfilter/source/rtftok/rtfdocumentimpl.hxx   |7 +++
 writerfilter/source/rtftok/rtfreferencetable.hxx |4 ++--
 writerfilter/source/rtftok/rtfsprm.hxx   |   10 +-
 writerfilter/source/rtftok/rtfvalue.hxx  |2 +-
 11 files changed, 20 insertions(+), 21 deletions(-)

New commits:
commit e1b247625419515a8aeaf9e1f232f16cb4f59f73
Author: Miklos Vajna 
Date:   Thu May 25 21:28:48 2017 +0200

RTF filter: use 'using' instead of 'typedef'

Change-Id: Ie7182fa30155a8090421cf9a669525be99f0e0a7
Reviewed-on: https://gerrit.libreoffice.org/38042
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins 

diff --git a/sw/inc/textboxhelper.hxx b/sw/inc/textboxhelper.hxx
index c2756af9a8d2..db49d276740e 100644
--- a/sw/inc/textboxhelper.hxx
+++ b/sw/inc/textboxhelper.hxx
@@ -45,9 +45,9 @@ class SW_DLLPUBLIC SwTextBoxHelper
 {
 public:
 /// Maps a draw format to a fly format.
-typedef std::map SavedLink;
+using SavedLink = std::map;
 /// Maps a draw format to content.
-typedef std::map SavedContent;
+using SavedContent = std::map;
 /// Create a TextBox for a shape.
 static void create(SwFrameFormat* pShape);
 /// Destroy a TextBox for a shape.
diff --git a/sw/source/filter/ww8/rtfexport.hxx 
b/sw/source/filter/ww8/rtfexport.hxx
index 72a0a5bc45f4..106d615d3ae2 100644
--- a/sw/source/filter/ww8/rtfexport.hxx
+++ b/sw/source/filter/ww8/rtfexport.hxx
@@ -26,7 +26,7 @@
 class RtfAttributeOutput;
 class RtfExportFilter;
 class RtfSdrExport;
-typedef std::map RtfColorTable;
+using RtfColorTable = std::map;
 class SwNode;
 class SwTextNode;
 class SwGrfNode;
diff --git a/sw/source/filter/ww8/rtfstringbuffer.hxx 
b/sw/source/filter/ww8/rtfstringbuffer.hxx
index dd9300657f5f..c1d90041e33b 100644
--- a/sw/source/filter/ww8/rtfstringbuffer.hxx
+++ b/sw/source/filter/ww8/rtfstringbuffer.hxx
@@ -56,7 +56,7 @@ public:
 /// Append all contained buffers and clear the argument.
 void appendAndClear(RtfStringBuffer& rBuf);
 private:
-typedef std::vector Values_t;
+using Values_t = std::vector;
 Values_t m_aValues;
 };
 
diff --git a/writerfilter/inc/dmapper/GraphicZOrderHelper.hxx 
b/writerfilter/inc/dmapper/GraphicZOrderHelper.hxx
index 60c6b493fe85..d73f7cc532b1 100644
--- a/writerfilter/inc/dmapper/GraphicZOrderHelper.hxx
+++ b/writerfilter/inc/dmapper/GraphicZOrderHelper.hxx
@@ -22,7 +22,7 @@ public:
 void addItem(css::uno::Reference const& props, 
sal_Int32 relativeHeight);
 sal_Int32 findZOrder(sal_Int32 relativeHeight, bool bOldStyle = false);
 private:
-typedef std::map< sal_Int32, css::uno::Reference 
> Items;
+using Items = std::map< sal_Int32, 
css::uno::Reference >;
 Items items;
 };
 
diff --git a/writerfilter/inc/rtftok/RTFDocument.hxx 
b/writerfilter/inc/rtftok/RTFDocument.hxx
index c3f65b7d5be4..086b39a8ce5a 100644
--- a/writerfilter/inc/rtftok/RTFDocument.hxx
+++ b/writerfilter/inc/rtftok/RTFDocument.hxx
@@ -27,7 +27,7 @@ class RTFDocument
 {
 public:
 /// Pointer to this stream.
-typedef std::shared_ptr Pointer_t;
+using Pointer_t = std::shared_ptr;
 
 virtual ~RTFDocument() { }
 
diff --git a/writerfilter/source/dmapper/TablePositionHandler.hxx 
b/writerfilter/source/dmapper/TablePositionHandler.hxx
index 1e0d096f02c6..3e95ce2e72d7 100644
--- a/writerfilter/source/dmapper/TablePositionHandler.hxx
+++ b/writerfilter/source/dmapper/TablePositionHandler.hxx
@@ -94,7 +94,7 @@ public:
 bool operator== (const TablePositionHandler& rHandler) const;
 };
 
-typedef std::shared_ptr TablePositionHandlerPtr;
+using TablePositionHandlerPtr = std::shared_ptr;
 } // namespace dmapper
 } // namespace writerfilter
 
diff --git a/writerfilter/source/rtftok/rtfcharsets.hxx 
b/writerfilter/source/rtftok/rtfcharsets.hxx
index 99e9d86e685c..bf993f4e204c 100644
--- a/writerfilter/source/rtftok/rtfcharsets.hxx
+++ b/writerfilter/source/rtftok/rtfcharsets.hxx
@@ -15,11 +15,11 @@ namespace writerfilter
 namespace rtftok
 {
 /// RTF legacy charsets
-typedef struct
+struct RTFEncoding
 {
 int charset;
 int codepage;
-} RTFEncoding;
+};
 extern RTFEncoding aRTFEncodings[];
 extern int nRTFEncodings;
 } // namespace rtftok
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
index 34ba2750a685..a35ea5850f10 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
@@ -96,9 +96,8 @@ enum class RTFFieldStatus
 };
 
 /// A buffer