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

2023-11-13 Thread Stephan Bergmann (via logerrit)
 include/sal/log-areas.dox|1 -
 sw/source/filter/ww8/ww8par2.cxx |1 -
 sw/source/filter/ww8/ww8scan.cxx |   17 -
 3 files changed, 19 deletions(-)

New commits:
commit c8dfb25a77f53668e407a60a6f4ae9a826aa015c
Author: Stephan Bergmann 
AuthorDate: Mon Nov 13 11:33:26 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Nov 13 14:43:49 2023 +0100

Drop DEBUGSPRMREADER code

Change-Id: Id204eae97850ef9c99229c1316090010013b06e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159367
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 960d89c94214..0b3907e08610 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -557,7 +557,6 @@ certain functionality.
 @li @c sw.pageframe - debug lifecycle of SwPageFrame
 @li @c sw.qa
 @li @c sw.rtf - .rtf export filter
-@li @c sw.sprmreader
 @li @c sw.tiled
 @li @c sw.ui
 @li @c sw.uno - Writer UNO interfaces
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 9771910f42d1..602256428563 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -3618,7 +3618,6 @@ void WW8RStyle::ImportSprms(sal_uInt8 *pSprms, short 
nLen, bool bPap)
 WW8SprmIter aSprmIter(pSprms, nLen, maSprmParser);
 while (const sal_uInt8* pSprm = aSprmIter.GetSprms())
 {
-SAL_INFO("sw.sprmreader",  "id is " << std::hex << 
aSprmIter.GetCurrentId());
 mpIo->ImportSprm(pSprm, aSprmIter.GetRemLen(), 
aSprmIter.GetCurrentId());
 aSprmIter.advance();
 }
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index b018b5bf796e..80f9102dcb1b 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -44,10 +44,6 @@
 #include 
 #include 
 
-#ifdef DEBUGSPRMREADER
-#include 
-#endif
-
 using namespace ::com::sun::star::lang;
 
 namespace
@@ -2833,19 +2829,6 @@ WW8PLCFx_Fc_FKP::WW8Fkp::WW8Fkp(const WW8Fib& rFib, 
SvStream* pSt,
 }
 
 maEntries.push_back(aEntry);
-
-#ifdef DEBUGSPRMREADER
-{
-sal_Int32 nLen;
-sal_uInt8* pSprms = GetLenAndIStdAndSprms( nLen );
-WW8SprmIter aIter(pSprms, nLen, maSprmParser);
-while (aIter.GetSprms())
-{
-SAL_INFO("sw.sprmreader",  "id is " << std::hex << 
aIter.GetCurrentId());
-aIter.advance();
-}
-}
-#endif
 }
 
 //one more FC than grrpl entries


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

2023-11-13 Thread Yli875 (via logerrit)
 include/sal/log-areas.dox|1 +
 sw/source/filter/ww8/ww8par2.cxx |4 +---
 sw/source/filter/ww8/ww8scan.cxx |2 +-
 3 files changed, 3 insertions(+), 4 deletions(-)

New commits:
commit 2ee71dff5cdc7ddd59f249e97d3c4154fa28d8fd
Author: Yli875 
AuthorDate: Tue Nov 7 16:17:03 2023 -0800
Commit: Hossein 
CommitDate: Mon Nov 13 11:18:33 2023 +0100

tdf#130924 replace debugging printf with SAL_INFO

DEBUGSPRMREADER was added in 616adc49d6fde24e809bd438d8e31de74bcf73ef,
5f653490a40850886f94c9fd6b381b4bed1de58a and also in
c80a0fcdd9a4389616e92cfeafa9d932a784ee71

Change-Id: I80ae8a75ac0f40bb633f4c0aee9bdcee0c26adfb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159090
Tested-by: Jenkins
Reviewed-by: Hossein 

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 0b3907e08610..960d89c94214 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -557,6 +557,7 @@ certain functionality.
 @li @c sw.pageframe - debug lifecycle of SwPageFrame
 @li @c sw.qa
 @li @c sw.rtf - .rtf export filter
+@li @c sw.sprmreader
 @li @c sw.tiled
 @li @c sw.ui
 @li @c sw.uno - Writer UNO interfaces
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index faa9d9e45d29..9771910f42d1 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -3618,9 +3618,7 @@ void WW8RStyle::ImportSprms(sal_uInt8 *pSprms, short 
nLen, bool bPap)
 WW8SprmIter aSprmIter(pSprms, nLen, maSprmParser);
 while (const sal_uInt8* pSprm = aSprmIter.GetSprms())
 {
-#ifdef DEBUGSPRMREADER
-fprintf(stderr, "id is %x\n", aIter.GetCurrentId());
-#endif
+SAL_INFO("sw.sprmreader",  "id is " << std::hex << 
aSprmIter.GetCurrentId());
 mpIo->ImportSprm(pSprm, aSprmIter.GetRemLen(), 
aSprmIter.GetCurrentId());
 aSprmIter.advance();
 }
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index c7b175f56e61..b018b5bf796e 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -2841,7 +2841,7 @@ WW8PLCFx_Fc_FKP::WW8Fkp::WW8Fkp(const WW8Fib& rFib, 
SvStream* pSt,
 WW8SprmIter aIter(pSprms, nLen, maSprmParser);
 while (aIter.GetSprms())
 {
-fprintf(stderr, "id is %x\n", aIter.GetCurrentId());
+SAL_INFO("sw.sprmreader",  "id is " << std::hex << 
aIter.GetCurrentId());
 aIter.advance();
 }
 }


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

2023-10-24 Thread sahil (via logerrit)
 include/sal/log-areas.dox |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 20ce362ee29642251a92d086debaac06746d9d08
Author: sahil 
AuthorDate: Tue Oct 24 12:29:32 2023 +0530
Commit: Hossein 
CommitDate: Tue Oct 24 17:53:42 2023 +0200

Remove unused entry from log-areas.dox

Change-Id: I1d7bb4183c45f752cddf118411259695a294b2cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158371
Reviewed-by: Hossein 
Tested-by: Hossein 

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 1b4fa4813a41..23bbed1a916b 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -348,7 +348,6 @@ certain functionality.
 
 @section pyuno
 
-@li @c pyuno
 @li @c pyuno.runtime
 
 @section sdext


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

2023-10-23 Thread sahil (via logerrit)
 include/sal/log-areas.dox |5 +
 pyuno/source/module/pyuno_runtime.cxx |6 ++
 2 files changed, 7 insertions(+), 4 deletions(-)

New commits:
commit c0e687edf47f9bd2735a4e71116a9c1e50900de6
Author: sahil 
AuthorDate: Fri Sep 1 22:35:58 2023 +0530
Commit: Hossein 
CommitDate: Mon Oct 23 16:54:59 2023 +0200

tdf#130924 replace '*printf' with 'SAL_*' logging macros in pyuno

Change-Id: I2c491629f52fe0b90517c563f221d7d0345b6ee9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156452
Tested-by: Jenkins
Reviewed-by: Hossein 

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 53e1e3ae0cdd..1b4fa4813a41 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -346,6 +346,11 @@ certain functionality.
 @li @c package.xstor
 @li @c package.threadeddeflate
 
+@section pyuno
+
+@li @c pyuno
+@li @c pyuno.runtime
+
 @section sdext
 
 @li @c sdext
diff --git a/pyuno/source/module/pyuno_runtime.cxx 
b/pyuno/source/module/pyuno_runtime.cxx
index 68b1ea508293..cb95e5a46dc1 100644
--- a/pyuno/source/module/pyuno_runtime.cxx
+++ b/pyuno/source/module/pyuno_runtime.cxx
@@ -17,6 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include 
 #include 
 
 #include "pyuno_impl.hxx"
@@ -944,10 +945,7 @@ Any Runtime::extractUnoException( const PyRef & excType, 
const PyRef ,
 buf.append( ", no traceback available\n" );
 }
 RuntimeException e(buf.makeStringAndClear());
-#if OSL_DEBUG_LEVEL > 0
-fprintf( stderr, "Python exception: %s\n",
- OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).getStr() 
);
-#endif
+SAL_WARN("pyuno.runtime", "Python exception: " << e.Message);
 ret <<= e;
 }
 return ret;


[Libreoffice-commits] core.git: include/sal solenv/clang-format vcl/inc vcl/Library_vcl.mk vcl/unx

2023-05-09 Thread Caolán McNamara (via logerrit)
 include/sal/log-areas.dox   |2 
 solenv/clang-format/excludelist |2 
 vcl/Library_vcl.mk  |2 
 vcl/inc/qt5/QtFrame.hxx |2 
 vcl/inc/strings.hrc |3 
 vcl/inc/unx/gtk/gtkframe.hxx|9 +
 vcl/inc/unx/salframe.h  |2 
 vcl/inc/unx/sessioninhibitor.hxx|3 
 vcl/unx/generic/window/sessioninhibitor.cxx |   19 +--
 vcl/unx/gtk3/gtkframe.cxx   |  174 +++-
 10 files changed, 197 insertions(+), 21 deletions(-)

New commits:
commit c04d0570b6c8c78e35c2c9b58bf37bb1218021f5
Author: Caolán McNamara 
AuthorDate: Tue May 9 08:46:09 2023 +0100
Commit: Caolán McNamara 
CommitDate: Tue May 9 20:42:49 2023 +0200

Resolves: tdf#142176 under GNOME inhibit logout if there are modified docs

and if we are forced to quit anyway, unset modifications on documents and
terminate.

Change-Id: If4a3aed48a4621950e2d630fdfef34b28ba1b089
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151575
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 15bcf5a03573..51b005e1bb51 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -506,7 +506,7 @@ certain functionality.
 @li @c vcl.quartz
 @li @c vcl.schedule - scheduler / main-loop information
 @li @c vcl.schedule.deinit
-@li @c vcl.screensaverinhibitor
+@li @c vcl.sessioninhibitor
 @li @c vcl.scrollbar - Scroll Bars
 @li @c vcl.se - VCL Session Manager
 @li @c vcl.se.debug
diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist
index 3453747854d3..a4f04ad0c9e7 100644
--- a/solenv/clang-format/excludelist
+++ b/solenv/clang-format/excludelist
@@ -14978,7 +14978,7 @@ vcl/unx/generic/printer/ppdparser.cxx
 vcl/unx/generic/printer/printerinfomanager.cxx
 vcl/unx/generic/window/salframe.cxx
 vcl/unx/generic/window/salobj.cxx
-vcl/unx/generic/window/screensaverinhibitor.cxx
+vcl/unx/generic/window/sessioninhibitor.cxx
 vcl/unx/gtk3/a11y/atklistener.hxx
 vcl/unx/gtk3/a11y/atkwrapper.hxx
 vcl/unx/gtk3/a11y/atkaction.cxx
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 9eca7534218e..a7c1fbc22b2f 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -579,7 +579,7 @@ endif
 
 ifeq ($(USING_X11),TRUE)
 $(eval $(call gb_Library_add_exception_objects,vcl,\
-vcl/unx/generic/window/screensaverinhibitor \
+vcl/unx/generic/window/sessioninhibitor \
 vcl/unx/generic/printer/cpdmgr \
 ))
 
diff --git a/vcl/inc/qt5/QtFrame.hxx b/vcl/inc/qt5/QtFrame.hxx
index b927d366765d..09abe5301538 100644
--- a/vcl/inc/qt5/QtFrame.hxx
+++ b/vcl/inc/qt5/QtFrame.hxx
@@ -34,7 +34,7 @@
 #include 
 
 #if CHECK_ANY_QT_USING_X11
-#include 
+#include 
 // any better way to get rid of the X11 / Qt type clashes?
 #undef Bool
 #undef CursorShape
diff --git a/vcl/inc/strings.hrc b/vcl/inc/strings.hrc
index 83beea008e9e..c2e95f20ceac 100644
--- a/vcl/inc/strings.hrc
+++ b/vcl/inc/strings.hrc
@@ -122,6 +122,9 @@
 #define STR_QUIRKY  NC_("STR_QUIRKY", "Quirky 
Tests: %1")
 #define STR_FAILED  NC_("STR_FAILED", "Failed 
Tests: %1")
 #define STR_SKIPPED NC_("STR_SKIPPED", 
"Skipped Tests: %1")
+
+#define STR_UNSAVED_DOCUMENTS   
NC_("STR_UNSAVED_DOCUMENTS", "There are unsaved documents")
+
 #endif // INCLUDED_VCL_INC_STRINGS_HRC
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
index 1a83a7fc39d3..890bcdb8a6ea 100644
--- a/vcl/inc/unx/gtk/gtkframe.hxx
+++ b/vcl/inc/unx/gtk/gtkframe.hxx
@@ -32,7 +32,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 
 #include 
 
@@ -187,6 +187,9 @@ class GtkSalFrame final : public SalFrame
 #endif
 gulong  m_nPortalSettingChangedSignalId;
 GDBusProxy* m_pSettingsPortal;
+gulong  m_nSessionClientSignalId;
+GDBusProxy* m_pSessionManager;
+GDBusProxy* m_pSessionClient;
 #if !GTK_CHECK_VERSION(4, 0, 0)
 GdkWindow*  m_pForeignParent;
 GdkNativeWindow m_aForeignParentWindow;
@@ -425,6 +428,8 @@ class GtkSalFrame final : public SalFrame
 
 void ListenPortalSettings();
 
+void ListenSessionManager();
+
 void UpdateGeometryFromEvent(int x_root, int y_root, int nEventX, int 
nEventY);
 
 public:
@@ -654,6 +659,8 @@ public:
 
 void SetColorScheme(GVariant* variant);
 
+void SessionManagerInhibit(bool bStart, ApplicationInhibitFlags eType, 
std::u16string_view sReason, const char* application_id);
+
 void DisallowCycleFocusOut();
 bool IsCycleFocusOutDisallowed() const;
 void AllowCycleFocusOut();
diff --git 

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

2022-10-18 Thread Stephan Bergmann (via logerrit)
 include/sal/log-areas.dox|1 +
 ucb/source/ucp/tdoc/tdoc_content.cxx |   26 ++
 ucb/source/ucp/tdoc/tdoc_contentcaps.cxx |9 +
 ucb/source/ucp/tdoc/tdoc_docmgr.cxx  |   26 ++
 ucb/source/ucp/tdoc/tdoc_docmgr.hxx  |7 +++
 ucb/source/ucp/tdoc/tdoc_provider.cxx|5 +
 ucb/source/ucp/tdoc/tdoc_provider.hxx|6 ++
 ucb/source/ucp/tdoc/tdoc_stgelems.cxx|5 +
 ucb/source/ucp/tdoc/tdoc_stgelems.hxx|5 +
 ucb/source/ucp/tdoc/tdoc_storage.cxx |2 +-
 10 files changed, 91 insertions(+), 1 deletion(-)

New commits:
commit d4512d391bc7f96af9b66a8ee44f3f2be38dc5ec
Author: Stephan Bergmann 
AuthorDate: Tue Oct 18 11:15:46 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Oct 18 12:26:19 2022 +0200

tdf#105609: Support DateModified for updated tdoc stream contents

...so that the Python script provider, based on those DateModified values, 
will
reload a script embedded in a document after that script has 
(programmatically)
been modified.

As long as a stream content in a tdoc document has not been modified, it 
will
report a default-initialized (all zero) DateModified.  Only when the stream 
has
been modified will that be changed to the current date.  While that might 
not be
the most beautiful implementation, it at least gets the job done of fixing
tdf#105609 "Python script provider does not reload modified embedded 
scripts".

(The DateModified values cannot be stored directly in the tdoc_ucp::Content
instances, as those are thrown away and recreated on demand.  So they 
needed to
be stored more persistently at the tdoc_ucp::OfficeDocumentsManager.)

Change-Id: Iee809960e1a1bc40961f0df2b3729e58b75e6028
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141491
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index e1c89b1f7df2..bf3a269f2f66 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -433,6 +433,7 @@ certain functionality.
 @li @c ucb.ucp.file
 @li @c ucb.ucp.ftp
 @li @c ucb.ucp.gio
+@li @c ucb.ucp.tdoc
 @li @c ucb.ucp.webdav
 @li @c ucb.ucp.webdav.curl
 
diff --git a/ucb/source/ucp/tdoc/tdoc_content.cxx 
b/ucb/source/ucp/tdoc/tdoc_content.cxx
index 89335ce58493..03c80a2ad756 100644
--- a/ucb/source/ucp/tdoc/tdoc_content.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_content.cxx
@@ -895,6 +895,20 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
 xRow->appendObject(
 rProp, uno::Any( rData.getCreatableContentsInfo() ) );
 }
+else if ( rProp.Name == "DateModified" )
+{
+// DateModified is only supported by streams.
+ContentType eType = rData.getType();
+if ( eType == STREAM )
+{
+xRow->appendObject(
+rProp,
+uno::Any(
+pProvider->queryStreamDateModified( rContentId ) ) 
);
+}
+else
+xRow->appendVoid( rProp );
+}
 else if ( rProp.Name == "Storage" )
 {
 // Storage is only supported by folders.
@@ -995,6 +1009,18 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
 | beans::PropertyAttribute::READONLY ),
 uno::Any( rData.getCreatableContentsInfo() ) );
 
+// DateModified is only supported by streams.
+if ( eType == STREAM )
+{
+xRow->appendObject(
+beans::Property( "DateModified",
+  -1,
+  cppu::UnoType::get(),
+  beans::PropertyAttribute::BOUND
+| beans::PropertyAttribute::READONLY ),
+uno::Any( pProvider->queryStreamDateModified( rContentId ) ) );
+}
+
 // Storage is only supported by folders.
 if ( eType == FOLDER )
 xRow->appendObject(
diff --git a/ucb/source/ucp/tdoc/tdoc_contentcaps.cxx 
b/ucb/source/ucp/tdoc/tdoc_contentcaps.cxx
index 8b19f9ec94b8..384bac2f941f 100644
--- a/ucb/source/ucp/tdoc/tdoc_contentcaps.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_contentcaps.cxx
@@ -34,6 +34,7 @@
 IsFolderr   r   r   r   r   r
 Title   r   r   w   w   w   w
 CreatableContentsInfo r r   r   r   r   r
+DateModified-   -   -   -   r   r
 Storage -   -   r   r   -   -
 DocumentModel   -   r   -   -   -   -
 
@@ -58,6 +59,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include "tdoc_content.hxx"
@@ -138,6 +140,13 @@ 

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

2022-07-07 Thread Stephan Bergmann (via logerrit)
 include/sal/log-areas.dox  |1 +
 sw/qa/unit/swmodeltestbase.cxx |2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 68c6401e5359466fc0b888d1f3a9be75e4c6ec51
Author: Stephan Bergmann 
AuthorDate: Thu Jul 7 11:45:49 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Jul 7 13:39:47 2022 +0200

Use a dedicated log area for a SAL_INFO in test code

Change-Id: I8824129c0c40406b3e0dd65d163662eb3aea258f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136878
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index b365b20e1622..543db1db1391 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -540,6 +540,7 @@ certain functionality.
 @li @c sw.layout.debug - Writer layout dbg_lay output
 @li @c sw.mailmerge - Writer mail merge
 @li @c sw.pageframe - debug lifecycle of SwPageFrame
+@li @c sw.qa
 @li @c sw.rtf - .rtf export filter
 @li @c sw.tiled
 @li @c sw.ui
diff --git a/sw/qa/unit/swmodeltestbase.cxx b/sw/qa/unit/swmodeltestbase.cxx
index b48a9030011d..e5c6e2cbde15 100644
--- a/sw/qa/unit/swmodeltestbase.cxx
+++ b/sw/qa/unit/swmodeltestbase.cxx
@@ -221,7 +221,7 @@ xmlDocUniquePtr SwModelTestBase::parseLayoutDump()
 dumpLayout(mxComponent);
 
 auto pBuffer = reinterpret_cast(xmlBufferContent(mpXmlBuffer));
-SAL_INFO("sw", "SwModelTestBase::parseLayoutDump: pBuffer is '" << pBuffer 
<< "'");
+SAL_INFO("sw.qa", "SwModelTestBase::parseLayoutDump: pBuffer is '" << 
pBuffer << "'");
 return xmlDocUniquePtr(xmlParseMemory(pBuffer, 
xmlBufferLength(mpXmlBuffer)));
 }
 


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

2022-06-21 Thread Noel Grandin (via logerrit)
 include/sal/log.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1fd6298be955331f64f6f0b2e04675d9914f44e4
Author: Noel Grandin 
AuthorDate: Tue Jun 21 12:10:21 2022 +0200
Commit: Noel Grandin 
CommitDate: Tue Jun 21 18:23:54 2022 +0200

use SAL_UNLIKELY to make logging a little more efficient

if we have logging compiled into a release build, the most frequent
logging (e.g. INFO) is typically off, so most of the time, we are not
going to execute the logging.

Change-Id: I2b464b4153307df8730998728e508cce09d5013b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136212
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/include/sal/log.hxx b/include/sal/log.hxx
index 5faeec3113dc..a60d8dc24829 100644
--- a/include/sal/log.hxx
+++ b/include/sal/log.hxx
@@ -148,7 +148,7 @@ inline char const * unwrapStream(SAL_UNUSED_PARAMETER 
StreamIgnore const &) {
 
 #define SAL_DETAIL_LOG_STREAM(condition, level, area, where, stream) \
 do { \
-if (condition) \
+if (SAL_UNLIKELY(condition)) \
 { \
 switch (sal_detail_log_report(level, area)) \
 { \


[Libreoffice-commits] core.git: include/sal officecfg/registry solenv/gbuild stoc/source

2022-05-13 Thread Michael Stahl (via logerrit)
 include/sal/log-areas.dox|1 
 officecfg/registry/schema/org/openoffice/Office/Java.xcs |7 
 solenv/gbuild/CppunitTest.mk |2 
 stoc/source/javaloader/javaloader.component  |3 
 stoc/source/javaloader/javaloader.cxx|  246 ++-
 5 files changed, 245 insertions(+), 14 deletions(-)

New commits:
commit 732fdafd9f7ccf383038258792c8cb15f30f8e74
Author: Michael Stahl 
AuthorDate: Wed May 11 12:07:06 2022 +0200
Commit: Michael Stahl 
CommitDate: Fri May 13 16:33:39 2022 +0200

officecfg,stoc: allow running JVM UNO components out-of-process

The problem is that 32-bit Win32 applications have very little VM, and
soffice.bin can run out, so try to move the JVM to a separate process
(uno.bin) and connect to it via pipe.

Add a new config to enable this:
"org.openoffice.Office.Java/VirtualMachine/RunUnoComponentsOutOfProcess"

If enabled, ServiceManager instantiates *all* JVM components
out-of-process, by instantiating
"com.sun.star.java.theJavaVirtualMachine" out-of-process.

To ensure that the remote connection is disconnected at shutdown (and
thereby prevent crashes with remote calls during late shutdown),
JavaComponentLoader is now a "single-instance" service; this change
should be harmless for the default in-process configuration case.

Tested with these extensions:
  Wiki Publisher
  smoketest TestExtension.oxt
  odk CalcAddins.oxt Inspector.oxt ToDo.oxt

Also passed "make check" on Linux when enabled, if the variable
URE_BIN_DIR is set properly for CppunitTest_services.

Change-Id: I76bf17a9512414b67dbd20daee25a6d29c05f9d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133218
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index f6b67006b255..b365b20e1622 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -456,6 +456,7 @@ certain functionality.
 @section stoc
 
 @li @c stoc.corerefl - CoreReflection
+@li @c stoc.java - javaloader and javavm
 
 @section VCL
 
diff --git a/officecfg/registry/schema/org/openoffice/Office/Java.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Java.xcs
index 72ec1b8cea02..cda437daa9bb 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Java.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Java.xcs
@@ -104,6 +104,13 @@
   Specifies properties for use with the Java VM.
 
   
+  
+
+  Specifies whether JVM based UNO components are run via uno 
command outside the LibreOffice process.
+  Run UNO components out-of-process
+
+false
+  
 
   
 
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index 995910cfbd0c..9545f0c52f1d 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -93,7 +93,7 @@ $(if $(URE),\
 $(if $(strip $(UNO_TYPES)),\
"-env:UNO_TYPES=$(foreach item,$(UNO_TYPES),$(call 
gb_Helper_make_url,$(item)))") \
 $(if $(strip $(UNO_SERVICES)),\
-   "-env:UNO_SERVICES=$(foreach item,$(UNO_SERVICES),$(call 
gb_Helper_make_url,$(item)))") \
+   "-env:UNO_SERVICES=$(foreach item,$(UNO_SERVICES),$(call 
gb_Helper_make_url,$(item)))" -env:URE_BIN_DIR=$(call 
gb_Helper_make_url,$(INSTROOT)/$(LIBO_URE_BIN_FOLDER))) \
-env:URE_INTERNAL_LIB_DIR=$(call 
gb_Helper_make_url,$(INSTROOT)/$(LIBO_URE_LIB_FOLDER)) \
-env:LO_LIB_DIR=$(call 
gb_Helper_make_url,$(INSTROOT)/$(LIBO_LIB_FOLDER)) \
-env:LO_JAVA_DIR=$(call 
gb_Helper_make_url,$(INSTROOT)/$(LIBO_SHARE_JAVA_FOLDER)) \
diff --git a/stoc/source/javaloader/javaloader.component 
b/stoc/source/javaloader/javaloader.component
index cc4ae610bdb2..e8d1533bac51 100644
--- a/stoc/source/javaloader/javaloader.component
+++ b/stoc/source/javaloader/javaloader.component
@@ -20,7 +20,8 @@
 http://openoffice.org/2010/uno-components;>
   
+constructor="stoc_JavaComponentLoader_get_implementation"
+single-instance="true">
 
 
   
diff --git a/stoc/source/javaloader/javaloader.cxx 
b/stoc/source/javaloader/javaloader.cxx
index be8e1c2a01ba..9b9195fbda66 100644
--- a/stoc/source/javaloader/javaloader.cxx
+++ b/stoc/source/javaloader/javaloader.cxx
@@ -43,20 +43,31 @@
 #pragma clang diagnostic pop
 #endif
 
+#include 
+#include 
+#include 
+#include 
 
 #include 
 
-#include 
+#include 
+#include 
 #include 
 
+#include 
+#include 
 #include 
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
 
+// this one is header-only
+#include 
+
 namespace com::sun::star::registry { class XRegistryKey; }
 
 using namespace css::java;
@@ -72,10 +83,167 @@ namespace stoc_javaloader {
 
 namespace {
 
-class JavaComponentLoader : public WeakImplHelper
+// from desktop/source/deployment/misc/dp_misc.cxx
+OUString 

[Libreoffice-commits] core.git: include/sal offapi/com offapi/UnoApi_offapi.mk Repository.mk shell/Library_jumplist.mk shell/Module_shell.mk shell/source

2022-03-30 Thread Samuel Mehrbrodt (via logerrit)
 Repository.mk   |1 
 include/sal/log-areas.dox   |1 
 offapi/UnoApi_offapi.mk |7 
 offapi/com/sun/star/system/windows/JumpList.idl |   33 +
 offapi/com/sun/star/system/windows/JumpListItem.idl |   55 +++
 offapi/com/sun/star/system/windows/XJumpList.idl|  125 +++
 shell/Library_jumplist.mk   |   37 ++
 shell/Module_shell.mk   |1 
 shell/source/win32/jumplist/JumpList.cxx|  354 
 shell/source/win32/jumplist/jumplist.component  |   17 
 10 files changed, 631 insertions(+)

New commits:
commit 7efd22c912262f7bf4e4735dae70db0b31ab3d5b
Author: Samuel Mehrbrodt 
AuthorDate: Mon Mar 14 10:04:17 2022 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Wed Mar 30 12:14:28 2022 +0200

Add UNO API for custom Jump Lists

Allows adding custom jump list categories to Windows Task Bar

Change-Id: I13b6c3ad5de386cf74e2b346f10889bc46a8ad4e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131540
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/Repository.mk b/Repository.mk
index fac1440aad50..bab79b16a21a 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -414,6 +414,7 @@ $(eval $(call 
gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
i18npool \
i18nsearch \
$(if $(ENABLE_JAVA),jdbc) \
+   $(if $(filter WNT,$(OS)),jumplist) \
$(if $(ENABLE_LDAP),ldapbe2) \
$(if $(filter WNT,$(OS)),WinUserInfoBe) \
localebe1 \
diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index edb93fea244b..b4f90e7e50d3 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -630,6 +630,7 @@ certain functionality.
 @li @c scripting
 @li @c scripting.provider
 @li @c shell
+@li @c shell.jumplist
 @li @c stoc
 @li @c store
 @li @c svg
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index cdf62376c30f..a9b92639a667 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -3639,6 +3639,13 @@ $(eval $(call 
gb_UnoApi_add_idlfiles,offapi,com/sun/star/system,\
XSimpleMailMessage2 \
XSystemShellExecute \
 ))
+
+$(eval $(call gb_UnoApi_add_idlfiles,offapi,com/sun/star/system/windows,\
+   JumpList \
+   JumpListItem \
+   XJumpList \
+))
+
 $(eval $(call gb_UnoApi_add_idlfiles,offapi,com/sun/star/table,\
BorderLine \
BorderLine2 \
diff --git a/offapi/com/sun/star/system/windows/JumpList.idl 
b/offapi/com/sun/star/system/windows/JumpList.idl
new file mode 100755
index ..82becd522b69
--- /dev/null
+++ b/offapi/com/sun/star/system/windows/JumpList.idl
@@ -0,0 +1,33 @@
+/* -*- 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/.
+ */
+
+#ifndef __com_sun_star_system_windows_JumpList_idl__
+#define __com_sun_star_system_windows_JumpList_idl__
+
+
+module com { module sun { module star { module system { module windows {
+
+
+interface XJumpList;
+
+/** Specifies a Jump List service. Allows to add custom commands to the 
Windows Jump List.
+
+@since LibreOffice 7.4
+
+@see com::sun::star::system::windows::XJumpList
+*/
+
+service JumpList : XJumpList;
+
+
+}; }; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/offapi/com/sun/star/system/windows/JumpListItem.idl 
b/offapi/com/sun/star/system/windows/JumpListItem.idl
new file mode 100755
index ..30a8bdd6f7e4
--- /dev/null
+++ b/offapi/com/sun/star/system/windows/JumpListItem.idl
@@ -0,0 +1,55 @@
+/* -*- 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/.
+ */
+
+#ifndef __com_sun_star_system_windows_JumpListItem_idl__
+#define __com_sun_star_system_windows_JumpListItem_idl__
+
+#include 
+#include 
+#include 
+
+
+module com { module sun { module star { module system { module windows {
+
+/** Specifies an item for com::sun::star::system::windows::XJumpList .
+
+@since LibreOffice 7.4
+*/
+
+struct JumpListItem
+{
+/** Item name. Appears in the JumpList.
+Has to be unique per category.
+Must not include embedded NULs ('\\0'). */
+string name;
+
+/** Item description, appears as tooltip.
+Must not include embedded NULs ('\\0').
+ */
+string description;
+
+

[Libreoffice-commits] core.git: include/sal vcl/inc vcl/qt5 vcl/source

2022-01-19 Thread Jan-Marek Glogowski (via logerrit)
 include/sal/log-areas.dox  |1 +
 vcl/inc/qt5/QtInstance.hxx |2 ++
 vcl/inc/salinst.hxx|2 ++
 vcl/qt5/QtInstance.cxx |   11 +++
 vcl/qt5/QtTimer.cxx|9 +
 vcl/source/app/svapp.cxx   |   21 +++--
 6 files changed, 44 insertions(+), 2 deletions(-)

New commits:
commit 93133585b5b52e38defc3162eeb1e7704dceafcb
Author: Jan-Marek Glogowski 
AuthorDate: Sat Oct 2 12:50:05 2021 +0200
Commit: Jan-Marek Glogowski 
CommitDate: Wed Jan 19 17:06:48 2022 +0100

WASM optionally run any app via system loop

Allows LO to run via system event loop instead of having an
own one and processing system events as needed. Needed for
WASM, so the browser isn't blocked, as there is no way to
run the browser mainloop from WASM. Generally an alternative
to running LO in a WebWorker and communicating to some
frontend.

Change-Id: I24955638827f3b8c04240845ffc781cd28f2aa29
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128602
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index fca315f7c915..5767a9e5265f 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -640,6 +640,7 @@ certain functionality.
 @li @c unoxml
 @li @c uui
 @li @c vbahelper
+@li @c wasm
 @li @c xmlhelp
 @li @c xmlreader
 
diff --git a/vcl/inc/qt5/QtInstance.hxx b/vcl/inc/qt5/QtInstance.hxx
index 1511996c0ce0..9c3adb25e98b 100644
--- a/vcl/inc/qt5/QtInstance.hxx
+++ b/vcl/inc/qt5/QtInstance.hxx
@@ -174,6 +174,8 @@ public:
 void UpdateStyle(bool bFontsChanged);
 
 void* CreateGStreamerSink(const SystemChildWindow*) override;
+
+bool DoExecute(int& nExitCode) override;
 };
 
 inline QtInstance* GetQtInstance() { return 
static_cast(GetSalInstance()); }
diff --git a/vcl/inc/salinst.hxx b/vcl/inc/salinst.hxx
index 9dcee57bc2e6..90367c06bcc9 100644
--- a/vcl/inc/salinst.hxx
+++ b/vcl/inc/salinst.hxx
@@ -214,6 +214,8 @@ public:
 
 // Note: we cannot make this a global variable, because it might be 
initialised BEFORE the putenv() call in cppunittester.
 static bool IsRunningUnitTest() { return getenv("LO_TESTNAME") != nullptr; 
}
+
+virtual bool DoExecute(int & /* nExitCode */) { return false; }
 };
 
 // called from SVMain
diff --git a/vcl/qt5/QtInstance.cxx b/vcl/qt5/QtInstance.cxx
index 9629532f824b..a03b71e46bd2 100644
--- a/vcl/qt5/QtInstance.cxx
+++ b/vcl/qt5/QtInstance.cxx
@@ -724,6 +724,17 @@ std::unique_ptr 
QtInstance::CreateQApplication(int& nArgc, char**
 return pQApp;
 }
 
+bool QtInstance::DoExecute(int& nExitCode)
+{
+#ifdef EMSCRIPTEN
+nExitCode = m_pQApplication->exec();
+return true;
+#else
+(void)nExitCode;
+return false;
+#endif
+}
+
 extern "C" {
 VCLPLUG_QT_PUBLIC SalInstance* create_SalInstance()
 {
diff --git a/vcl/qt5/QtTimer.cxx b/vcl/qt5/QtTimer.cxx
index 751937b44931..6568ca8ac1b8 100644
--- a/vcl/qt5/QtTimer.cxx
+++ b/vcl/qt5/QtTimer.cxx
@@ -20,12 +20,16 @@
 #include 
 #include 
 
+#include 
+
 #include 
 #include 
 
 #include 
 #include 
 
+#include 
+
 QtTimer::QtTimer()
 {
 m_aTimer.setSingleShot(true);
@@ -38,6 +42,11 @@ QtTimer::QtTimer()
 void QtTimer::timeoutActivated()
 {
 SolarMutexGuard aGuard;
+#ifdef EMSCRIPTEN
+const ImplSVData* pSVData = ImplGetSVData();
+assert(pSVData->mpDefInst);
+static_cast(pSVData->mpDefInst)->DispatchUserEvents(true);
+#endif
 CallCallback();
 }
 
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 2e02bffcb7f2..c1f3b4a5bccf 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -440,14 +440,19 @@ void Application::Execute()
 pSVData->maAppData.mpEventTestingIdle->Start();
 }
 
-while ( !pSVData->maAppData.mbAppQuit )
-Application::Yield();
+int nExitCode = 0;
+if (!pSVData->mpDefInst->DoExecute(nExitCode))
+{
+while (!pSVData->maAppData.mbAppQuit)
+Application::Yield();
+}
 
 pSVData->maAppData.mbInAppExecute = false;
 
 GetpApp()->Shutdown();
 }
 
+#ifndef EMSCRIPTEN
 static bool ImplYield(bool i_bWait, bool i_bAllEvents)
 {
 ImplSVData* pSVData = ImplGetSVData();
@@ -472,10 +477,17 @@ static bool ImplYield(bool i_bWait, bool i_bAllEvents)
 SAL_INFO("vcl.schedule", "Leave ImplYield with return " << bProcessedEvent 
);
 return bProcessedEvent;
 }
+#endif
 
 bool Application::Reschedule( bool i_bAllEvents )
 {
+#ifdef EMSCRIPTEN
+SAL_WARN("wasm", "Application::Reschedule(" << i_bAllEvents << ")");
+(void) i_bAllEvents;
+std::abort();
+#else
 return ImplYield(false, i_bAllEvents);
+#endif
 }
 
 void Scheduler::ProcessEventsToIdle()
@@ -529,7 +541,12 @@ SAL_DLLPUBLIC_EXPORT void unit_lok_process_events_to_idle()
 
 void Application::Yield()
 {
+#ifdef EMSCRIPTEN
+SAL_WARN("wasm", "Application::Yield()");
+std::abort();
+#else
 ImplYield(true, false);
+#endif
 }
 
 

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

2022-01-09 Thread Jan-Marek Glogowski (via logerrit)
 include/sal/log-areas.dox  |1 -
 sw/source/uibase/docvw/srcedtw.cxx |   10 +-
 2 files changed, 1 insertion(+), 10 deletions(-)

New commits:
commit 7af8def453c1cc066b439a14bf207ea42bcd6acb
Author: Jan-Marek Glogowski 
AuthorDate: Sun Jan 9 09:34:57 2022 +0100
Commit: Jan-Marek Glogowski 
CommitDate: Sun Jan 9 13:26:42 2022 +0100

Replace single sw.level2 log area user with area sw

Change-Id: I3df5c5f937361a7a0283a05a7b9c6669bb404c1e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128183
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 8702656bbb18..fca315f7c915 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -534,7 +534,6 @@ certain functionality.
 @li @c sw.idle
 @li @c sw.layout - Writer core view: document layout
 @li @c sw.layout.debug - Writer layout dbg_lay output
-@li @c sw.level2
 @li @c sw.mailmerge - Writer mail merge
 @li @c sw.pageframe - debug lifecycle of SwPageFrame
 @li @c sw.rtf - .rtf export filter
diff --git a/sw/source/uibase/docvw/srcedtw.cxx 
b/sw/source/uibase/docvw/srcedtw.cxx
index ba8bcad6650d..cbd0f132a943 100644
--- a/sw/source/uibase/docvw/srcedtw.cxx
+++ b/sw/source/uibase/docvw/srcedtw.cxx
@@ -148,20 +148,12 @@ static void lcl_Highlight(const OUString& rSource, 
TextPortions& aPortionList)
 HtmlTokenId nToken = ::GetHTMLToken(sToken);
 if(nToken != HtmlTokenId::NONE)
 {
-// Token was found
 eFoundType = svtools::HTMLKEYWORD;
 nPortEnd = nSrchPos;
 nPortStart = nActPos;
 }
 else
-{
-// what was that?
-SAL_WARN(
-"sw.level2",
-"Token " << sToken
-<< " not recognised!");
-}
-
+SAL_WARN("sw", "HTML token " << sToken << " not 
recognised!");
 }
 }
 // now we still have to look for '>'


[Libreoffice-commits] core.git: include/sal vcl/win

2021-11-10 Thread Tor Lillqvist (via logerrit)
 include/sal/log-areas.dox |1 +
 vcl/win/gdi/salprn.cxx|4 
 2 files changed, 5 insertions(+)

New commits:
commit b287e9bb4bf60fb49c2832eba0afd85102b84823
Author: Tor Lillqvist 
AuthorDate: Tue Nov 9 15:10:58 2021 +0200
Commit: Tor Lillqvist 
CommitDate: Wed Nov 10 11:34:26 2021 +0100

Add SAL_INFO of what paper sizes the printer (driver) advertises

Change-Id: I9598a829c22cc4d02244fff6616584aa6dbac68e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124916
Tested-by: Tor Lillqvist 
Reviewed-by: Tor Lillqvist 

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 55f15022f340..8702656bbb18 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -491,6 +491,7 @@ certain functionality.
 @li @c vcl.osx.clipboard
 @li @c vcl.osx.print
 @li @c vcl.pdfwriter
+@li @c vcl.print
 @li @c vcl.plugadapt - the Unix/X11 backend plugin mechanism
 @li @c vcl.qt - Qt
 @li @c vcl.quartz
diff --git a/vcl/win/gdi/salprn.cxx b/vcl/win/gdi/salprn.cxx
index 332c7a8dfaae..835c571785a6 100644
--- a/vcl/win/gdi/salprn.cxx
+++ b/vcl/win/gdi/salprn.cxx
@@ -52,6 +52,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -1126,6 +1127,9 @@ void WinSalInfoPrinter::InitPaperFormats( const 
ImplJobSetup* pSetupData )
 
 sal_Unicode* pNamesBuffer = 
static_cast(std::malloc(nCount*64*sizeof(sal_Unicode)));
 ImplDeviceCaps( this, DC_PAPERNAMES, 
reinterpret_cast(pNamesBuffer), pSetupData );
+
+SAL_INFO("vcl.print", "DC_PAPERSIZE sizes (mm) from printer: " << 
DC_PAPERSIZE_array_to_string(pPaperSizes, nCount));
+
 for( DWORD i = 0; i < nCount; ++i )
 {
 PaperInfo aInfo(pPaperSizes[i].x * 10, pPaperSizes[i].y * 10);


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

2021-11-01 Thread Jan-Marek Glogowski (via logerrit)
 include/sal/log.hxx |   11 +++
 1 file changed, 11 insertions(+)

New commits:
commit c8c11b55456df5b418848ac3159b9f370215bc09
Author: Jan-Marek Glogowski 
AuthorDate: Sun Oct 31 02:33:46 2021 +0200
Commit: Jan-Marek Glogowski 
CommitDate: Mon Nov 1 12:23:38 2021 +0100

Add SAL_DEBUG_IF

Change-Id: If2452cd4bad7266e7e07baaea26c58ef26ead5f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124509
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/include/sal/log.hxx b/include/sal/log.hxx
index c64ea5079c81..5faeec3113dc 100644
--- a/include/sal/log.hxx
+++ b/include/sal/log.hxx
@@ -385,6 +385,17 @@ inline char const * unwrapStream(SAL_UNUSED_PARAMETER 
StreamIgnore const &) {
 SAL_DETAIL_LOG_STREAM( \
 SAL_LOG_TRUE, ::SAL_DETAIL_LOG_LEVEL_DEBUG, NULL, NULL, stream)
 
+/**
+  Produce temporary debugging output from stream, if condition is true.  This
+  macro is meant to be used only while working on code and should never exist
+  in production code.
+
+  See @ref sal_log "basic logging functionality" for details.
+*/
+#define SAL_DEBUG_IF(condition, stream)   \
+SAL_DETAIL_LOG_STREAM( \
+(condition), ::SAL_DETAIL_LOG_LEVEL_DEBUG, NULL, NULL, stream)
+
 /**
   Produce temporary debugging output from stream along with a backtrace of the
   calling location.


[Libreoffice-commits] core.git: include/sal sal/cppunittester winaccessibility/source

2021-09-30 Thread Stephan Bergmann (via logerrit)
 include/sal/log-areas.dox   |1 +
 sal/cppunittester/cppunittester.cxx |2 +-
 winaccessibility/source/UAccCOM/AccTextBase.cxx |2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 348cb77fddd3095e0c8eb4f005743b2b7542
Author: Stephan Bergmann 
AuthorDate: Thu Sep 30 09:52:22 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Sep 30 12:25:34 2021 +0200

loplugin:sallogareas (clang-cl)

Change-Id: I6a529d2eb737d284bf1e9c1857680c33581f5e0e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122846
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index b9c5945e8c1f..f880b9c28ef4 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -21,6 +21,7 @@ certain functionality.
 @section SAL
 
 @li @c sal.bootstrap - SAL bootstrap
+@li @c sal.cppunittester
 @li @c sal.debug - SAL debugging functionality
 @li @c sal.file - file system operations
 @li @c sal.fileio - file I/O
diff --git a/sal/cppunittester/cppunittester.cxx 
b/sal/cppunittester/cppunittester.cxx
index 63567d681cfd..1e1d5e65f59e 100644
--- a/sal/cppunittester/cppunittester.cxx
+++ b/sal/cppunittester/cppunittester.cxx
@@ -582,7 +582,7 @@ static void AbortSignalHandler(int signal)
 {
 if (signal == SIGABRT) {
 std::unique_ptr bs = sal::backtrace_get(50);
-SAL_WARN("sal", "CAUGHT SIGABRT:\n" << 
sal::backtrace_to_string(bs.get()));
+SAL_WARN("sal.cppunittester", "CAUGHT SIGABRT:\n" << 
sal::backtrace_to_string(bs.get()));
 }
 }
 
diff --git a/winaccessibility/source/UAccCOM/AccTextBase.cxx 
b/winaccessibility/source/UAccCOM/AccTextBase.cxx
index aef8e80b572f..5fb59edb494d 100644
--- a/winaccessibility/source/UAccCOM/AccTextBase.cxx
+++ b/winaccessibility/source/UAccCOM/AccTextBase.cxx
@@ -65,7 +65,7 @@ sal_Int16 lcl_matchIA2TextBoundaryType(IA2TextBoundaryType 
boundaryType)
 break;
 }
 
-SAL_WARN("winaccessibility", "Unmatched text boundary type: " << 
boundaryType);
+SAL_WARN("iacc2", "Unmatched text boundary type: " << boundaryType);
 return -1;
 }
 }


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

2021-05-18 Thread Stephan Bergmann (via logerrit)
 include/sal/log.hxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 95e26d3dce4f5a3b2d010d5ca47b4e450905a100
Author: Stephan Bergmann 
AuthorDate: Tue May 18 12:58:34 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Wed May 19 07:27:32 2021 +0200

tdf#142326: Adapt to "libstdc++: Implement LWG 1203 for rvalue iostreams"

...for libstdc++ 11.2, similar to 1f36f21d91c429190ae314dadeec409f35f4
"Adapt to "libstdc++: Implement LWG 1203 for rvalue iostreams" for 
libstdc++ 12.
The libstdc++ change referenced there has been backported to the 
releases/gcc-11
branch past the releases/gcc-11.1.0 tag (i.e., only towards libstdc++ 11.2) 
as


"libstdc++: Implement LWG 1203 for rvalue iostreams".

According to
,

,
and , the right __GLIBCXX__ 
value for
libstdc++ 11.1 should be 20210427, but at least
libstdc++-devel-11.1.1-1.fc34.x86_64 defines it as 20210428 while not 
including
the above "libstdc++: Implement LWG 1203 for rvalue iostreams" commit, so 
use
that value here.

Change-Id: I4e2c6d6ad8156a83f5c4bc861e4a118271928a20
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115738
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/include/sal/log.hxx b/include/sal/log.hxx
index f92f36e2ff33..c64ea5079c81 100644
--- a/include/sal/log.hxx
+++ b/include/sal/log.hxx
@@ -192,7 +192,9 @@ inline char const * unwrapStream(SAL_UNUSED_PARAMETER 
StreamIgnore const &) {
 
 @since LibreOffice 3.5
 */
-#if defined _LIBCPP_VERSION || (defined _GLIBCXX_RELEASE && _GLIBCXX_RELEASE 
>= 12) \
+#if defined _LIBCPP_VERSION \
+|| (defined _GLIBCXX_RELEASE \
+&& (_GLIBCXX_RELEASE >= 12 || (_GLIBCXX_RELEASE == 11 && __GLIBCXX__ > 
20210428))) \
 || (defined _MSC_VER && _MSC_VER >= 1915)
 #define SAL_STREAM(stream) \
 (::std::ostringstream() << stream).str()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-05 Thread Stephan Bergmann (via logerrit)
 include/sal/log.hxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 1f36f21d91c429190ae314dadeec409f35f4
Author: Stephan Bergmann 
AuthorDate: Wed May 5 08:20:18 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Wed May 5 15:09:35 2021 +0200

Adapt to "libstdc++: Implement LWG 1203 for rvalue iostreams"



towards GCC 12, so that now "the return type is the original rvalue stream 
type
not its base class."  (And which would thus have caused issues like

> sfx2/source/control/bindings.cxx:1323:19: error: dynamic_cast from rvalue 
to reference type '::std::ostringstream &' (aka 'basic_ostringstream &')
> ? SAL_STREAM("File: " << pFile << " Line: " << nLine) : 
""));
> 
~~^~
> include/sal/log.hxx:198:6: note: expanded from macro 'SAL_STREAM'
> (dynamic_cast< ::std::ostringstream & >(::std::ostringstream() << 
stream).str())
>  ^
> include/sal/log.hxx:341:20: note: expanded from macro 'SAL_INFO'
> SAL_WHERE, stream)
> ~~~^~~
> include/sal/log.hxx:155:68: note: expanded from macro 
'SAL_DETAIL_LOG_STREAM'
> SAL_DETAIL_LOG_STREAM_PRIVATE_(level, area, where, 
stream); \
> ~~~^~~
> include/sal/log.hxx:133:45: note: expanded from macro 
'SAL_DETAIL_LOG_STREAM_PRIVATE_'
> ::sal::detail::StreamStart() << stream) == 1) \
> ^~

now.  While the issue with old libstdc++ that originally prompted the
dynamic_cast was

> sfx2/source/control/bindings.cxx:1323:19: error: no member named 'str' in 
'std::basic_ostream'
> ? SAL_STREAM("File: " << pFile << " Line: " << nLine) : 
""));
> 
~~^~
> include/sal/log.hxx:194:40: note: expanded from macro 'SAL_STREAM'
> (::std::ostringstream() << stream).str()
>^
> include/sal/log.hxx:336:20: note: expanded from macro 'SAL_INFO'
> SAL_WHERE, stream)
> ~~~^~~
> include/sal/log.hxx:155:68: note: expanded from macro 
'SAL_DETAIL_LOG_STREAM'
> SAL_DETAIL_LOG_STREAM_PRIVATE_(level, area, where, 
stream); \
> ~~~^~~
> include/sal/log.hxx:133:45: note: expanded from macro 
'SAL_DETAIL_LOG_STREAM_PRIVATE_'
> ::sal::detail::StreamStart() << stream) == 1) \
> ^~

.)

The libstdc++ macro _GLIBCXX_RELEASE is reportedly available since GCC 7.1.

Change-Id: I1ee6eabb66355c1f28b9d305cbd85bac50d6b0e1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115121
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/include/sal/log.hxx b/include/sal/log.hxx
index 943ab3169bca..f92f36e2ff33 100644
--- a/include/sal/log.hxx
+++ b/include/sal/log.hxx
@@ -192,7 +192,8 @@ inline char const * unwrapStream(SAL_UNUSED_PARAMETER 
StreamIgnore const &) {
 
 @since LibreOffice 3.5
 */
-#if defined _LIBCPP_VERSION || (defined _MSC_VER && _MSC_VER >= 1915)
+#if defined _LIBCPP_VERSION || (defined _GLIBCXX_RELEASE && _GLIBCXX_RELEASE 
>= 12) \
+|| (defined _MSC_VER && _MSC_VER >= 1915)
 #define SAL_STREAM(stream) \
 (::std::ostringstream() << stream).str()
 #else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-01 Thread Andrea Gelmini (via logerrit)
 include/sal/types.h |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 746016f9ab2cd72a49484c25ab18dad3f9c39a90
Author: Andrea Gelmini 
AuthorDate: Fri Apr 30 23:32:47 2021 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Sat May 1 12:23:31 2021 +0200

Fix typo

Change-Id: I1edc4bf2ff17c259ce654bba953c0e4705de35c2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114950
Reviewed-by: Adolfo Jayme Barrientos 
Tested-by: Jenkins

diff --git a/include/sal/types.h b/include/sal/types.h
index 5fac8e8f9d3b..7bfb256e3208 100644
--- a/include/sal/types.h
+++ b/include/sal/types.h
@@ -406,7 +406,7 @@ namespace css = ::com::sun::star;
 
 /** Macro for C++11 "noexcept" vs. "throw ()" exception specification.
 
-The latter has has been removed completely from C++20.
+The latter has been removed completely from C++20.
 
 @since LibreOffice 7.2
  */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-04-30 Thread Stephan Bergmann (via logerrit)
 include/sal/types.h |   22 +-
 1 file changed, 9 insertions(+), 13 deletions(-)

New commits:
commit ce5702d3c27e2a9de253ee29e02c7f494ba2a2b8
Author: Stephan Bergmann 
AuthorDate: Thu Apr 29 10:44:09 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Apr 30 09:19:14 2021 +0200

Reshuffle code a bit

Group the various SAL_THROW_EXTERN_C macro definitions more closely 
together,
and the C++ SAL_THROW_EXTERN_C and COVERITY_NOEXCEPT_FLASE macro 
definitions do
not need to be inside an extern "C" block.

Change-Id: I8c56f5c2efd287934cc75b20e79c27769e887e24
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114845
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/include/sal/types.h b/include/sal/types.h
index 4f6f1ba0e817..7733920f20be 100644
--- a/include/sal/types.h
+++ b/include/sal/types.h
@@ -319,13 +319,21 @@ typedef struct _sal_Sequence
 #pragma pack(pop)
 #endif
 
-#if defined __cplusplus
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
 
 /** Nothrow specification for C functions.
 
 This is a macro so it can expand to nothing in C code.
 */
+#if defined __cplusplus
 #define SAL_THROW_EXTERN_C() throw ()
+#else
+#define SAL_THROW_EXTERN_C()
+#endif
+
+#ifdef __cplusplus
 
 /** To markup destructors that coverity warns might throw exceptions
 which won't throw in practice, or where std::terminate is
@@ -337,18 +345,6 @@ typedef struct _sal_Sequence
 #   define COVERITY_NOEXCEPT_FALSE
 #endif
 
-#else
-
-#define SAL_THROW_EXTERN_C()
-
-#endif
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#ifdef __cplusplus
-
 enum __sal_NoAcquire
 {
 /** definition of a no acquire enum for ctors
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/sal vcl/win

2021-01-28 Thread Jan-Marek Glogowski (via logerrit)
 include/sal/log-areas.dox |2 +-
 vcl/win/dtrans/DOTransferable.cxx |8 
 vcl/win/dtrans/MtaOleClipb.cxx|6 +++---
 3 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit f974f3941ce593005a99d75f3ef0307000313235
Author: Jan-Marek Glogowski 
AuthorDate: Thu Jan 28 10:34:48 2021 +0100
Commit: Jan-Marek Glogowski 
CommitDate: Thu Jan 28 15:12:44 2021 +0100

WIN move dtrans log to vcl.win.dtrans

Missing from commit 9613165239ade3f0b4d3d06e238430aabc9fcff3
("WIN move dtrans code into vcl/win/dtrans").

Change-Id: I257017ae617f72c3ce48828ee34e9246af08fd8b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110073
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 0d286366d598..647f5c1902ec 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -506,6 +506,7 @@ certain functionality.
 @li @c vcl.virdev
 @li @c vcl.watchdog
 @li @c vcl.window
+@li @c vcl.win.dtrans
 @li @c vcl.wmf
 
 @section winaccessibility
@@ -607,7 +608,6 @@ certain functionality.
 @li @c configmgr.dconf
 @li @c cppcanvas
 @li @c cppcanvas.emf
-@li @c dtrans
 @li @c helpcompiler
 @li @c idl
 @li @c javaunohelper
diff --git a/vcl/win/dtrans/DOTransferable.cxx 
b/vcl/win/dtrans/DOTransferable.cxx
index 409c671e3de4..0c61dd77 100644
--- a/vcl/win/dtrans/DOTransferable.cxx
+++ b/vcl/win/dtrans/DOTransferable.cxx
@@ -92,7 +92,7 @@ void clipDataToByteStream( CLIPFORMAT cf, STGMEDIUM 
stgmedium, CDOTransferable::
 HRESULT hr = pStream->Stat(, STATFLAG_NONAME);
 if (FAILED(hr))
 {
-SAL_WARN("dtrans", "clipDataToByteStream: Stat() failed");
+SAL_WARN("vcl.win.dtrans", "clipDataToByteStream: Stat() failed");
 return;
 }
 
@@ -103,18 +103,18 @@ void clipDataToByteStream( CLIPFORMAT cf, STGMEDIUM 
stgmedium, CDOTransferable::
 hr = pStream->Seek(li, STREAM_SEEK_SET, nullptr);
 if (FAILED(hr))
 {
-SAL_WARN("dtrans", "clipDataToByteStream: Seek() failed");
+SAL_WARN("vcl.win.dtrans", "clipDataToByteStream: Seek() failed");
 }
 
 ULONG nRead = 0;
 hr = pStream->Read(aByteSequence.getArray(), nMemSize, );
 if (FAILED(hr))
 {
-SAL_WARN("dtrans", "clipDataToByteStream: Read() failed");
+SAL_WARN("vcl.win.dtrans", "clipDataToByteStream: Read() failed");
 }
 if (nRead < nMemSize)
 {
-SAL_WARN("dtrans", "clipDataToByteStream: Read() was partial");
+SAL_WARN("vcl.win.dtrans", "clipDataToByteStream: Read() was 
partial");
 }
 
 return;
diff --git a/vcl/win/dtrans/MtaOleClipb.cxx b/vcl/win/dtrans/MtaOleClipb.cxx
index d894ae7b5a48..6fc789e27d9d 100644
--- a/vcl/win/dtrans/MtaOleClipb.cxx
+++ b/vcl/win/dtrans/MtaOleClipb.cxx
@@ -239,7 +239,7 @@ CMtaOleClipboard::CMtaOleClipboard( ) :
 m_ClipboardChangedEventCount( 0 )
 {
 OSL_ASSERT( nullptr != m_hEvtThrdReady );
-SAL_WARN_IF(!m_hEvtWndDisposed, "dtrans", "CreateEventW failed: 
m_hEvtWndDisposed is nullptr");
+SAL_WARN_IF(!m_hEvtWndDisposed, "vcl.win.dtrans", "CreateEventW failed: 
m_hEvtWndDisposed is nullptr");
 
 s_theMtaOleClipboardInst = this;
 
@@ -520,7 +520,7 @@ LRESULT CMtaOleClipboard::sendMessage( UINT msg, WPARAM 
wParam, LPARAM lParam )
 bool CMtaOleClipboard::postMessage( UINT msg, WPARAM wParam, LPARAM lParam )
 {
 bool const ret = PostMessageW(m_hwndMtaOleReqWnd, msg, wParam, lParam);
-SAL_WARN_IF(!ret, "dtrans", "ERROR: PostMessage() failed!");
+SAL_WARN_IF(!ret, "vcl.win.dtrans", "ERROR: PostMessage() failed!");
 return ret;
 }
 
@@ -576,7 +576,7 @@ LRESULT CALLBACK CMtaOleClipboard::mtaOleReqWndProc( HWND 
hWnd, UINT uMsg, WPARA
 case MSG_REGCLIPVIEWER:
 {
 MsgCtx* pMsgCtx = reinterpret_cast(lParam);
-SAL_WARN_IF(!pMsgCtx, "dtrans", "pMsgCtx is nullptr");
+SAL_WARN_IF(!pMsgCtx, "vcl.win.dtrans", "pMsgCtx is nullptr");
 
 pImpl->onRegisterClipViewer(
 
reinterpret_cast(wParam));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/sal vcl/osx

2021-01-14 Thread Tor Lillqvist (via logerrit)
 include/sal/log-areas.dox |1 
 vcl/osx/DataFlavorMapping.cxx |   79 +++---
 2 files changed, 46 insertions(+), 34 deletions(-)

New commits:
commit 84a6cfd9bb6532602ca811b0d5daf016bb9b4578
Author: Tor Lillqvist 
AuthorDate: Thu Jan 14 16:03:33 2021 +0200
Commit: Tor Lillqvist 
CommitDate: Fri Jan 15 08:48:54 2021 +0100

Fix handling of the OBJECTDESCRIPTOR clipboard (pasteboard) type on macOS

This fixes a demonstrable problem, and affects only macOS.

This is also on the path towards fixing
https://github.com/CollaboraOnline/online/issues/849 , even if the
code touched here is for macOS only. The iOS pasteboard handling code
is based on the macOS one.

We need the pasteboard to have the OBJECTDESCRIPTOR type as a MIME
type that includes the typename attribute, because the code in sc
checks for that when it decides whether it is a proper
OBJECTDESCRIPTOR.

Simplify the data in the flavorMap array. No need to duplicate the
same MIME type string as both the pasteboard type and MIME type, for
those cases where the MIME type is used diretly as pasteboard type. We
also know that for those types, the MIME type might have additional
parameters, so be more lenient in checking.

With this change, and my recent change to sot, this now works:

Start LibreOffice. Open a spreadsheet. Select a cell range. (It can
include formulas.) Edit > Copy. Quit LibreOffice.

Start LibreOffice again. Open a spreadsheet. Edit > Paste. You get the
very same cells that you pasted as such (with relative cell addresses
in formulas properly adjusted, as expected).

Previously, it would paste an image of the copied cell range, which is
fairly pointless.

There is still lots of opportunity for cleanup in the clipboard code
for macOS and iOS. It is presumably rather pointless to put images on
the pasteboard in Windows bitmap format, for instance. Just PNG should
be enough. No idea why the code provides the TIFF pasteboard type for
images. Ditto for Windows metafiles (WMF and EMF). It is also unclear
how useful the EMBED_SOURCE or LINK_SOURCE types are on macOS, for
instance.

Change-Id: I573648480b03972b506203b4f470d513bcb81212
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109297
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist 

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index e6463117d1b8..4bdd3fb19a23 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -484,6 +484,7 @@ certain functionality.
 @li @c vcl.opengl
 @li @c vcl.opengl.qt5 - QT5 OpenGL
 @li @c vcl.osx
+@li @c vcl.osx.clipboard
 @li @c vcl.osx.print
 @li @c vcl.pdfwriter
 @li @c vcl.plugadapt - the Unix/X11 backend plugin mechanism
diff --git a/vcl/osx/DataFlavorMapping.cxx b/vcl/osx/DataFlavorMapping.cxx
index 26724c5aed97..5659ce1e342b 100644
--- a/vcl/osx/DataFlavorMapping.cxx
+++ b/vcl/osx/DataFlavorMapping.cxx
@@ -1,4 +1,4 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
 /*
  * This file is part of the LibreOffice project.
  *
@@ -74,19 +74,6 @@ namespace
 return [NSString stringWithCString: utf8Str.getStr() encoding: 
NSUTF8StringEncoding];
   }
 
-  NSString* PBTYPE_SODX = 
@"application/x-openoffice-objectdescriptor-xml;windows_formatname=\"Star 
Object Descriptor (XML)\"";
-  NSString* PBTYPE_SESX = 
@"application/x-openoffice-embed-source-xml;windows_formatname=\"Star Embed 
Source (XML)\"";
-  NSString* PBTYPE_SLSDX = 
@"application/x-openoffice-linksrcdescriptor-xml;windows_formatname=\"Star Link 
Source Descriptor (XML)\"";
-  NSString* PBTYPE_ESX = 
@"application/x-openoffice-embed-source-xml;windows_formatname=\"Star Embed 
Source (XML)\"";
-  NSString* PBTYPE_LSX = 
@"application/x-openoffice-link-source-xml;windows_formatname=\"Star Link 
Source (XML)\"";
-  NSString* PBTYPE_EOX = 
@"application/x-openoffice-embedded-obj-xml;windows_formatname=\"Star Embedded 
Object (XML)\"";
-  NSString* PBTYPE_SVXB = 
@"application/x-openoffice-svbx;windows_formatname=\"SVXB (StarView 
Bitmap/Animation)\"";
-  NSString* PBTYPE_GDIMF = 
@"application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\"";
-  NSString* PBTYPE_WMF = 
@"application/x-openoffice-wmf;windows_formatname=\"Image WMF\"";
-  NSString* PBTYPE_EMF = 
@"application/x-openoffice-emf;windows_formatname=\"Image EMF\"";
-
-  NSString* PBTYPE_DUMMY_INTERNAL = @"application/x-openoffice-internal";
-
   const char* FLAVOR_SODX = 
"application/x-openoffice-objectdescriptor-xml;windows_formatname=\"Star Object 
Descriptor (XML)\"";
   const char* FLAVOR_SESX = 
"application/x-openoffice-embed-source-xml;windows_formatname=\"Star Embed 
Source (XML)\"";
   const char* FLAVOR_SLSDX = 

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

2020-12-17 Thread Eike Rathke (via logerrit)
 include/sal/mathconf.h |   14 ++
 1 file changed, 14 insertions(+)

New commits:
commit cb22636a56b35d4e118446cc3c9fe606db6f46b0
Author: Eike Rathke 
AuthorDate: Thu Dec 17 20:44:43 2020 +0100
Commit: Eike Rathke 
CommitDate: Fri Dec 18 01:05:16 2020 +0100

Add sal_uInt64 fields to sal_math_Double

We may need them later, and at least don't have a confusing
inf_parts or nan_parts struct name but just parts as well.

Change-Id: Ife0cf279c47d2815aa2a1483223397b147e9d776
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107924
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/include/sal/mathconf.h b/include/sal/mathconf.h
index 8e5831cde3b5..ab6a4807b59f 100644
--- a/include/sal/mathconf.h
+++ b/include/sal/mathconf.h
@@ -104,6 +104,13 @@ union sal_math_Double
 unsigned msw  :32;
 unsigned lsw  :32;
 } w32_parts;
+struct
+{
+sal_uInt64 sign   : 1;
+sal_uInt64 exponent   :11;
+sal_uInt64 fraction   :52;
+} parts;
+sal_uInt64 intrep;
 double value;
 };
 
@@ -130,6 +137,13 @@ union sal_math_Double
 unsigned lsw  :32;
 unsigned msw  :32;
 } w32_parts;
+struct
+{
+sal_uInt64 fraction   :52;
+sal_uInt64 exponent   :11;
+sal_uInt64 sign   : 1;
+} parts;
+sal_uInt64 intrep;
 double value;
 };
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-14 Thread Stephan Bergmann (via logerrit)
 include/sal/mathconf.h |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit eed2f0fd3fb70bcf26539683c4347e418da66ff1
Author: Stephan Bergmann 
AuthorDate: Mon Dec 14 15:22:52 2020 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Dec 14 17:29:20 2020 +0100

macOS __arm64__ math.h does not define legacy finite


/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/
SDKs/MacOSX.sdk/usr/include/math.h only declares it in an

> #if defined __i386__ || defined __x86_64__
[...]
> /* Legacy BSD API; use the C99 `isfinite( )` macro instead.   
*/
> extern int finite(double)
> __API_DEPRECATED("Use `isfinite((double)x)` instead.", macos(10.0, 10.9)) 
__API_UNAVAILABLE(ios, watchos, tvos);

block, so CppunitTest_odk_checkapi (which deliberately builds in pre-C++11 
mode)
failed with

> In file included from ~/lo/core/odk/qa/checkapi/checkapi.cxx:29:
> In file included from 
~/lo/core/workdir/CustomTarget/odk/allheaders/allheaders.hxx:351:
> ~/lo/core/include/rtl/math.hxx:352:12: error: use of undeclared 
identifier 'finite'; did you mean 'isfinite'?
> return SAL_MATH_FINITE(d);
>^

So extend 19bce817279c7fd150af0422c224975e57ff9f41 "Try to use isfinite() 
for
iOS" to all Apple non-Intel platforms.  (We no longer support macOS __i386__
builds, but it probably does not hurt to nevertheless mention it here in the
URE interface sal/mathconf.h include file.)

Change-Id: I9b3a2ec1e48762dd178704185c64d1d3fe358001
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107714
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/include/sal/mathconf.h b/include/sal/mathconf.h
index 687f6e3da133..8e5831cde3b5 100644
--- a/include/sal/mathconf.h
+++ b/include/sal/mathconf.h
@@ -66,7 +66,7 @@ extern "C" {
   || __cplusplus >= 201103L \
   || defined(IOS) )
 #define SAL_MATH_FINITE(d) std::isfinite(d)
-#elif defined( IOS )
+#elif defined __APPLE__ && !(defined __i386__ || defined __x86_64__)
 #define SAL_MATH_FINITE(d) isfinite(d)
 #elif defined( WNT)
 #define SAL_MATH_FINITE(d) _finite(d)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/sal xmlsecurity/inc xmlsecurity/Library_xmlsecurity.mk xmlsecurity/qa xmlsecurity/source xmlsecurity/workben

2020-09-25 Thread Miklos Vajna (via logerrit)
 include/sal/log-areas.dox|4 
 xmlsecurity/Library_xmlsecurity.mk   |1 
 xmlsecurity/inc/pdfio/pdfdocument.hxx|   40 --
 xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx|5 
 xmlsecurity/source/helper/pdfsignaturehelper.cxx |  313 +
 xmlsecurity/source/pdfio/pdfdocument.cxx |  335 ---
 xmlsecurity/workben/pdfverify.cxx|   18 -
 7 files changed, 323 insertions(+), 393 deletions(-)

New commits:
commit 2dd3d03b5350e18cb5f39978022620b55d3d8c5b
Author: Miklos Vajna 
AuthorDate: Thu Sep 24 21:06:46 2020 +0200
Commit: Miklos Vajna 
CommitDate: Fri Sep 25 09:02:57 2020 +0200

xmlsecurity: fold pdfio into pdfsignaturehelper

Most of the initial pdfio was moved to vcl as vcl::filter::PDFDocument.
A small part was left here, because it depended on NSS.  Then later the
NSS bits were moved to svl::crypto::Signing.  The rest is just a small
amount of code, keeping that separate from PDFSignatureHelper, which is
its only user makes little sense.

With this, vcl::filter::PDFDocument is an implementation detail of
PDFSignatureHelper during signature verification.

Change-Id: I6230f9e46deeff7159970f88dbb3bd2de0e9ce7d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103350
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 7a740191ffdf..2d3a974055e7 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -572,8 +572,8 @@ certain functionality.
 @li @c xmlsecurity.dialogs - xml security dialogs
 @li @c xmlsecurity.helper
 @li @c xmlsecurity.ooxml - OOXML signature support
-@li @c xmlsecurity.pdfio - signing of existing PDF
-@li @c xmlsecurity.pdfio.test
+@li @c xmlsecurity.qa
+@li @c xmlsecurity.workben
 @li @c xmlsecurity.xmlsec - xmlsec wrapper
 @li @c xmlsecurity.xmlsec.gpg - gpg xmlsec component
 
diff --git a/xmlsecurity/Library_xmlsecurity.mk 
b/xmlsecurity/Library_xmlsecurity.mk
index 89306bf5ac27..f50140edb303 100644
--- a/xmlsecurity/Library_xmlsecurity.mk
+++ b/xmlsecurity/Library_xmlsecurity.mk
@@ -75,7 +75,6 @@ $(eval $(call gb_Library_add_exception_objects,xmlsecurity,\
xmlsecurity/source/helper/xsecparser \
xmlsecurity/source/helper/xsecsign \
xmlsecurity/source/helper/xsecverify \
-   xmlsecurity/source/pdfio/pdfdocument \
 ))
 
 $(eval $(call gb_Library_use_externals,xmlsecurity,\
diff --git a/xmlsecurity/inc/pdfio/pdfdocument.hxx 
b/xmlsecurity/inc/pdfio/pdfdocument.hxx
deleted file mode 100644
index 4e36978ee009..
--- a/xmlsecurity/inc/pdfio/pdfdocument.hxx
+++ /dev/null
@@ -1,40 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * 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/.
- *
- */
-
-#ifndef INCLUDED_XMLSECURITY_INC_PDFIO_PDFDOCUMENT_HXX
-#define INCLUDED_XMLSECURITY_INC_PDFIO_PDFDOCUMENT_HXX
-
-#include 
-
-namespace vcl::filter
-{
-class PDFObjectElement;
-class PDFDocument;
-}
-struct SignatureInformation;
-class SvStream;
-
-namespace xmlsecurity::pdfio
-{
-/**
- * @param rInformation The actual result.
- * @param rDocument the parsed document to see if the signature is partial.
- * @return If we can determinate a result.
- */
-XMLSECURITY_DLLPUBLIC bool ValidateSignature(SvStream& rStream,
- vcl::filter::PDFObjectElement* 
pSignature,
- SignatureInformation& 
rInformation,
- vcl::filter::PDFDocument& 
rDocument);
-
-} // namespace xmlsecurity::pdfio
-
-#endif // INCLUDED_XMLSECURITY_INC_PDFIO_PDFDOCUMENT_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx 
b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
index 8b4a610fa56c..586ef54d3075 100644
--- a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
+++ b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
@@ -127,7 +127,7 @@ bool PDFSigningTest::sign(const OUString& rInURL, const 
OUString& rOutURL,
 // Only try certificates that are already active and not expired
 if ((now > aNotValidAfter) || (now < aNotValidBefore))
 {
-SAL_WARN("xmlsecurity.pdfio.test",
+SAL_WARN("xmlsecurity.qa",
  "Skipping a certificate that is not yet valid or 
already not valid");
 }
 else
@@ -139,8 +139,7 @@ bool PDFSigningTest::sign(const OUString& rInURL, const 
OUString& rOutURL,
 DWORD dwErr = GetLastError();
 if (HRESULT_FROM_WIN32(dwErr) == 

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

2020-09-16 Thread Julien Nabet (via logerrit)
 include/sal/types.h |   18 --
 1 file changed, 18 deletions(-)

New commits:
commit c3634ad65b459036f47ab2ba37c377e5a5e99d52
Author: Julien Nabet 
AuthorDate: Fri Sep 11 09:11:15 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Sep 16 21:41:13 2020 +0200

[API CHANGE] Remove unused and deprecated sal_Char/sal_sChar/sal_uChar

These are deprecated since 2013, see:
deprecated since 2013, see:
author Stephan Bergmann <[hidden email]> 2013-11-27 12:50:35 +0100
committer Stephan Bergmann <[hidden email]> 2013-11-27 12:52:32 +0100
commit d8565bd266939b4ae4231f5b2c7d6260bee404e9 (patch)
tree c4dc8575d838bf7f588ebb5102acc62cf7651336
parent b5fced896632a3c07586702b461545667b33966e (diff)
Mark sal_Char, sal_sChar, sal_uChar as deprecated
...there never was a good reason to have SAL abstractions for the C/C++ char
types anyway.

and last uses of sal_Char and sal_uChar have been replaced with:
- 
https://cgit.freedesktop.org/libreoffice/core/commit/?id=04203a26757d26814a18c3251d1a97f6ded64a62
author  Julien Nabet   2020-09-11 22:05:12 +0200
committer   Noel Grandin  2020-09-12 
13:36:42 +0200
commit  04203a26757d26814a18c3251d1a97f6ded64a62 (patch)
tree80962f43d3b46e8670ad49068a1a6e8459c22f39
parent  05d5062dca095f2e53de26db41edeb0b1279138b (diff)
Replace remaining uses of sal_Char
+ remove sal_Char check on compilerplugins

- 
https://cgit.freedesktop.org/libreoffice/core/commit/?id=70666469b87ab1e3589db0f5f7a236d744e83733
author  Julien Nabet   2020-09-11 17:38:21 +0200
committer   Noel Grandin  2020-09-12 
18:54:15 +0200
commit  70666469b87ab1e3589db0f5f7a236d744e83733 (patch)
tree88ee34da282712ea32e6354be92472f5fa52f1d4
parent  8214051829468c783404faf19194b26b35833e41 (diff)
Replace remaining uses of sal_uCharHEADmaster
The goal is then to remove sal_uChar completely since it's been deprecated 
in 2013!
See 
http://document-foundation-mail-archive.969070.n3.nabble.com/About-removing-long-time-deprecated-types-from-public-API-tt4287268.html

Change-Id: Ifc6057f49b6022a917d479c6f403b3f65454c510
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102436
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/include/sal/types.h b/include/sal/types.h
index 8d19824b4184..d3179b0e4e51 100644
--- a/include/sal/types.h
+++ b/include/sal/types.h
@@ -109,24 +109,6 @@ typedef unsigned char   sal_uInt8;
 #error "Please define the 64-bit types for your architecture/compiler in 
include/sal/types.h"
 #endif
 
-/** A legacy synonym for `char`.
-
-@deprecated use plain `char` instead.
-*/
-typedef char sal_Char;
-
-/** A legacy synonym for `signed char`.
-
-@deprecated use plain `signed char` instead.
-*/
-typedef signed char sal_sChar;
-
-/** A legacy synonym for `unsigned char`.
-
-@deprecated use plain `unsigned char` instead.
-*/
-typedef unsigned char sal_uChar;
-
 #if defined LIBO_INTERNAL_ONLY && defined __cplusplus
 #define SAL_UNICODE_NOTEQUAL_WCHAR_T
 typedef char16_t sal_Unicode;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-08-07 Thread Tor Lillqvist (via logerrit)
 include/sal/alloca.h |   16 +---
 1 file changed, 1 insertion(+), 15 deletions(-)

New commits:
commit 04d116fe90b07078c4fc79c30d7720d01622cc82
Author: Tor Lillqvist 
AuthorDate: Fri Aug 7 08:34:42 2020 +0100
Commit: Tor Lillqvist 
CommitDate: Fri Aug 7 13:32:49 2020 +0200

Use  for macOS and iOS, too

Change-Id: I20f349cc03fe28536470c19f2559cc5414b823fb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100284
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist 

diff --git a/include/sal/alloca.h b/include/sal/alloca.h
index 70a3f9c9d563..801a7b35e034 100644
--- a/include/sal/alloca.h
+++ b/include/sal/alloca.h
@@ -20,7 +20,7 @@
 #ifndef INCLUDED_SAL_ALLOCA_H
 #define INCLUDED_SAL_ALLOCA_H
 
-#if defined (__sun) || defined (LINUX) || defined(AIX) || defined(ANDROID) || 
defined(HAIKU)
+#if defined (__sun) || defined (LINUX) || defined(AIX) || defined(ANDROID) || 
defined(HAIKU) || defined(MACOSX) || defined(IOS)
 
 #ifndef INCLUDED_ALLOCA_H
 #include 
@@ -34,20 +34,6 @@
 #define INCLUDED_STDLIB_H
 #endif
 
-#elif defined (MACOSX)
-
-#ifndef INCLUDED_SYS_TYPES_H
-#include 
-#define INCLUDED_SYS_TYPES_H
-#endif
-
-#elif defined (IOS)
-
-#ifndef INCLUDED_SYS_TYPES_H
-#include 
-#define INCLUDED_SYS_TYPES_H
-#endif
-
 #elif defined (_WIN32)
 
 #ifndef INCLUDED_MALLOC_H
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/sal vcl/skia

2020-04-01 Thread Luboš Luňák (via logerrit)
 include/sal/log-areas.dox   |3 +
 vcl/skia/gdiimpl.cxx|   63 
 vcl/skia/packedsurfaceatlas.cxx |4 +-
 vcl/skia/salbmp.cxx |   18 +--
 4 files changed, 45 insertions(+), 43 deletions(-)

New commits:
commit 462381602ffb27b0f7673d53198a30f504f130cc
Author: Luboš Luňák 
AuthorDate: Thu Mar 26 11:58:56 2020 +0100
Commit: Luboš Luňák 
CommitDate: Wed Apr 1 12:49:01 2020 +0200

add SAL_LOG area vcl.skia.trace

So that Skia tracing debug output can be disabled selectively
(e.g. SAL_LOG=+INFO.vcl.skia-INFO.vcl.skia.trace).

Change-Id: Id90c77d90ce871b958429d0fe3e59c9da97b0307
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91469
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 1d8414ed98e8..8eccbcad0f88 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -498,7 +498,8 @@ certain functionality.
 @li @c vcl.scrollbar - Scroll Bars
 @li @c vcl.se - VCL Session Manager
 @li @c vcl.se.debug
-@li @c vcl.skia - drawing using the Skia library
+@li @c vcl.skia - VCL Skia-based code
+@li @c vcl.skia.trace - tracing drawing in VCL Skia-based code
 @li @c vcl.sm - Session Manager Client
 @li @c vcl.sm.debug
 @li @c vcl.uitest - The UI testing framework code
diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index 127c0d686a02..dedd0839a3a9 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -326,10 +326,10 @@ void SkiaSalGraphicsImpl::postDraw()
 mXorExtents.outset(2, 2);
 mXorExtents.intersect(SkRect::MakeXYWH(0, 0, mSurface->width(), 
mSurface->height()));
 }
-SAL_INFO("vcl.skia", "applyxor("
- << this << "): "
- << tools::Rectangle(mXorExtents.left(), 
mXorExtents.top(),
- mXorExtents.right(), 
mXorExtents.bottom()));
+SAL_INFO("vcl.skia.trace",
+ "applyxor(" << this << "): "
+ << tools::Rectangle(mXorExtents.left(), 
mXorExtents.top(),
+ mXorExtents.right(), 
mXorExtents.bottom()));
 // Copy the surface contents to another pixmap.
 SkBitmap surfaceBitmap;
 // Use unpremultiplied alpha format, so that we do not have to do the 
conversions to get
@@ -398,7 +398,7 @@ void SkiaSalGraphicsImpl::checkSurface()
 if (!mSurface)
 {
 recreateSurface();
-SAL_INFO("vcl.skia",
+SAL_INFO("vcl.skia.trace",
  "create(" << this << "): " << Size(mSurface->width(), 
mSurface->height()));
 }
 else if (GetWidth() != mSurface->width() || GetHeight() != 
mSurface->height())
@@ -407,9 +407,10 @@ void SkiaSalGraphicsImpl::checkSurface()
 {
 Size oldSize(mSurface->width(), mSurface->height());
 recreateSurface();
-SAL_INFO("vcl.skia", "recreate(" << this << "): old " << oldSize 
<< " new "
- << Size(mSurface->width(), 
mSurface->height())
- << " requested " << 
Size(GetWidth(), GetHeight()));
+SAL_INFO("vcl.skia.trace", "recreate(" << this << "): old " << 
oldSize << " new "
+   << Size(mSurface->width(), 
mSurface->height())
+   << " requested "
+   << Size(GetWidth(), 
GetHeight()));
 }
 }
 }
@@ -421,7 +422,7 @@ bool SkiaSalGraphicsImpl::setClipRegion(const vcl::Region& 
region)
 SkiaZone zone;
 mClipRegion = region;
 checkSurface();
-SAL_INFO("vcl.skia", "setclipregion(" << this << "): " << region);
+SAL_INFO("vcl.skia.trace", "setclipregion(" << this << "): " << region);
 SkCanvas* canvas = mSurface->getCanvas();
 // SkCanvas::clipRegion() can only further reduce the clip region,
 // but we need to set the given region, which may extend it.
@@ -541,7 +542,7 @@ void SkiaSalGraphicsImpl::drawPixel(long nX, long nY, Color 
nColor)
 if (nColor == SALCOLOR_NONE)
 return;
 preDraw();
-SAL_INFO("vcl.skia", "drawpixel(" << this << "): " << Point(nX, nY) << ":" 
<< nColor);
+SAL_INFO("vcl.skia.trace", "drawpixel(" << this << "): " << Point(nX, nY) 
<< ":" << nColor);
 SkPaint paint;
 paint.setColor(toSkColor(nColor));
 // Apparently drawPixel() is actually expected to set the pixel and not 
draw it.
@@ -557,8 +558,8 @@ void SkiaSalGraphicsImpl::drawLine(long nX1, long nY1, long 
nX2, long nY2)
 if (mLineColor == SALCOLOR_NONE)
 return;
 preDraw();
-SAL_INFO("vcl.skia", "drawline(" << this << "): " << Point(nX1, nY1) << 
"->" << Point(nX2, nY2)
- << ":" << 

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

2020-03-04 Thread Tor Lillqvist (via logerrit)
 include/sal/log-areas.dox |1 
 vcl/source/window/builder.cxx |   66 +-
 2 files changed, 34 insertions(+), 33 deletions(-)

New commits:
commit 9f6ae57d6a60d54a72243095a6e4c0fc8f6bda07
Author: Tor Lillqvist 
AuthorDate: Thu Mar 5 00:14:23 2020 +0200
Commit: Tor Lillqvist 
CommitDate: Thu Mar 5 06:32:01 2020 +0100

Add a separate log tag for the UI builder

Change-Id: I54d0233574fa84f1fe988a88f6220985e9149b83
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90004
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist 

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index ea0c34e5223f..1d8414ed98e8 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -460,6 +460,7 @@ certain functionality.
 @li @c vcl
 @li @c vcl.a11y
 @li @c vcl.app
+@li @c vcl.builder
 @li @c vcl.control
 @li @c vcl.ct - CoreText-using code for macOS and iOS
 @li @c vcl.debugevent
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index c32e59ab2b37..194c1d4aacd9 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -459,7 +459,7 @@ VclBuilder::VclBuilder(vcl::Window* pParent, const 
OUString& sUIDir, const OUStr
 }
 catch (const css::uno::Exception )
 {
-DBG_UNHANDLED_EXCEPTION("vcl.layout", "Unable to read .ui file");
+DBG_UNHANDLED_EXCEPTION("vcl.builder", "Unable to read .ui file");
 CrashReporter::addKeyValue("VclBuilderException", "Unable to read .ui 
file: " + rExcept.Message, CrashReporter::Write);
 throw;
 }
@@ -505,7 +505,7 @@ VclBuilder::VclBuilder(vcl::Window* pParent, const 
OUString& sUIDir, const OUStr
 pSource->SetAccessibleRelationMemberOf(pTarget);
 else
 {
-SAL_WARN("vcl.layout", "unhandled a11y relation :" << 
rType);
+SAL_WARN("vcl.builder", "unhandled a11y relation :" << 
rType);
 }
 }
 }
@@ -702,7 +702,7 @@ VclBuilder::VclBuilder(vcl::Window* pParent, const 
OUString& sUIDir, const OUStr
 pTargetButton->SetStyle(pTargetButton->GetStyle() | 
WB_SMALLSTYLE);
 }
 else
-SAL_WARN_IF(eType != SymbolType::IMAGE, "vcl.layout", 
"unimplemented symbol type for radiobuttons");
+SAL_WARN_IF(eType != SymbolType::IMAGE, "vcl.builder", 
"unimplemented symbol type for radiobuttons");
 if (eType == SymbolType::IMAGE)
 {
 Image const aImage(StockImage::Yes,
@@ -725,7 +725,7 @@ VclBuilder::VclBuilder(vcl::Window* pParent, const 
OUString& sUIDir, const OUStr
 case 4:
 break;
 default:
-SAL_WARN("vcl.layout", "unsupported image size " << 
rImageInfo.m_nSize);
+SAL_WARN("vcl.builder", "unsupported image size " << 
rImageInfo.m_nSize);
 break;
 }
 }
@@ -799,7 +799,7 @@ VclBuilder::VclBuilder(vcl::Window* pParent, const 
OUString& sUIDir, const OUStr
 //drop maps, etc. that we don't need again
 m_pParserState.reset();
 
-SAL_WARN_IF(!m_sID.isEmpty() && (!m_bToplevelParentFound && 
!get_by_name(m_sID)), "vcl.layout",
+SAL_WARN_IF(!m_sID.isEmpty() && (!m_bToplevelParentFound && 
!get_by_name(m_sID)), "vcl.builder",
 "Requested top level widget \"" << m_sID << "\" not found in " << 
sUIFile);
 
 #if defined SAL_LOG_WARN
@@ -819,7 +819,7 @@ VclBuilder::VclBuilder(vcl::Window* pParent, const 
OUString& sUIDir, const OUStr
 }
 }
 }
-SAL_WARN_IF(nButtons && !bHasDefButton, "vcl.layout", "No default 
button defined in " << sUIFile);
+SAL_WARN_IF(nButtons && !bHasDefButton, "vcl.builder", "No default 
button defined in " << sUIFile);
 }
 #endif
 
@@ -1070,7 +1070,7 @@ namespace
 return VclResId(SV_BUTTONTEXT_YES);
 else if (rType == "gtk-no")
 return VclResId(SV_BUTTONTEXT_NO);
-SAL_WARN("vcl.layout", "unknown stock type: " << rType);
+SAL_WARN("vcl.builder", "unknown stock type: " << rType);
 return OUString();
 }
 
@@ -1734,7 +1734,7 @@ VclBuilder::customMakeWidget GetCustomMakeWidget(const 
OString& name)
 aI->second->getFunctionSymbol(sFunction));
 #elif !HAVE_FEATURE_DESKTOP
 pFunction = lo_get_custom_widget_func(sFunction.toUtf8().getStr());
-SAL_WARN_IF(!pFunction, "vcl.layout", "Could not find " << sFunction);
+SAL_WARN_IF(!pFunction, "vcl.builder", "Could not find " << sFunction);
 assert(pFunction);
 #else
 pFunction = reinterpret_cast(
@@ -1767,7 +1767,7 @@ VclPtr VclBuilder::makeObject(vcl::Window 
*pParent, const OString &
 sal_uInt16 nNewPageId = nNewPageCount;
 pTabControl->InsertPage(nNewPageId, OUString());
 

[Libreoffice-commits] core.git: include/sal Repository.mk vcl/inc vcl/Library_vcl.mk vcl/Module_vcl.mk vcl/opengl vcl/Package_skia_blacklist.mk vcl/qa vcl/skia vcl/source

2020-02-13 Thread Luboš Luňák (via logerrit)
 Repository.mk   |2 
 include/sal/log-areas.dox   |1 
 vcl/Library_vcl.mk  |2 
 vcl/Module_vcl.mk   |4 
 vcl/Package_skia_blacklist.mk   |   16 
 vcl/inc/driverblocklist.hxx |  158 +++
 vcl/inc/opengl/win/WinDeviceInfo.hxx|  113 -
 vcl/inc/opengl/win/blocklist_parser.hxx |   42 -
 vcl/opengl/win/WinDeviceInfo.cxx|  411 --
 vcl/opengl/win/blocklist_parser.cxx |  351 ---
 vcl/qa/cppunit/blocklistparsertest.cxx  |   94 ++--
 vcl/skia/SkiaHelper.cxx |   39 +
 vcl/skia/skia_blacklist_vulkan.xml  |   30 +
 vcl/source/helper/driverblocklist.cxx   |  711 
 vcl/source/opengl/OpenGLHelper.cxx  |4 
 15 files changed, 1007 insertions(+), 971 deletions(-)

New commits:
commit 2b702f7436acf6883b41508277441e5ea0a53d51
Author: Luboš Luňák 
AuthorDate: Wed Feb 12 10:23:54 2020 +0100
Commit: Luboš Luňák 
CommitDate: Thu Feb 13 15:44:39 2020 +0100

make OpenGL blacklist file code generic and use it for Skia/Vulkan

Change-Id: Icc150b853f5d2d06afedcb7878f6a031aff57c2b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88533
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 

diff --git a/Repository.mk b/Repository.mk
index 7372a01319eb..864438ed63d2 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -951,6 +951,8 @@ $(eval $(call gb_Helper_register_packages_for_install,ooo,\
vcl_opengl_blacklist \
) \
$(if $(ENABLE_OPENGL_CANVAS),canvas_opengl_shader) \
+   $(if $(filter SKIA,$(BUILD_TYPE)), \
+   vcl_skia_blacklist ) \
$(if $(DISABLE_PYTHON),,$(if $(filter-out AIX,$(OS)), \
Pyuno/commonwizards \
Pyuno/fax \
diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 3ebe47afd2b4..ea0c34e5223f 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -463,6 +463,7 @@ certain functionality.
 @li @c vcl.control
 @li @c vcl.ct - CoreText-using code for macOS and iOS
 @li @c vcl.debugevent
+@li @c vcl.driver Graphics driver handling
 @li @c vcl.emf - EMF/EMF+ processing
 @li @c vcl.eventtesting
 @li @c vcl.filter
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 1b5a6db8ec65..ca818e271c22 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -369,6 +369,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
 vcl/source/helper/canvastools \
 vcl/source/helper/commandinfoprovider \
 vcl/source/helper/displayconnectiondispatch \
+vcl/source/helper/driverblocklist \
 vcl/source/helper/errcode \
 vcl/source/helper/evntpost \
 vcl/source/helper/lazydelete \
@@ -702,7 +703,6 @@ endif
 ifeq ($(OS),WNT)
 $(eval $(call gb_Library_add_exception_objects,vcl,\
 vcl/opengl/win/WinDeviceInfo \
-vcl/opengl/win/blocklist_parser \
 vcl/source/app/salplug \
 ))
 
diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk
index 5620f188c7f2..9736be35fedf 100644
--- a/vcl/Module_vcl.mk
+++ b/vcl/Module_vcl.mk
@@ -27,6 +27,8 @@ $(eval $(call gb_Module_add_targets,vcl,\
 UIConfig_vcl \
$(if $(filter WNT,$(OS)), \
Package_opengl_blacklist ) \
+   $(if $(filter SKIA,$(BUILD_TYPE)), \
+   Package_skia_blacklist ) \
 $(if $(filter DESKTOP,$(BUILD_TYPE)), \
 StaticLibrary_vclmain \
$(if $(ENABLE_MACOSX_SANDBOX),, \
@@ -204,6 +206,7 @@ $(eval $(call gb_Module_add_check_targets,vcl,\
CppunitTest_vcl_png_test \
CppunitTest_vcl_widget_definition_reader_test \
CppunitTest_vcl_backend_test \
+   CppunitTest_vcl_blocklistparser_test \
 ))
 
 ifeq ($(USING_X11),TRUE)
@@ -222,7 +225,6 @@ endif
 ifeq ($(OS),WNT)
 $(eval $(call gb_Module_add_check_targets,vcl,\
CppunitTest_vcl_timer \
-   CppunitTest_vcl_blocklistparser_test \
 ))
 endif
 
diff --git a/vcl/Package_skia_blacklist.mk b/vcl/Package_skia_blacklist.mk
new file mode 100644
index ..611766eb7aa3
--- /dev/null
+++ b/vcl/Package_skia_blacklist.mk
@@ -0,0 +1,16 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# 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/.
+#
+
+$(eval $(call gb_Package_Package,vcl_skia_blacklist,$(SRCDIR)/vcl/skia))
+
+$(eval $(call 
gb_Package_add_files,vcl_skia_blacklist,$(LIBO_SHARE_FOLDER)/skia,\
+   skia_blacklist_vulkan.xml \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/vcl/inc/driverblocklist.hxx b/vcl/inc/driverblocklist.hxx
new file mode 100644
index ..e8f99378fa24
--- /dev/null
+++ b/vcl/inc/driverblocklist.hxx
@@ -0,0 +1,158 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */

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

2019-10-21 Thread Stephan Bergmann (via logerrit)
 include/sal/config.h |7 +++
 ucb/source/ucp/cmis/cmis_url.cxx |2 ++
 2 files changed, 9 insertions(+)

New commits:
commit e399c5a602a690126463d1cec62c511f1e053686
Author: Stephan Bergmann 
AuthorDate: Mon Oct 21 19:31:46 2019 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Oct 21 22:54:34 2019 +0200

Silence new Clang 10 trunk -std=c++2a -Wambiguous-reversed-operator for now

It is unclear whether this will really be errors in a final C++20 standard, 
see
 "[c++20] Add rewriting from 
comparison
operators to <=> / ==" for details.

Change-Id: I3a7c2574a65952c8d255107823a1d1e18b2cbe4c
Reviewed-on: https://gerrit.libreoffice.org/81268
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/include/sal/config.h b/include/sal/config.h
index c7e304a8c5d7..335c4174e3ae 100644
--- a/include/sal/config.h
+++ b/include/sal/config.h
@@ -94,6 +94,13 @@
 #if __has_warning("-Wpotentially-evaluated-expression")
 #pragma GCC diagnostic ignored "-Wpotentially-evaluated-expression"
 #endif
+// Before fixing occurrences of this warning, lets see whether C++20 will 
still change to obsolete
+// the warning (see
+// 

 "[c++20]
+// Add rewriting from comparison operators to <=> / =="):
+#if __has_warning("-Wambiguous-reversed-operator")
+#pragma GCC diagnostic ignored "-Wambiguous-reversed-operator"
+#endif
 #endif
 
 #endif // INCLUDED_SAL_CONFIG_H
diff --git a/ucb/source/ucp/cmis/cmis_url.cxx b/ucb/source/ucp/cmis/cmis_url.cxx
index 7bca52492a73..b83d6bee316b 100644
--- a/ucb/source/ucp/cmis/cmis_url.cxx
+++ b/ucb/source/ucp/cmis/cmis_url.cxx
@@ -7,6 +7,8 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include 
+
 #if defined __GNUC__ && !defined __clang__
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wdeprecated"
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-08-30 Thread Stephan Bergmann (via logerrit)
 include/sal/main.h |7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

New commits:
commit 1928ced074260d2d40345bdf4c96767abb99bb4f
Author: Stephan Bergmann 
AuthorDate: Fri Aug 30 17:55:23 2019 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Aug 30 19:29:29 2019 +0200

Blind fix for Android

tb24 started to fail with

> In file included from 
/home/android/lo/master-android-arm/desktop/source/app/sofficemain.cxx:35:
> /home/android/lo/master-android-arm/include/sal/main.h:48:2: error: No 
code that includes this should be built for iOS or Android
> #error No code that includes this should be built for iOS or Android
>  ^

after 28c39b3d13485ae27a8b03d78fa208a443a50298 "Replace is_soffice_Impl hack
with a better(?) hack".

Change-Id: I586a666ff2b822cb49c271378e9bed26c7eb5640
Reviewed-on: https://gerrit.libreoffice.org/78314
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/include/sal/main.h b/include/sal/main.h
index d8a87c3e7f61..5b54ea40d1de 100644
--- a/include/sal/main.h
+++ b/include/sal/main.h
@@ -43,11 +43,8 @@ namespace sal::detail { constexpr int InitializeSoffice = 
-1; }
 SAL_DLLPUBLIC void SAL_CALL sal_detail_initialize(int argc, char ** argv);
 SAL_DLLPUBLIC void SAL_CALL sal_detail_deinitialize(void);
 
-#if defined IOS || defined ANDROID
-
-#error No code that includes this should be built for iOS or Android
-
-#else
+#if !(defined IOS || defined ANDROID)
+/* No code that uses this should be built for iOS or Android */
 
 #define SAL_MAIN_WITH_ARGS_IMPL \
 int SAL_DLLPUBLIC_EXPORT SAL_CALL main(int argc, char ** argv) \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-07-19 Thread Andrea Gelmini (via logerrit)
 include/sal/macros.h |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7315d8b96be6ff1644d3421cb20695f5167c3cbd
Author: Andrea Gelmini 
AuthorDate: Thu Jul 11 22:24:58 2019 +
Commit: Julien Nabet 
CommitDate: Fri Jul 19 10:01:42 2019 +0200

Fix typo

Change-Id: Id35aaf69535385f99513acd80a2a1e4a4cdae861
Reviewed-on: https://gerrit.libreoffice.org/75928
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/include/sal/macros.h b/include/sal/macros.h
index 2337de92b0f8..9adb60bfbcdd 100644
--- a/include/sal/macros.h
+++ b/include/sal/macros.h
@@ -26,7 +26,7 @@
 #if defined(__cplusplus) && ( defined(__GXX_EXPERIMENTAL_CXX0X__) || 
__cplusplus >= 201103L )
 /*
  * Magic template to calculate at compile time the number of elements
- * in an array. Enforcing that the argument must be a array and not
+ * in an array. Enforcing that the argument must be an array and not
  * a pointer, e.g.
  *  char *pFoo="foo";
  *  SAL_N_ELEMENTS(pFoo);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-07-19 Thread Andrea Gelmini (via logerrit)
 include/sal/types.h |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 607902dbcdf1761f6f2fafe2124c3a9c7df3c094
Author: Andrea Gelmini 
AuthorDate: Thu Jul 11 22:24:57 2019 +
Commit: Julien Nabet 
CommitDate: Fri Jul 19 10:00:31 2019 +0200

Fix typo

Change-Id: I9840c48adae1f01f08e3dedebf93444aa49f8a97
Reviewed-on: https://gerrit.libreoffice.org/75929
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/include/sal/types.h b/include/sal/types.h
index e2442ea6c998..1a8ba255b4b7 100644
--- a/include/sal/types.h
+++ b/include/sal/types.h
@@ -398,7 +398,7 @@ namespace css = ::com::sun::star;
 
 /** C++11 "override" feature.
 
-For LIBO_INTERNAL_ONLY, force the method to override a existing method in
+For LIBO_INTERNAL_ONLY, force the method to override an existing method in
 parent, error out if the method with the correct signature does not exist.
 
 @since LibreOffice 4.1
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: include/sal package/inc package/Library_package2.mk package/source

2019-05-28 Thread Luboš Luňák (via logerrit)
 include/sal/log-areas.dox  |1 
 package/Library_package2.mk|1 
 package/inc/ThreadedDeflater.hxx   |   62 +++
 package/inc/ZipOutputEntry.hxx |   68 +++-
 package/source/zipapi/ThreadedDeflater.cxx |  181 +++
 package/source/zipapi/ZipOutputEntry.cxx   |  195 +++--
 package/source/zippackage/ZipPackageStream.cxx |   30 ++-
 7 files changed, 478 insertions(+), 60 deletions(-)

New commits:
commit aa44e10942937452930255be156c1b29247ee969
Author: Luboš Luňák 
AuthorDate: Sat May 25 12:28:27 2019 +0200
Commit: Luboš Luňák 
CommitDate: Tue May 28 12:28:01 2019 +0200

parallel deflate compression (one stream, multiple threads)

ZipPackageStream::saveChild() already had one threaded compression,
but that still uses only one thread for one stream. Many documents
contain many streams (where this is useful), but large documents
often contain one huge content.xml, which then would be compressed
using just one thread.
But it is in fact possible to do deflate in parallel on the same data,
at the cost of somewhat increased CPU usage (spread over threads).
This is handled separately from the background thread path, as
integrating these two approaches would probably be needlessly complex
(since they both internally use ThreadPool, the tasks should often
intermix and parallelize anyway).
On my 4-core (8 HT threads) machine this reduces the compression time
of tdf#113042 from 3s to 1s.

Change-Id: Ifbc889a27966f97eb1ce2ce01c5fb0b151a1bdf8
Reviewed-on: https://gerrit.libreoffice.org/73032
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 1f007b0c2944..8d9a2c68ea92 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -334,6 +334,7 @@ certain functionality.
 
 @li @c package
 @li @c package.xstor
+@li @c package.threadeddeflate
 
 @section sdext
 
diff --git a/package/Library_package2.mk b/package/Library_package2.mk
index 75a15f0e0d08..195c87f9ff4b 100644
--- a/package/Library_package2.mk
+++ b/package/Library_package2.mk
@@ -53,6 +53,7 @@ $(eval $(call gb_Library_add_exception_objects,package2,\
package/source/zipapi/Deflater \
package/source/zipapi/Inflater \
package/source/zipapi/sha1context \
+   package/source/zipapi/ThreadedDeflater \
package/source/zipapi/XBufferedThreadedStream \
package/source/zipapi/XUnbufferedStream \
package/source/zipapi/ZipEnumeration \
diff --git a/package/inc/ThreadedDeflater.hxx b/package/inc/ThreadedDeflater.hxx
new file mode 100644
index ..90801700a37e
--- /dev/null
+++ b/package/inc/ThreadedDeflater.hxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_PACKAGE_THREADEDDEFLATER_HXX
+#define INCLUDED_PACKAGE_THREADEDDEFLATER_HXX
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+namespace ZipUtils
+{
+/// Parallel compression a stream using the libz deflate algorithm.
+///
+/// Almost a replacement for the Deflater class. Call startDeflate() with the 
data,
+/// check with finished() or waitForTasks() and retrieve result with 
getOutput().
+/// The class will internally split into multiple threads.
+class ThreadedDeflater final
+{
+class Task;
+// Note: All this should be lock-less. Each task writes only to its part
+// of the data, flags are atomic.
+css::uno::Sequence inBuffer;
+int zlibLevel;
+std::shared_ptr threadTaskTag;
+std::atomic pendingTasksCount;
+std::vector> outBuffers;
+
+public:
+// Unlike with Deflater class, bNoWrap is always true.
+ThreadedDeflater(sal_Int32 nSetLevel);
+~ThreadedDeflater();
+void startDeflate(const css::uno::Sequence& rBuffer);
+void waitForTasks();
+bool finished() const;
+css::uno::Sequence getOutput() const;
+void clear();
+};
+
+} // namespace
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git 

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

2019-05-08 Thread Jens Carl (via logerrit)
 include/sal/log-areas.dox   |1 
 toolkit/source/helper/formpdfexport.cxx |   70 +---
 2 files changed, 49 insertions(+), 22 deletions(-)

New commits:
commit bfdb5a2d96483907cd4b757398b3df159a9e7af2
Author: Jens Carl 
AuthorDate: Tue May 7 08:56:00 2019 -0700
Commit: Stephan Bergmann 
CommitDate: Wed May 8 08:23:16 2019 +0200

tdf#43157 Clean up OSL_VERIFY (replace with SAL_WARN)

Replace OSL_VERIFY with if-statement and SAL_WARN.

Change-Id: I356a875e1364f3d16f562f3cfa0b41e0939e43d5
Reviewed-on: https://gerrit.libreoffice.org/71923
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index d72710a1f79e..1f007b0c2944 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -405,6 +405,7 @@ certain functionality.
 
 @li @c toolkit
 @li @c toolkit.controls
+@li @c toolkit.helper
 
 @section tools
 
diff --git a/toolkit/source/helper/formpdfexport.cxx 
b/toolkit/source/helper/formpdfexport.cxx
index 796de3d56a2a..24cd1e02ccf6 100644
--- a/toolkit/source/helper/formpdfexport.cxx
+++ b/toolkit/source/helper/formpdfexport.cxx
@@ -78,7 +78,9 @@ namespace toolkitform
 xPSI = _rxModel->getPropertySetInfo();
 if ( xPSI.is() && xPSI->hasPropertyByName( FM_PROP_CLASSID ) )
 {
-OSL_VERIFY( _rxModel->getPropertyValue( FM_PROP_CLASSID ) >>= 
nControlType );
+if( ! (_rxModel->getPropertyValue( FM_PROP_CLASSID ) >>= 
nControlType) ) {
+SAL_WARN("toolkit.helper", "classifyFormControl: unable to 
get property " << FM_PROP_CLASSID);
+}
 }
 
 return nControlType;
@@ -233,7 +235,7 @@ namespace toolkitform
 DBG_UNHANDLED_EXCEPTION("toolkit");
 }
 }
-SAL_WARN("toolkit","determineRadioGroupId: did not 
find the radios element's group!" );
+SAL_WARN("toolkit.helper","determineRadioGroupId: did 
not find the radios element's group!" );
 }
 }
 
@@ -268,7 +270,9 @@ namespace toolkitform
 void getStringItemVector( const Reference< XPropertySet >& _rxModel, 
::std::vector< OUString >& _rVector )
 {
 Sequence< OUString > aListEntries;
-OSL_VERIFY( _rxModel->getPropertyValue( "StringItemList" ) >>= 
aListEntries );
+if( ! (_rxModel->getPropertyValue( "StringItemList" ) >>= 
aListEntries) ) {
+SAL_WARN("toolkit.helper", "getStringItemVector: unable to get 
property StringItemList");
+}
 ::std::copy( aListEntries.begin(), aListEntries.end(),
  ::std::back_insert_iterator< ::std::vector< OUString 
> >( _rVector ) );
 }
@@ -305,8 +309,12 @@ namespace toolkitform
 
 
 // Name, Description, Text
-OSL_VERIFY( xModelProps->getPropertyValue( FM_PROP_NAME ) >>= 
Descriptor->Name );
-OSL_VERIFY( xModelProps->getPropertyValue( "HelpText" ) >>= 
Descriptor->Description );
+if( ! (xModelProps->getPropertyValue( FM_PROP_NAME ) >>= 
Descriptor->Name) ) {
+SAL_WARN("toolkit.helper", "describePDFControl: unable to get 
property " << FM_PROP_NAME);
+}
+if( ! (xModelProps->getPropertyValue( "HelpText" ) >>= 
Descriptor->Description) ) {
+SAL_INFO("toolkit.helper", "describePDFControl: unable to get 
property HelpText");
+}
 Any aText;
 static const char FM_PROP_TEXT[] = "Text";
 static const char FM_PROP_LABEL[] = "Label";
@@ -314,14 +322,18 @@ namespace toolkitform
 aText = xModelProps->getPropertyValue( FM_PROP_TEXT );
 else if ( xPSI->hasPropertyByName( FM_PROP_LABEL ) )
 aText = xModelProps->getPropertyValue( FM_PROP_LABEL );
-if ( aText.hasValue() )
-OSL_VERIFY( aText >>= Descriptor->Text );
+if ( aText.hasValue() ) {
+if( ! (aText >>= Descriptor->Text) ) {
+SAL_WARN("toolkit.helper", "describePDFControl: unable to 
assign aText to Descriptor->Text");
+}
+}
 
 
 // readonly
 static const char FM_PROP_READONLY[] = "ReadOnly";
 if ( xPSI->hasPropertyByName( FM_PROP_READONLY ) )
-OSL_VERIFY( xModelProps->getPropertyValue( FM_PROP_READONLY ) 
>>= Descriptor->ReadOnly );
+if( ! (xModelProps->getPropertyValue( FM_PROP_READONLY ) >>= 
Descriptor->ReadOnly) )
+SAL_WARN("toolkit.helper", "describePDFControl: unable to 
get property " << FM_PROP_READONLY);
 
 
 // border
@@ -330,7 +342,8 @@ namespace toolkitform
 if ( xPSI->hasPropertyByName( FM_PROP_BORDER ) )
  

[Libreoffice-commits] core.git: include/sal vcl/unx

2019-04-18 Thread Jens Carl (via logerrit)
 include/sal/log-areas.dox  |1 +
 vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx |8 
 2 files changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 2a8f2fd072c9de7b5dc538419565e3351bd0936a
Author: Jens Carl 
AuthorDate: Wed Apr 17 15:41:20 2019 -0700
Commit: Stephan Bergmann 
CommitDate: Thu Apr 18 13:47:27 2019 +0200

tdf#43157 Clean up OSL_TRACE (replace with SAL_INFO)

Change-Id: Ifa196dec38d1b84ef14e9bb3a6b45d5ead72064a
Reviewed-on: https://gerrit.libreoffice.org/70904
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 9ee69be03b6f..da6fd1c4a171 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -470,6 +470,7 @@ certain functionality.
 @li @c vcl.gdi.fontmetric
 @li @c vcl.gtk - Gtk+ 2/3 plugin
 @li @c vcl.gtk3
+@li @c vcl.gtkkde5
 @li @c vcl.harfbuzz - HarfBuzz text layout
 @li @c vcl.headless - bitmap-based backend
 @li @c vcl.helper
diff --git a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx 
b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx
index 8006bc37c7dc..47398d01f5c0 100644
--- a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx
+++ b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx
@@ -177,7 +177,7 @@ void SAL_CALL Gtk3KDE5FilePicker::setValue(sal_Int16 
controlId, sal_Int16 nContr
 }
 else
 {
-OSL_TRACE("set value of unhandled type %d", controlId);
+SAL_INFO("vcl.gtkkde5", "set value of unhandled type " << controlId);
 }
 }
 
@@ -403,7 +403,7 @@ void SAL_CALL Gtk3KDE5FilePicker::initialize(const 
uno::Sequence& args
 break;
 
 default:
-OSL_TRACE("Unknown templates %d", templateId);
+SAL_INFO("vcl.gtkkde5", "unknown templates " << templateId);
 return;
 }
 
@@ -446,7 +446,7 @@ void Gtk3KDE5FilePicker::filterChanged()
 {
 FilePickerEvent aEvent;
 aEvent.ElementId = LISTBOX_FILTER;
-OSL_TRACE("filter changed");
+SAL_INFO("vcl.gtkkde5", "filter changed");
 if (m_xListener.is())
 m_xListener->controlStateChanged(aEvent);
 }
@@ -454,7 +454,7 @@ void Gtk3KDE5FilePicker::filterChanged()
 void Gtk3KDE5FilePicker::selectionChanged()
 {
 FilePickerEvent aEvent;
-OSL_TRACE("file selection changed");
+SAL_INFO("vcl.gtkkde5", "file selection changed");
 if (m_xListener.is())
 m_xListener->fileSelectionChanged(aEvent);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: include/sal vcl/inc vcl/Library_vclplug_qt5.mk vcl/qt5

2018-12-18 Thread Libreoffice Gerrit user
 include/sal/log-areas.dox|1 
 vcl/Library_vclplug_qt5.mk   |1 
 vcl/inc/qt5/Qt5Object.hxx|8 +-
 vcl/inc/qt5/Qt5OpenGLContext.hxx |   50 
 vcl/qt5/Qt5Instance.cxx  |3 
 vcl/qt5/Qt5Object.cxx|5 +
 vcl/qt5/Qt5OpenGLContext.cxx |  151 +++
 7 files changed, 215 insertions(+), 4 deletions(-)

New commits:
commit 56b19f9a814ae5a39ed760ee542d715493cd0bf3
Author: Aleksei Nikiforov 
AuthorDate: Fri Dec 14 12:44:20 2018 +0300
Commit: Thorsten Behrens 
CommitDate: Wed Dec 19 07:19:52 2018 +0100

tdf#121247, tdf#121266 KDE5: Add basic support for OpenGL

Change-Id: Id3a5879f661a6fa51b9f9dc40af73687a8f624df
Reviewed-on: https://gerrit.libreoffice.org/65310
Reviewed-by: Katarina Behrens 
Tested-by: Jenkins

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 66ca425e9fea..9ee69be03b6f 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -478,6 +478,7 @@ certain functionality.
 @li @c vcl.layout - Widget layout
 @li @c vcl.lazydelete
 @li @c vcl.opengl
+@li @c vcl.opengl.qt5 - QT5 OpenGL
 @li @c vcl.osx
 @li @c vcl.osx.print
 @li @c vcl.pdfwriter
diff --git a/vcl/Library_vclplug_qt5.mk b/vcl/Library_vclplug_qt5.mk
index cd3605720534..d51175756009 100644
--- a/vcl/Library_vclplug_qt5.mk
+++ b/vcl/Library_vclplug_qt5.mk
@@ -99,6 +99,7 @@ $(eval $(call gb_Library_add_exception_objects,vclplug_qt5,\
 vcl/qt5/Qt5MainWindow \
 vcl/qt5/Qt5Menu \
 vcl/qt5/Qt5Object \
+vcl/qt5/Qt5OpenGLContext \
 vcl/qt5/Qt5Painter \
 vcl/qt5/Qt5Printer \
 vcl/qt5/Qt5System \
diff --git a/vcl/inc/qt5/Qt5Object.hxx b/vcl/inc/qt5/Qt5Object.hxx
index 294f4da4d9db..640c83753deb 100644
--- a/vcl/inc/qt5/Qt5Object.hxx
+++ b/vcl/inc/qt5/Qt5Object.hxx
@@ -24,14 +24,18 @@
 
 #include 
 
-class QWidget;
 class Qt5Frame;
+class QWidget;
+class QWindow;
 
 class Qt5Object : public SalObject
 {
+friend class Qt5OpenGLContext;
+
 SystemEnvData m_aSystemData;
 Qt5Frame* m_pParent;
-QWidget* m_pQWidget;
+QWidget* m_pQWidget; // main widget, container
+QWindow* m_pQWindow; // contained window, used for opengl rendering
 QRegion m_pRegion;
 
 public:
diff --git a/vcl/inc/qt5/Qt5OpenGLContext.hxx b/vcl/inc/qt5/Qt5OpenGLContext.hxx
new file mode 100644
index ..778df689ba65
--- /dev/null
+++ b/vcl/inc/qt5/Qt5OpenGLContext.hxx
@@ -0,0 +1,50 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include 
+
+class QWindow;
+class QOpenGLContext;
+
+class Qt5OpenGLContext : public OpenGLContext
+{
+public:
+virtual void initWindow() override;
+
+private:
+virtual const GLWindow& getOpenGLWindow() const override { return 
m_aGLWin; }
+virtual GLWindow& getModifiableOpenGLWindow() override { return m_aGLWin; }
+virtual bool ImplInit() override;
+
+virtual void makeCurrent() override;
+virtual void destroyCurrentContext() override;
+virtual bool isCurrent() override;
+virtual bool isAnyCurrent() override;
+virtual void resetCurrent() override;
+virtual void swapBuffers() override;
+
+static bool g_bAnyCurrent;
+
+GLWindow m_aGLWin;
+
+QWindow* m_pWindow;
+QOpenGLContext* m_pContext;
+};
diff --git a/vcl/qt5/Qt5Instance.cxx b/vcl/qt5/Qt5Instance.cxx
index 2e21f2563d90..6564edd2241b 100644
--- a/vcl/qt5/Qt5Instance.cxx
+++ b/vcl/qt5/Qt5Instance.cxx
@@ -30,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -202,7 +203,7 @@ OUString Qt5Instance::GetConnectionIdentifier() { return 
OUString(); }
 
 void Qt5Instance::AddToRecentDocumentList(const OUString&, const OUString&, 
const OUString&) {}
 
-OpenGLContext* Qt5Instance::CreateOpenGLContext() { return nullptr; }
+OpenGLContext* Qt5Instance::CreateOpenGLContext() { return new 
Qt5OpenGLContext; }
 
 bool Qt5Instance::IsMainThread() const { return qApp->thread() != 
QThread::currentThread(); }
 
diff --git a/vcl/qt5/Qt5Object.cxx b/vcl/qt5/Qt5Object.cxx
index 4f0a92da7bf7..e498283ef1ee 100644
--- 

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

2018-11-11 Thread Libreoffice Gerrit user
 include/sal/macros.h |4 
 1 file changed, 4 deletions(-)

New commits:
commit 2301cb300acc1ad534a21ad93e8ed34ed71ba937
Author: Stephan Bergmann 
AuthorDate: Sun Nov 11 10:41:34 2018 +0100
Commit: Stephan Bergmann 
CommitDate: Sun Nov 11 18:11:19 2018 +0100

[API CHANGE] Remove SAL_BOUND again

...that had been added to the stable URE interface, apparently by mistake, 
with
7474699aa372296da7494d1d0bec1f7dafbaae79 "contains some slightly changed 
macros
from vos/macros.hxx", then removed with 
2f0803e5869dd2d45c8d4b407017f053e83ed601
"remove unused macros, and add SAL_N_ELEMENTS", then re-introduced with
d441fa1f8cc0a17a2bc166bf2f2a44f76b83a773 "remvove vos/macros.h usage".

The last internal uses have now been removed with
 "Replace uses of SAL_BOUND with
o3tl::clamp".

Change-Id: I0dd842533d97fa878606cbf62efb9fa46c029088
Reviewed-on: https://gerrit.libreoffice.org/63265
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/include/sal/macros.h b/include/sal/macros.h
index 2e5a4b9d3df3..2337de92b0f8 100644
--- a/include/sal/macros.h
+++ b/include/sal/macros.h
@@ -48,10 +48,6 @@
 #endif
 #endif
 
-#ifndef SAL_BOUND
-#define SAL_BOUND(x,l,h)((x) <= (l) ? (l) : ((x) >= (h) ? (h) : 
(x)))
-#endif
-
 #ifndef SAL_STRINGIFY
 #   define SAL_STRINGIFY_ARG(x) #x
 #   define SAL_STRINGIFY(x) SAL_STRINGIFY_ARG(x)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-09-19 Thread Libreoffice Gerrit user
 include/sal/types.h   |   14 ++
 sd/source/ui/inc/unokywds.hxx |  238 +-
 2 files changed, 135 insertions(+), 117 deletions(-)

New commits:
commit ed510993d7db9a8ca9a3822d107af063aab5b637
Author: Stephan Bergmann 
AuthorDate: Wed Sep 19 11:06:13 2018 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Sep 19 21:01:48 2018 +0200

Make compilers combine sUNO_* vars across TUs

...by changing them from internal linkage to being inline (where available).
The net effect is that compilers (that HAVE_CPP_INLINE_VARIABLES) are 
required
to combine all uses of a given sUNO_* var across a Library, where before 
that
was only possible if the compiler could prove that placing multiple such 
vars
across TUs at the same address didn't change the program's behavior.

(And

> $ diff <(nm --def instdir/program/libsdlo.so | grep sUNO_ | cut -d ' ' -f 
3 | LC_ALL=C sort) <(nm --def instdir/program/libsdlo.so | grep sUNO_ | cut -d 
' ' -f 3 | LC_ALL=C sort | uniq)
> 2d1
> < _ZL16sUNO_View_ViewId
> 8d6
> < _ZL18sUNO_View_PageKind
> 23d20
> < _ZL22sUNO_View_LockedLayers
> 30d26
> < _ZL23sUNO_View_VisibleLayers
> 39d34
> < _ZL25sUNO_View_PrintableLayers

showed that there were duplicates, while

> $ nm --def instdir/program/libsdlo.so | grep sUNO_ | cut -d ' ' -f 3 | 
LC_ALL=C sort | uniq | wc -l
> 71

shows that only 71 of the 117 sUNO_* vars are actually used at all---there's
still room for clean up.)

Introduces LIBO_INTERNAL_ONLY SAL_INLINE_VARIABLE.

Change-Id: Icf92116de9ea4019d298e325d2a83009317f7a4c
Reviewed-on: https://gerrit.libreoffice.org/60743
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/include/sal/types.h b/include/sal/types.h
index 474a223a2ff2..08751c33cd53 100644
--- a/include/sal/types.h
+++ b/include/sal/types.h
@@ -697,6 +697,20 @@ template< typename T1, typename T2 > inline T1 
static_int_cast(T2 n) {
 #endif
 /// @endcond
 
+/// @cond INTERNAL
+/** Inline variables, where supported.
+
+@since LibreOffice 6.2
+*/
+#if defined LIBO_INTERNAL_ONLY
+#if HAVE_CPP_INLINE_VARIABLES
+#define SAL_INLINE_VARIABLE inline
+#else
+#define SAL_INLINE_VARIABLE
+#endif
+#endif
+/// @endcond
+
 #endif // INCLUDED_SAL_TYPES_H
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/inc/unokywds.hxx b/sd/source/ui/inc/unokywds.hxx
index 9becfc0bd328..1e190e4f592d 100644
--- a/sd/source/ui/inc/unokywds.hxx
+++ b/sd/source/ui/inc/unokywds.hxx
@@ -20,137 +20,141 @@
 #ifndef INCLUDED_SD_SOURCE_UI_INC_UNOKYWDS_HXX
 #define INCLUDED_SD_SOURCE_UI_INC_UNOKYWDS_HXX
 
+#include 
+
+#include 
+
 // SdUnoPseudoStyleFamily
-const char sUNO_PseudoSheet_Title[] = "title";
-const char sUNO_PseudoSheet_SubTitle[] = "subtitle";
-const char sUNO_PseudoSheet_Background[] = "background";
-const char sUNO_PseudoSheet_Background_Objects[] = "backgroundobjects";
-const char sUNO_PseudoSheet_Notes[] = "notes";
-const char sUNO_PseudoSheet_Outline1[] = "outline1";
-const char sUNO_PseudoSheet_Outline2[] = "outline2";
-const char sUNO_PseudoSheet_Outline3[] = "outline3";
-const char sUNO_PseudoSheet_Outline4[] = "outline4";
-const char sUNO_PseudoSheet_Outline5[] = "outline5";
-const char sUNO_PseudoSheet_Outline6[] = "outline6";
-const char sUNO_PseudoSheet_Outline7[] = "outline7";
-const char sUNO_PseudoSheet_Outline8[] = "outline8";
-const char sUNO_PseudoSheet_Outline9[] = "outline9";
+SAL_INLINE_VARIABLE const char sUNO_PseudoSheet_Title[] = "title";
+SAL_INLINE_VARIABLE const char sUNO_PseudoSheet_SubTitle[] = "subtitle";
+SAL_INLINE_VARIABLE const char sUNO_PseudoSheet_Background[] = "background";
+SAL_INLINE_VARIABLE const char sUNO_PseudoSheet_Background_Objects[] = 
"backgroundobjects";
+SAL_INLINE_VARIABLE const char sUNO_PseudoSheet_Notes[] = "notes";
+SAL_INLINE_VARIABLE const char sUNO_PseudoSheet_Outline1[] = "outline1";
+SAL_INLINE_VARIABLE const char sUNO_PseudoSheet_Outline2[] = "outline2";
+SAL_INLINE_VARIABLE const char sUNO_PseudoSheet_Outline3[] = "outline3";
+SAL_INLINE_VARIABLE const char sUNO_PseudoSheet_Outline4[] = "outline4";
+SAL_INLINE_VARIABLE const char sUNO_PseudoSheet_Outline5[] = "outline5";
+SAL_INLINE_VARIABLE const char sUNO_PseudoSheet_Outline6[] = "outline6";
+SAL_INLINE_VARIABLE const char sUNO_PseudoSheet_Outline7[] = "outline7";
+SAL_INLINE_VARIABLE const char sUNO_PseudoSheet_Outline8[] = "outline8";
+SAL_INLINE_VARIABLE const char sUNO_PseudoSheet_Outline9[] = "outline9";
 
 // SdLayer
-const char sUNO_LayerName_background[] = "background";
-const char sUNO_LayerName_background_objects[] = "backgroundobjects";
-const char sUNO_LayerName_layout[] = "layout";
-const char sUNO_LayerName_controls[] = "controls";
-const char sUNO_LayerName_measurelines[] = "measurelines";
+SAL_INLINE_VARIABLE const char sUNO_LayerName_background[] = "background";
+SAL_INLINE_VARIABLE 

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

2018-09-07 Thread Libreoffice Gerrit user
 include/sal/alloca.h |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit fda27303cfb84ef182696787878dba06c4a129da
Author: Mike Kaganski 
AuthorDate: Fri Sep 7 07:23:36 2018 +0200
Commit: Mike Kaganski 
CommitDate: Fri Sep 7 08:37:43 2018 +0200

Cppcheck: WNT -> _WIN32

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

diff --git a/include/sal/alloca.h b/include/sal/alloca.h
index 8c9509f8ed3c..70a3f9c9d563 100644
--- a/include/sal/alloca.h
+++ b/include/sal/alloca.h
@@ -48,7 +48,7 @@
 #define INCLUDED_SYS_TYPES_H
 #endif
 
-#elif defined (WNT)
+#elif defined (_WIN32)
 
 #ifndef INCLUDED_MALLOC_H
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-31 Thread Libreoffice Gerrit user
 include/sal/log.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 965ac9915280e3d570d7b32ff20799507f4e42eb
Author: Stephan Bergmann 
AuthorDate: Thu Aug 30 18:31:33 2018 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Aug 31 10:32:30 2018 +0200

At least MSVC 19.15.26726 (VS 2017 15.8.1) needs the SAL_STREAM fix too

...that was originally introduced for libc++ in
691b6ea8e100fc55f0ff70a82511722733113a07 "Make the SAL_STREAM thing compile 
with
clang++ -std=c++11 -stdlib=libc++".  MSVC and clang-cl builds now started to
fail like

> [build CXX] sfx2/source/control/bindings.cxx
> C:/lo-clang/core/sfx2/source/control/bindings.cxx(1333,19):  error: 
dynamic_cast from rvalue to reference type '::std::ostringstream &' (aka 
'basic_ostringstream, allocator > &')
> ? SAL_STREAM("File: " << pFile << " Line: " << nLine) : 
""));
> 
~~^~
> C:/lo-clang/core/include\sal/log.hxx(169,6):  note: expanded from macro 
'SAL_STREAM'
> (dynamic_cast< ::std::ostringstream & >(::std::ostringstream() << 
stream).str())
>  ^
> C:/lo-clang/core/include\sal/log.hxx(306,20):  note: expanded from macro 
'SAL_INFO'
> SAL_WHERE, stream)
> ~~~^~~
> C:/lo-clang/core/include\sal/log.hxx(120,53):  note: expanded from macro 
'SAL_DETAIL_LOG_STREAM'
> ::sal::detail::StreamStart() << stream) == 1) \
> ^~
[...]

Change-Id: Icb311c8a61cd7e7f450a45fc7f07327e94b5d186
Reviewed-on: https://gerrit.libreoffice.org/59833
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/include/sal/log.hxx b/include/sal/log.hxx
index 6bcd34b09fe2..00d533ab5495 100644
--- a/include/sal/log.hxx
+++ b/include/sal/log.hxx
@@ -161,7 +161,7 @@ inline char const * unwrapStream(SAL_UNUSED_PARAMETER 
StreamIgnore const &) {
 
 @since LibreOffice 3.5
 */
-#ifdef _LIBCPP_VERSION
+#if defined _LIBCPP_VERSION || (defined _MSC_VER && _MSC_VER >= 1915)
 #define SAL_STREAM(stream) \
 (::std::ostringstream() << stream).str()
 #else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-05-22 Thread Mike Kaganski
 include/sal/log-areas.dox|1 -
 sw/qa/extras/mailmerge/mailmerge.cxx |   31 ---
 2 files changed, 16 insertions(+), 16 deletions(-)

New commits:
commit 99dd2aeaf5cd605c8af8fa6462cebe802d26221a
Author: Mike Kaganski 
Date:   Tue May 22 11:54:29 2018 +0300

db04be037b611e296ef9f2542322c52ed82d7a2b follow-up: no new log area

Change-Id: Ib0dc0240db4840d3e93f1816d4288644d9e308f0
Reviewed-on: https://gerrit.libreoffice.org/54660
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins 

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 8819bef136e0..88106232877b 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -520,7 +520,6 @@ certain functionality.
 @li @c sw.level2
 @li @c sw.mailmerge - Writer mail merge
 @li @c sw.pageframe - debug lifecycle of SwPageFrame
-@li @c sw.qa - Writer unit tests
 @li @c sw.rtf - .rtf export filter
 @li @c sw.tiled
 @li @c sw.ui
diff --git a/sw/qa/extras/mailmerge/mailmerge.cxx 
b/sw/qa/extras/mailmerge/mailmerge.cxx
index ca1f3ec47b0e..b207547fffb5 100644
--- a/sw/qa/extras/mailmerge/mailmerge.cxx
+++ b/sw/qa/extras/mailmerge/mailmerge.cxx
@@ -729,10 +729,10 @@ DECLARE_FILE_MAILMERGE_TEST(testEmptyValuesLegacyODT, 
"tdf35798-legacy.odt", "5-
 for (int i = 0; i < 8; ++i)
 {
 auto xPara = getParagraph(i+1);
-SAL_WARN("sw.qa", "Testing doc " + OUString::number(doc) + " 
paragraph "
- + OUString::number(i + 1));
-
CPPUNIT_ASSERT_EQUAL(OUString::createFromAscii(EmptyValuesLegacyData[doc][i]),
- xPara->getString());
+CPPUNIT_ASSERT_EQUAL_MESSAGE(
+OString("in doc " + OString::number(doc) + " paragraph " + 
OString::number(i + 1))
+.getStr(),
+OUString::createFromAscii(EmptyValuesLegacyData[doc][i]), 
xPara->getString());
 }
 CPPUNIT_ASSERT_EQUAL(8, getParagraphs());
 }
@@ -757,10 +757,10 @@ DECLARE_FILE_MAILMERGE_TEST(testEmptyValuesNewODT, 
"tdf35798-new.odt", "5-with-b
 if (!pExpected)
 break;
 auto xPara = getParagraph(i + 1);
-SAL_WARN("sw.qa", "Testing doc " + OUString::number(doc) + " 
paragraph "
- + OUString::number(i + 1));
-CPPUNIT_ASSERT_EQUAL(OUString::createFromAscii(pExpected),
- xPara->getString());
+CPPUNIT_ASSERT_EQUAL_MESSAGE(
+OString("in doc " + OString::number(doc) + " paragraph " + 
OString::number(i + 1))
+.getStr(),
+OUString::createFromAscii(pExpected), xPara->getString());
 }
 CPPUNIT_ASSERT_EQUAL(i, getParagraphs());
 }
@@ -781,10 +781,10 @@ DECLARE_FILE_MAILMERGE_TEST(testEmptyValuesLegacyFODT, 
"tdf35798-legacy.fodt", "
 for (int i = 0; i < 8; ++i)
 {
 auto xPara = getParagraph(i + 1);
-SAL_WARN("sw.qa", "Testing doc " + OUString::number(doc) + " 
paragraph "
- + OUString::number(i + 1));
-
CPPUNIT_ASSERT_EQUAL(OUString::createFromAscii(EmptyValuesLegacyData[doc][i]),
- xPara->getString());
+CPPUNIT_ASSERT_EQUAL_MESSAGE(
+OString("in doc " + OString::number(doc) + " paragraph " + 
OString::number(i + 1))
+.getStr(),
+OUString::createFromAscii(EmptyValuesLegacyData[doc][i]), 
xPara->getString());
 }
 CPPUNIT_ASSERT_EQUAL(8, getParagraphs());
 }
@@ -809,9 +809,10 @@ DECLARE_FILE_MAILMERGE_TEST(testEmptyValuesNewFODT, 
"tdf35798-new.fodt", "5-with
 if (!pExpected)
 break;
 auto xPara = getParagraph(i + 1);
-SAL_WARN("sw.qa", "Testing doc " + OUString::number(doc) + " 
paragraph "
- + OUString::number(i + 1));
-CPPUNIT_ASSERT_EQUAL(OUString::createFromAscii(pExpected), 
xPara->getString());
+CPPUNIT_ASSERT_EQUAL_MESSAGE(
+OString("in doc " + OString::number(doc) + " paragraph " + 
OString::number(i + 1))
+.getStr(),
+OUString::createFromAscii(pExpected), xPara->getString());
 }
 CPPUNIT_ASSERT_EQUAL(i, getParagraphs());
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/sal vcl/unx

2018-05-22 Thread Stephan Bergmann
 include/sal/log-areas.dox   |1 
 vcl/unx/generic/fontmanager/fontconfig.cxx  |   66 ++--
 vcl/unx/generic/fontmanager/fontmanager.cxx |4 -
 3 files changed, 26 insertions(+), 45 deletions(-)

New commits:
commit d9cc5a1c28a98bc2d4014a14a8e931662e94e037
Author: Stephan Bergmann 
Date:   Fri May 18 12:08:25 2018 +0200

Turn debug fprint in vcl/unx/generic/fontmanager/ into SAL_INFO

...mapping OSL_DEBUG_LEVEL > 1 ones to "vcl.fonts" and OSL_DEBUG_LEVEL > 2 
ones
to new "vcl.fonts.detail"

Change-Id: I750b4915083c4a0f9d0310a667987ff33d7fcc2a
Reviewed-on: https://gerrit.libreoffice.org/54526
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 860e23040141..8819bef136e0 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -461,6 +461,7 @@ certain functionality.
 @li @c vcl.eventtesting
 @li @c vcl.filter
 @li @c vcl.fonts - font-specific code
+@li @c vcl.fonts.detail
 @li @c vcl.gdi - the GDI part of VCL, devices, bitmaps, etc.
 @li @c vcl.gdi.wndproc - Windows Procedure part of VCL
 @li @c vcl.gdi.fontmetric
diff --git a/vcl/unx/generic/fontmanager/fontconfig.cxx 
b/vcl/unx/generic/fontmanager/fontconfig.cxx
index e70cb6d067af..17629c09173a 100644
--- a/vcl/unx/generic/fontmanager/fontconfig.cxx
+++ b/vcl/unx/generic/fontmanager/fontconfig.cxx
@@ -470,18 +470,14 @@ static void lcl_FcFontSetRemove(FcFontSet* pFSet, int i)
 
 void PrintFontManager::countFontconfigFonts( std::unordered_map& 
o_rVisitedPaths )
 {
-#if OSL_DEBUG_LEVEL > 1
 int nFonts = 0;
-#endif
 FontCfgWrapper& rWrapper = FontCfgWrapper::get();
 
 FcFontSet* pFSet = rWrapper.getFontSet();
 const bool bMinimalFontset = utl::ConfigManager::IsFuzzing();
 if( pFSet )
 {
-#if OSL_DEBUG_LEVEL > 1
-fprintf( stderr, "found %d entries in fontconfig fontset\n", 
pFSet->nfont );
-#endif
+SAL_INFO("vcl.fonts", "found " << pFSet->nfont << " entries in 
fontconfig fontset");
 for( int i = 0; i < pFSet->nfont; i++ )
 {
 FcChar8* file = nullptr;
@@ -511,20 +507,17 @@ void PrintFontManager::countFontconfigFonts( 
std::unordered_map& o
 if( eFileRes != FcResultMatch || eFamilyRes != FcResultMatch || 
eOutRes != FcResultMatch )
 continue;
 
-#if (OSL_DEBUG_LEVEL > 2)
-fprintf( stderr, "found font \"%s\" in file %s\n"
- "   weight = %d, slant = %d, style = \"%s\"\n"
- "   width = %d, spacing = %d, outline = %d, format %s\n"
- , family, file
- , eWeightRes == FcResultMatch ? weight : -1
- , eSpacRes == FcResultMatch ? slant : -1
- , eStyleRes == FcResultMatch ? (const char*) style : 
""
- , eWeightRes == FcResultMatch ? width : -1
- , eSpacRes == FcResultMatch ? spacing : -1
- , eOutRes == FcResultMatch ? outline : -1
- , eFormatRes == FcResultMatch ? (const char*)format : 
""
- );
-#endif
+SAL_INFO(
+"vcl.fonts.detail",
+"found font \"" << family << "\" in file " << file << ", 
weight = "
+<< (eWeightRes == FcResultMatch ? weight : -1) << ", slant = "
+<< (eSpacRes == FcResultMatch ? slant : -1) << ", style = \""
+<< (eStyleRes == FcResultMatch ? reinterpret_cast(style) : "")
+<< "\",  width = " << (eWeightRes == FcResultMatch ? width : 
-1) << ", spacing = "
+<< (eSpacRes == FcResultMatch ? spacing : -1) << ", outline = "
+<< (eOutRes == FcResultMatch ? outline : -1) << ", format "
+<< (eFormatRes == FcResultMatch
+? reinterpret_cast(format) : ""));
 
 //OSL_ASSERT(eOutRes != FcResultMatch || outline);
 
@@ -534,9 +527,7 @@ void PrintFontManager::countFontconfigFonts( 
std::unordered_map& o
 
 if (isPreviouslyDuplicateOrObsoleted(pFSet, i))
 {
-#if OSL_DEBUG_LEVEL > 2
-fprintf(stderr, "Ditching %s as duplicate/obsolete\n", file);
-#endif
+SAL_INFO("vcl.fonts.detail", "Ditching " << file << " as 
duplicate/obsolete");
 continue;
 }
 
@@ -548,9 +539,7 @@ void PrintFontManager::countFontconfigFonts( 
std::unordered_map& o
 o_rVisitedPaths[aDir] = 1;
 
 int nDirID = getDirectoryAtom( aDir );
-#if OSL_DEBUG_LEVEL > 2
-fprintf( stderr, "file %s not cached\n", aBase.getStr() );
-#endif
+SAL_INFO("vcl.fonts.detail", "file " << aBase << " not cached");
 // not known, analyze font file to get attributes
 // not described 

[Libreoffice-commits] core.git: include/sal toolkit/source vcl/win

2018-05-03 Thread Thorsten Behrens
 include/sal/log-areas.dox |1 +
 toolkit/source/awt/vclxwindow.cxx |3 +++
 vcl/win/app/salinst.cxx   |2 ++
 vcl/win/window/salframe.cxx   |2 ++
 4 files changed, 8 insertions(+)

New commits:
commit bb2443cc18d43860faafc852a5bfc5d446a7b6b3
Author: Thorsten Behrens 
Date:   Wed Feb 1 03:29:18 2017 +0100

logging: add some strategic places around vcl messages

Change-Id: I3eb1076a0dd697ceb3b4310444542f324848b358
Reviewed-on: https://gerrit.libreoffice.org/53777
Tested-by: Jenkins 
Reviewed-by: Thorsten Behrens 

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 0f8927cc89ff..488f4d6c0232 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -462,6 +462,7 @@ certain functionality.
 @li @c vcl.filter
 @li @c vcl.fonts - font-specific code
 @li @c vcl.gdi - the GDI part of VCL, devices, bitmaps, etc.
+@li @c vcl.gdi.wndproc - Windows Procedure part of VCL
 @li @c vcl.gdi.fontmetric
 @li @c vcl.gtk - Gtk+ 2/3 plugin
 @li @c vcl.gtk3
diff --git a/toolkit/source/awt/vclxwindow.cxx 
b/toolkit/source/awt/vclxwindow.cxx
index d85def1007e7..45c7d1dcdc62 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -269,6 +269,8 @@ IMPL_LINK_NOARG(VCLXWindowImpl, OnProcessCallbacks, void*, 
void)
 {
 const Reference< uno::XInterface > xKeepAlive( mrAntiImpl );
 
+SAL_INFO("toolkit.controls", "OnProcessCallbacks grabbing solarmutex");
+
 // work on a copy of the callback array
 CallbackArray aCallbacksCopy;
 {
@@ -287,6 +289,7 @@ IMPL_LINK_NOARG(VCLXWindowImpl, OnProcessCallbacks, void*, 
void)
 }
 
 {
+SAL_INFO("toolkit.controls", "OnProcessCallbacks relinquished 
solarmutex");
 SolarMutexReleaser aReleaseSolar;
 for (   CallbackArray::const_iterator loop = aCallbacksCopy.begin();
 loop != aCallbacksCopy.end();
diff --git a/vcl/win/app/salinst.cxx b/vcl/win/app/salinst.cxx
index a33b7e1bd683..c0bd18f85627 100644
--- a/vcl/win/app/salinst.cxx
+++ b/vcl/win/app/salinst.cxx
@@ -582,6 +582,8 @@ LRESULT CALLBACK SalComWndProc( HWND, UINT nMsg, WPARAM 
wParam, LPARAM lParam, b
 WinSalInstance *pInst = GetSalData()->mpInstance;
 WinSalTimer *const pTimer = static_cast( 
ImplGetSVData()->maSchedCtx.mpSalTimer );
 
+SAL_INFO("vcl.gdi.wndproc", "SalComWndProc(nMsg=" << nMsg << ", wParam=" << 
wParam << ", lParam=" << lParam << ")");
+
 switch ( nMsg )
 {
 case SAL_MSG_THREADYIELD:
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index 7dfe3c0a573d..864c0dd45f03 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -5437,6 +5437,8 @@ LRESULT CALLBACK SalFrameWndProc( HWND hWnd, UINT nMsg, 
WPARAM wParam, LPARAM lP
 static bool  bInWheelMsg = false;
 static bool  bInQueryEnd = false;
 
+SAL_INFO("vcl.gdi.wndproc", "SalFrameWndProc(nMsg=" << nMsg << ", wParam=" 
<< wParam << ", lParam=" << lParam << ")");
+
 // By WM_CREATE we connect the frame with the window handle
 if ( nMsg == WM_CREATE )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-04 Thread Chris Sherlock
 include/sal/types.h |   10 --
 1 file changed, 10 deletions(-)

New commits:
commit 79517c0471aff4abf336bd81834bd28732dad67f
Author: Chris Sherlock 
Date:   Thu Jan 11 13:20:50 2018 +1100

sal: remove unnecessary comments in types.h

Change-Id: I17a42951d2fbb02d1d2bc5d7c01574051a3ac30c
Reviewed-on: https://gerrit.libreoffice.org/47735
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/include/sal/types.h b/include/sal/types.h
index 8678562ccc76..c6c8b66d351b 100644
--- a/include/sal/types.h
+++ b/include/sal/types.h
@@ -35,11 +35,6 @@
 extern "C" {
 #endif
 
-//
-/* Data types
-*/
-
-/* Boolean */
 typedef unsigned char sal_Bool;
 #   define sal_False ((sal_Bool)0)
 #   define sal_True  ((sal_Bool)1)
@@ -199,10 +194,6 @@ typedef void *   sal_Handle;
 #error "Please make sure SAL_TYPES_SIZEOFPOINTER is defined for your 
architecture/compiler"
 #endif
 
-//
-/* Useful defines
- */
-
 /* The following SAL_MIN_INTn defines codify the assumption that the signed
  * sal_Int types use two's complement representation.  Defining them as
  * "-0x7F... - 1" instead of as "-0x80..." prevents warnings about applying the
@@ -324,7 +315,6 @@ typedef void *   sal_Handle;
 #endif
 
 /** This is the binary specification of a SAL sequence.
-
 */
 typedef struct _sal_Sequence
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-01 Thread Tor Lillqvist
 include/sal/log-areas.dox  |1 +
 sw/source/ui/vba/service.cxx   |2 +-
 sw/source/ui/vba/vbaaddins.cxx |2 +-
 sw/source/ui/vba/vbadocument.cxx   |2 +-
 sw/source/ui/vba/vbadocumentproperties.cxx |8 
 sw/source/ui/vba/vbafield.cxx  |4 ++--
 sw/source/ui/vba/vbaglobals.cxx|6 +++---
 sw/source/ui/vba/vbalisthelper.cxx |2 +-
 sw/source/ui/vba/vbastyles.cxx |2 +-
 9 files changed, 15 insertions(+), 14 deletions(-)

New commits:
commit 8bc49ff1c28dd07d7eb191a895fa5e95c51d6898
Author: Tor Lillqvist 
Date:   Thu Feb 1 16:44:43 2018 +0200

Use more specific tag in SAL_INFO and SAL_WARN here

Surely we shouldn't be using the very generic "sw" for such a
feature-specific part of the Writer code.

Change-Id: Id8913b9121a419f5da1f46a552fab95c903a3b13

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 3858ea12175b..a3e25b8fea27 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -518,6 +518,7 @@ certain functionality.
 @li @c sw.tiled
 @li @c sw.ui
 @li @c sw.uno - Writer UNO interfaces
+@li @c sw.vba - Writer VBA
 @li @c sw.ww8 - .doc/.docx export filter, .doc import filter (not writerfilter)
 @li @c sw.ww8.level2 - further info for sw.ww8
 @li @c sw.xml - Writer .odt import/export
diff --git a/sw/source/ui/vba/service.cxx b/sw/source/ui/vba/service.cxx
index 2b2adc652695..1924abc1689d 100644
--- a/sw/source/ui/vba/service.cxx
+++ b/sw/source/ui/vba/service.cxx
@@ -31,7 +31,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * 
vbaswobj_component_getFactory(
 void* pRet = sdecl::component_getFactoryHelper(pImplName,
 {::serviceDecl, &::document::serviceDecl,
  ::serviceDecl, ::serviceDecl} );
-SAL_INFO("sw", "Ret is " << pRet);
+SAL_INFO("sw.vba", "Ret is " << pRet);
 return pRet;
 }
 
diff --git a/sw/source/ui/vba/vbaaddins.cxx b/sw/source/ui/vba/vbaaddins.cxx
index 59092cc3bd5f..af69cfe3f844 100644
--- a/sw/source/ui/vba/vbaaddins.cxx
+++ b/sw/source/ui/vba/vbaaddins.cxx
@@ -35,7 +35,7 @@ static uno::Reference< container::XIndexAccess > 
lcl_getAddinCollection( const u
 SvtPathOptions aPathOpt;
 // FIXME: temporary the STARTUP path is located in 
$OO/basic3.1/program/addin
 OUString aAddinPath = aPathOpt.GetAddinPath();
-SAL_INFO("sw", "lcl_getAddinCollection: " << aAddinPath );
+SAL_INFO("sw.vba", "lcl_getAddinCollection: " << aAddinPath );
 if( xSFA->isFolder( aAddinPath ) )
 {
 uno::Sequence< OUString > sEntries = xSFA->getFolderContents( 
aAddinPath, false );
diff --git a/sw/source/ui/vba/vbadocument.cxx b/sw/source/ui/vba/vbadocument.cxx
index 74fff4532741..f987b31e7717 100644
--- a/sw/source/ui/vba/vbadocument.cxx
+++ b/sw/source/ui/vba/vbadocument.cxx
@@ -445,7 +445,7 @@ SwVbaDocument::getIntrospection(  )
 uno::Any SAL_CALL
 SwVbaDocument::invoke( const OUString& aFunctionName, const uno::Sequence< 
uno::Any >& /*aParams*/, uno::Sequence< ::sal_Int16 >& /*aOutParamIndex*/, 
uno::Sequence< uno::Any >& /*aOutParam*/ )
 {
-SAL_INFO("sw", "** will barf " << aFunctionName );
+SAL_INFO("sw.vba", "** will barf " << aFunctionName );
 throw uno::RuntimeException(); // unsupported operation
 }
 
diff --git a/sw/source/ui/vba/vbadocumentproperties.cxx 
b/sw/source/ui/vba/vbadocumentproperties.cxx
index 2b31ebe73992..625c46e0e1e2 100644
--- a/sw/source/ui/vba/vbadocumentproperties.cxx
+++ b/sw/source/ui/vba/vbadocumentproperties.cxx
@@ -300,7 +300,7 @@ public:
 }
 catch (const uno::Exception&)
 {
-SAL_WARN("sw", "Got exception");
+SAL_WARN("sw.vba", "Got exception");
 }
 uno::Any aReturn;
 if ( rPropName == "LineCount" ) // special processing needed
@@ -837,7 +837,7 @@ public:
 
 virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) override
 {
-SAL_INFO("sw", "hasByName(" << aName << ") returns " << 
mxUserDefinedProp->getPropertySetInfo()->hasPropertyByName( aName ) );
+SAL_INFO("sw.vba", "hasByName(" << aName << ") returns " << 
mxUserDefinedProp->getPropertySetInfo()->hasPropertyByName( aName ) );
 return mxUserDefinedProp->getPropertySetInfo()->hasPropertyByName( 
aName );
 }
 
@@ -855,13 +855,13 @@ public:
 virtual uno::Reference< container::XEnumeration > SAL_CALL 
createEnumeration(  ) override
 {
 // create a map of properties ( the key doesn't matter )
-SAL_INFO("sw", "Creating an enumeration");
+SAL_INFO("sw.vba", "Creating an enumeration");
 sal_Int32 key = 0;
 sal_Int32 nElem =  getCount();
 DocProps simpleDocPropSnapShot;
 for ( ; key < nElem; ++key )
  simpleDocPropSnapShot[ key ].set( getByIndex( key ), 
uno::UNO_QUERY_THROW );
-SAL_INFO("sw", "After creating the enumeration");
+SAL_INFO("sw.vba", "After 

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

2018-01-16 Thread Thorsten Behrens
 include/sal/log.hxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit d6d9481a8dea2d88374f8293debb4b28c1c2e0d1
Author: Thorsten Behrens 
Date:   Tue Jan 16 18:57:25 2018 +0100

sal: document more logging options

Change-Id: I19630ddf3ee6ece9b7571d971c6cff1e86884256

diff --git a/include/sal/log.hxx b/include/sal/log.hxx
index a01dc8988e20..6bcd34b09fe2 100644
--- a/include/sal/log.hxx
+++ b/include/sal/log.hxx
@@ -281,6 +281,12 @@ inline char const * unwrapStream(SAL_UNUSED_PARAMETER 
StreamIgnore const &) {
 output is subject to change.  The log output is printed to stderr without
 further text encoding conversion.
 
+On some systems, log output can be redirected to other log sinks,
+notably a file provided as a system path and filename via
+environment variable SAL_LOG_FILE; or to a syslog facility if
+LibreOffice is suitably built, by setting environment variable
+SAL_LOG_SYSLOG.
+
 @see @ref sal_log_areas
 
 @attention For now, this functionality should only be used internally 
within
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-12-13 Thread Stephan Bergmann
 include/sal/types.h |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 6cbbe3a6c35cde186351315ddb189366bcca1deb
Author: Stephan Bergmann 
Date:   Wed Dec 13 08:22:36 2017 +0100

[API CHANGE] Remove SAL_CALL_ELLIPSE

At least internally it was unused at least ever since
9399c662f36c385b0c705eb34e636a9aec450282 "initial import", it is unlikely 
that
it ever was used for anything useful, and it is highly unlikely that it is 
used
by 3rd-party code.

Change-Id: I8b1e7e18e041164580acbb0bdba205ec1dca71d2
Reviewed-on: https://gerrit.libreoffice.org/46364
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/include/sal/types.h b/include/sal/types.h
index d1f5dbeec507..49f7568a1978 100644
--- a/include/sal/types.h
+++ b/include/sal/types.h
@@ -235,7 +235,6 @@ typedef void *   sal_Handle;
 #   define SAL_DLLPUBLIC_TEMPLATE
 #   define SAL_DLLPUBLIC_RTTI
 #   define SAL_CALL __cdecl
-#   define SAL_CALL_ELLIPSE __cdecl
 #elif defined SAL_UNX
 #   if defined(__GNUC__)
 # if defined(DISABLE_DYNLOADING)
@@ -270,7 +269,6 @@ typedef void *   sal_Handle;
 # define SAL_DLLPUBLIC_RTTI
 #   endif
 #   define SAL_CALL
-#   define SAL_CALL_ELLIPSE
 #else
 #   error("unknown platform")
 #endif
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/sal vcl/inc vcl/unx

2017-10-27 Thread Jan-Marek Glogowski
 include/sal/log-areas.dox |1 
 vcl/inc/unx/gendata.hxx   |3 
 vcl/inc/unx/tde/tdedata.hxx   |  114 --
 vcl/inc/vclpluginapi.h|   12 ---
 vcl/unx/generic/plugadapt/salplug.cxx |   14 
 5 files changed, 3 insertions(+), 141 deletions(-)

New commits:
commit 4805a3a8b6d2e9cc1710b9dced2041a6c7b5e596
Author: Jan-Marek Glogowski 
Date:   Fri Oct 27 10:29:14 2017 +0200

Remove some old KDE3 and TDE stuff

Both VCL plugins are long gone.
We currently just keep the desktop detection.
Generally fall back to gtk in VCL detection.

Change-Id: I35830868cb75d16ae7b90b20df699929cefa4636
Reviewed-on: https://gerrit.libreoffice.org/43940
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 3f0aa406d6da..ab762e81dd50 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -456,7 +456,6 @@ certain functionality.
 @li @c vcl.headless - bitmap-based backend
 @li @c vcl.helper
 @li @c vcl.icontest
-@li @c vcl.kde - KDE
 @li @c vcl.kde4 - KDE4
 @li @c vcl.kde5 - KDE5
 @li @c vcl.layout - Widget layout
diff --git a/vcl/inc/unx/gendata.hxx b/vcl/inc/unx/gendata.hxx
index 4088985678a6..fda6680a962a 100644
--- a/vcl/inc/unx/gendata.hxx
+++ b/vcl/inc/unx/gendata.hxx
@@ -20,8 +20,7 @@ class SalGenericDisplay;
 namespace psp { class PrintFontManager; }
 
 enum GenericUnixSalDataType { SAL_DATA_GTK, SAL_DATA_GTK3,
-  SAL_DATA_TDE3,
-  SAL_DATA_KDE3,SAL_DATA_KDE4, SAL_DATA_KDE5,
+  SAL_DATA_KDE4, SAL_DATA_KDE5,
   SAL_DATA_UNX, SAL_DATA_SVP,
   SAL_DATA_ANDROID, SAL_DATA_IOS,
   SAL_DATA_HEADLESS };
diff --git a/vcl/inc/unx/tde/tdedata.hxx b/vcl/inc/unx/tde/tdedata.hxx
deleted file mode 100644
index d8f1363f2f95..
--- a/vcl/inc/unx/tde/tdedata.hxx
+++ /dev/null
@@ -1,114 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * Copyright 2012 Timothy Pearson
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * 
- * for a copy of the LGPLv3 License.
- *
- /
-
-#ifndef INCLUDED_VCL_INC_UNX_TDE_TDEDATA_HXX
-#define INCLUDED_VCL_INC_UNX_TDE_TDEDATA_HXX
-
-#include 
-#include 
-#include 
-
-class TDEData : public X11SalData
-{
-public:
-TDEData( SalInstance *pInstance ) : X11SalData( SAL_DATA_TDE, pInstance ) 
{}
-virtual ~TDEData();
-
-virtual void Init();
-virtual void initNWF();
-virtual void deInitNWF();
-};
-
-class SalTDEDisplay : public SalX11Display
-{
-public:
-SalTDEDisplay( Display* pDisp );
-virtual ~SalTDEDisplay();
-};
-
-class TDESalFrame : public X11SalFrame
-{
-static const int nMaxGraphics = 2;
-
-struct GraphicsHolder
-{
-X11SalGraphics* pGraphics;
-boolbInUse;
-GraphicsHolder()
-: pGraphics( NULL ),
-  bInUse( false )
-{}
-~GraphicsHolder();
-};
-GraphicsHolder m_aGraphics[ nMaxGraphics ];
-
-public:
-TDESalFrame( SalFrame* pParent, SalFrameStyleFlags );
-virtual ~TDESalFrame();
-
-virtual SalGraphics* AcquireGraphics();
-virtual void ReleaseGraphics( SalGraphics *pGraphics );
-virtual void updateGraphics( bool bClear );
-virtual void UpdateSettings( AllSettings& rSettings );
-virtual void Show( bool bVisible, bool bNoActivate );
-};
-
-class TDESalInstance : public X11SalInstance
-{
-public:
-TDESalInstance( SalYieldMutex* pMutex )
-: X11SalInstance( pMutex ) {}
-virtual ~TDESalInstance() {}
-virtual SalFrame* CreateFrame( SalFrame* pParent, 

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

2017-10-13 Thread Miklos Vajna
 include/sal/log-areas.dox |1 
 sw/source/core/layout/dbg_lay.cxx |   84 +++---
 2 files changed, 45 insertions(+), 40 deletions(-)

New commits:
commit f57604a4a83db7e6b0ca65d0c9b49e88bccb91ad
Author: Miklos Vajna 
Date:   Fri Oct 13 10:35:20 2017 +0200

sw dbg_lay: make it easer to match log entries with code locations

Also warn when logging stops due to a limit, not because the layout
finished.

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

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 69e1d12a3440..8c0db9de0809 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -496,6 +496,7 @@ certain functionality.
 @li @c sw.html - Writer HTML import/export
 @li @c sw.idle
 @li @c sw.layout - Writer core view: document layout
+@li @c sw.layout.debug - Writer layout dbg_lay output
 @li @c sw.level2
 @li @c sw.mailmerge - Writer mail merge
 @li @c sw.pageframe - debug lifecycle of SwPageFrame
diff --git a/sw/source/core/layout/dbg_lay.cxx 
b/sw/source/core/layout/dbg_lay.cxx
index 2baa1a7bd469..6a2ac2799ca4 100644
--- a/sw/source/core/layout/dbg_lay.cxx
+++ b/sw/source/core/layout/dbg_lay.cxx
@@ -113,8 +113,8 @@ static sal_uLong lcl_GetFrameId( const SwFrame* pFrame )
 if( bFrameId )
 return pFrame->GetFrameId();
 #endif
-if( pFrame && pFrame->IsTextFrame() )
-return static_cast(pFrame)->GetTextNode()->GetIndex();
+if( pFrame )
+return pFrame->GetFrameId();
 return 0;
 }
 
@@ -439,11 +439,11 @@ static void lcl_Start(OStringBuffer& rOut, OStringBuffer& 
rLay, DbgAction nActio
 /// of the frame; "+" stands for valid, "-" stands for invalid.
 static void lcl_Flags(OStringBuffer& rOut, const SwFrame* pFrame)
 {
-rOut.append(" Sz");
+rOut.append(" ValidSize");
 rOut.append(pFrame->GetValidSizeFlag() ? '+' : '-');
-rOut.append(" Ps");
+rOut.append(" ValidPos");
 rOut.append(pFrame->GetValidPosFlag() ? '+' : '-');
-rOut.append(" PA");
+rOut.append(" ValidPrtArea");
 rOut.append(pFrame->GetValidPrtAreaFlag() ? '+' : '-');
 }
 
@@ -451,44 +451,44 @@ static void lcl_Flags(OStringBuffer& rOut, const SwFrame* 
pFrame)
 static void lcl_FrameType( OStringBuffer& rOut, const SwFrame* pFrame )
 {
 if( pFrame->IsTextFrame() )
-rOut.append("Text ");
+rOut.append("SwTextFrame ");
 else if( pFrame->IsLayoutFrame() )
 {
 if( pFrame->IsPageFrame() )
-rOut.append("Page ");
+rOut.append("SwPageFrame ");
 else if( pFrame->IsColumnFrame() )
-rOut.append("Col ");
+rOut.append("SwColumnFrame ");
 else if( pFrame->IsBodyFrame() )
 {
 if( pFrame->GetUpper() && pFrame->IsColBodyFrame() )
 rOut.append("(Col)");
-rOut.append("Body ");
+rOut.append("SwBodyFrame ");
 }
 else if( pFrame->IsRootFrame() )
-rOut.append("Root ");
+rOut.append("SwRootFrame ");
 else if( pFrame->IsCellFrame() )
-rOut.append("Cell ");
+rOut.append("SwCellFrame ");
 else if( pFrame->IsTabFrame() )
-rOut.append("Tab ");
+rOut.append("SwTabFrame ");
 else if( pFrame->IsRowFrame() )
-rOut.append("Row ");
+rOut.append("SwRowFrame ");
 else if( pFrame->IsSctFrame() )
-rOut.append("Sect ");
+rOut.append("SwSectionFrame ");
 else if( pFrame->IsHeaderFrame() )
-rOut.append("Header ");
+rOut.append("SwHeaderFrame ");
 else if( pFrame->IsFooterFrame() )
-rOut.append("Footer ");
+rOut.append("SwFooterFrame ");
 else if( pFrame->IsFootnoteFrame() )
-rOut.append("Footnote ");
+rOut.append("SwFootnoteFrame ");
 else if( pFrame->IsFootnoteContFrame() )
-rOut.append("FootnoteCont ");
+rOut.append("SwFootnoteContFrame ");
 else if( pFrame->IsFlyFrame() )
-rOut.append("Fly ");
+rOut.append("SwFlyFrame ");
 else
-rOut.append("Layout ");
+rOut.append("SwLayoutFrame ");
 }
 else if( pFrame->IsNoTextFrame() )
-rOut.append("NoText ");
+rOut.append("SwNoTextFrame");
 else
 rOut.append("Not impl. ");
 }
@@ -534,7 +534,7 @@ void SwImplProtocol::Record_( const SwFrame* pFrame, PROT 
nFunction, DbgAction n
 {
 case PROT::Snapshot: lcl_Flags( aOut, pFrame );
 break;
-case PROT::MakeAll:  aOut.append("MakeAll");
+case PROT::MakeAll:  aOut.append("SwFrame::MakeAll");
 lcl_Start( aOut, aLayer, nAct );
   

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

2017-10-02 Thread Marco Cecchetti
 include/sal/log-areas.dox  |1 
 sc/source/ui/inc/viewdata.hxx  |7 ++-
 sc/source/ui/unoobj/docuno.cxx |   20 +++--
 sc/source/ui/view/viewdata.cxx |   90 -
 4 files changed, 110 insertions(+), 8 deletions(-)

New commits:
commit b230f845e794641721254e0a95b006eb3588aa0c
Author: Marco Cecchetti 
Date:   Wed Mar 29 12:55:12 2017 +0200

lok - sc: document size as sum of row heights/col widths in pixel

Grid lines, cursor overlay, row/col headers are all computed by
summing up row heights / col widths converted to pixels.

On the contrary the document size was converted to pixel only at the
end after having summed up heights/widths in twips.

All that lead to have a document height/width greater than the
position of the last row/col, with the scrolling in online going
unplesantly far beyond the last row/column.

This patch change the way the document size is computed, so that the
spreadsheet height/width matches the position of the last row/column.

Moreover it exploits the cache-like structure for row/col positions
introduced in a previous commit.

Change-Id: Ibb2cc6a7b592e359a0b1202dc9bea1dd4c421354
Reviewed-on: https://gerrit.libreoffice.org/40448
Tested-by: Jenkins 
Reviewed-by: Marco Cecchetti 

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index e1f826e6ec70..c4ae03e79a48 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -131,6 +131,7 @@ certain functionality.
 @li @c sc.core.formulagroup
 @li @c sc.core.grouparealistener - sc::FormulaGroupAreaListener
 @li @c sc.filter - Calc filter
+@li @c sc.lok.docsize
 @li @c sc.lok.poshelper
 @li @c sc.opencl - OpenCL-related stuff in general
 @li @c sc.opencl.source - Generated OpenCL source code
diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx
index dbda16afe2f2..0b3fbb2f61b3 100644
--- a/sc/source/ui/inc/viewdata.hxx
+++ b/sc/source/ui/inc/viewdata.hxx
@@ -337,6 +337,9 @@ public:
 SCROW   GetCurYForTab( SCTAB nTabIndex ) const;
 SCCOL   GetOldCurX() const;
 SCROW   GetOldCurY() const;
+longGetLOKDocWidthPixel() const { return 
pThisTab->aWidthHelper.getPosition(pThisTab->nMaxTiledCol); }
+longGetLOKDocHeightPixel() const{ return 
pThisTab->aHeightHelper.getPosition(pThisTab->nMaxTiledRow); }
+
 ScPositionHelper& GetLOKWidthHelper()   { return 
pThisTab->aWidthHelper; }
 ScPositionHelper& GetLOKHeightHelper()  { return 
pThisTab->aHeightHelper; }
 
@@ -367,8 +370,8 @@ public:
 voidSetVSplitPos( long nPos )   { 
pThisTab->nVSplitPos = nPos; }
 voidSetFixPosX( SCCOL nPos ){ 
pThisTab->nFixPosX = nPos; }
 voidSetFixPosY( SCROW nPos ){ 
pThisTab->nFixPosY = nPos; }
-voidSetMaxTiledCol( SCCOL nCol ){ 
pThisTab->nMaxTiledCol = nCol; }
-voidSetMaxTiledRow( SCROW nRow ){ 
pThisTab->nMaxTiledRow = nRow; }
+voidSetMaxTiledCol( SCCOL nCol );
+voidSetMaxTiledRow( SCROW nRow );
 
 voidSetPagebreakMode( bool bSet );
 voidSetPasteMode ( ScPasteFlags nFlags ){ 
nPasteFlags = nFlags; }
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 265334a5eef8..ba1508c5195a 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -551,7 +551,7 @@ Size ScModelObj::getDocumentSize()
 {
 Size aSize(10, 10); // minimum size
 
-const ScViewData* pViewData = ScDocShell::GetViewData();
+ScViewData* pViewData = ScDocShell::GetViewData();
 if (!pViewData)
 return aSize;
 
@@ -562,9 +562,21 @@ Size ScModelObj::getDocumentSize()
 
 rDoc.GetTiledRenderingArea(nTab, nEndCol, nEndRow);
 
-// convert to twips
-aSize.setWidth(rDoc.GetColWidth(0, nEndCol, nTab));
-aSize.setHeight(rDoc.GetRowHeight(0, nEndRow, nTab));
+pViewData->SetMaxTiledCol(nEndCol);
+pViewData->SetMaxTiledRow(nEndRow);
+
+if (pViewData->GetLOKDocWidthPixel() > 0 && 
pViewData->GetLOKDocHeightPixel() > 0)
+{
+// convert to twips
+aSize.setWidth(pViewData->GetLOKDocWidthPixel() * TWIPS_PER_PIXEL);
+aSize.setHeight(pViewData->GetLOKDocHeightPixel() * TWIPS_PER_PIXEL);
+}
+else
+{
+// convert to twips
+aSize.setWidth(rDoc.GetColWidth(0, nEndCol, nTab));
+aSize.setHeight(rDoc.GetRowHeight(0, nEndRow, nTab));
+}
 
 return aSize;
 }
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index af65ac0af798..88d2c8e56418 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ 

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

2017-10-02 Thread Marco Cecchetti
 include/sal/log-areas.dox  |1 
 sc/source/ui/inc/viewdata.hxx  |   37 +
 sc/source/ui/view/viewdata.cxx |  160 +
 3 files changed, 198 insertions(+)

New commits:
commit a789ef3c41443a3aa964bea31e2c8e22552fcdfd
Author: Marco Cecchetti 
Date:   Thu Feb 23 19:20:05 2017 +0100

lok - sc: a cache-like structure for row/col positions in the document

ScPositionHelper provides the ability to insert (and remove) row-
position pairs where the position is in pixel and related to the
spreadsheet top.

In this way one can compute a new row position by starting from the
nearest row presents in this cache-like data structure.

It offers also the ability to invalidate the cache by removing all
cached data below a given row or position.

This data structure can be used for columns, too.

Change-Id: Ifd66a003680ef9a3babf46ae952221c04451be9a
Reviewed-on: https://gerrit.libreoffice.org/40447
Tested-by: Jenkins 
Reviewed-by: Marco Cecchetti 

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index b8004d4f4fb4..e1f826e6ec70 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -131,6 +131,7 @@ certain functionality.
 @li @c sc.core.formulagroup
 @li @c sc.core.grouparealistener - sc::FormulaGroupAreaListener
 @li @c sc.filter - Calc filter
+@li @c sc.lok.poshelper
 @li @c sc.opencl - OpenCL-related stuff in general
 @li @c sc.opencl.source - Generated OpenCL source code
 @li @c sc.orcus
diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx
index bd1288d6ba9c..dbda16afe2f2 100644
--- a/sc/source/ui/inc/viewdata.hxx
+++ b/sc/source/ui/inc/viewdata.hxx
@@ -118,6 +118,38 @@ class ScViewData;
 class ScMarkData;
 class ScGridWindow;
 
+class ScPositionHelper
+{
+public:
+typedef SCCOLROW index_type;
+typedef std::pair value_type;
+static_assert(std::numeric_limits::is_signed, 
"ScPositionCache: index type is not signed");
+
+private:
+static const index_type null = std::numeric_limits::min();
+
+class Comp
+{
+public:
+bool operator() (const value_type& rValue1, const value_type& rValue2) 
const;
+};
+
+std::set mData;
+
+public:
+ScPositionHelper();
+
+void insert(index_type nIndex, long nPos);
+void removeByIndex(index_type nIndex);
+void removeByPosition(long nPos);
+void invalidateByIndex(index_type nIndex);
+void invalidateByPosition(long nPos);
+const value_type& getNearestByIndex(index_type nIndex) const;
+const value_type& getNearestByPosition(long nPos) const;
+long getPosition(index_type nIndex) const;
+index_type getIndex(long nPos) const;
+};
+
 class ScViewDataTable   // per-sheet data
 {
 friend class ScViewData;
@@ -148,6 +180,9 @@ private:
 SCROW   nCurY;
 SCCOL   nOldCurX;
 SCROW   nOldCurY;
+ScPositionHelper aWidthHelper;
+ScPositionHelper aHeightHelper;
+
 SCCOL   nPosX[2];   ///< X position of the top 
left cell of the visible area.
 SCROW   nPosY[2];   ///< Y position of the top 
left cell of the visible area.
 SCCOL   nMaxTiledCol;
@@ -302,6 +337,8 @@ public:
 SCROW   GetCurYForTab( SCTAB nTabIndex ) const;
 SCCOL   GetOldCurX() const;
 SCROW   GetOldCurY() const;
+ScPositionHelper& GetLOKWidthHelper()   { return 
pThisTab->aWidthHelper; }
+ScPositionHelper& GetLOKHeightHelper()  { return 
pThisTab->aHeightHelper; }
 
 ScSplitMode GetHSplitMode() const   { return 
pThisTab->eHSplitMode; }
 ScSplitMode GetVSplitMode() const   { return 
pThisTab->eVSplitMode; }
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 92647acb5a5e..af65ac0af798 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -90,6 +90,166 @@ void lcl_LOKRemoveWindow(ScTabViewShell* pTabViewShell, 
ScSplitPos eWhich)
 
 } // anonymous namespace
 
+const ScPositionHelper::index_type ScPositionHelper::null; // definition
+
+bool ScPositionHelper::Comp::operator() (const value_type& rValue1, const 
value_type& rValue2) const
+{
+if (rValue1.first == null || rValue2.first == null)
+{
+return rValue1.second < rValue2.second;
+}
+else
+{
+return rValue1.first < rValue2.first;
+}
+}
+
+ScPositionHelper::ScPositionHelper()
+{
+mData.insert(std::make_pair(-1, 0));
+}
+
+void ScPositionHelper::insert(index_type nIndex, long nPos)
+{
+if (nIndex < 0) return;
+SAL_INFO("sc.lok.poshelper", "ScPositionHelper::insert: nIndex: "
+<< nIndex << ", nPos: " << nPos << ", size: " << mData.size());
+value_type 

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

2017-09-19 Thread Jan-Marek Glogowski
 include/sal/log-areas.dox|1 
 vcl/osx/salinst.cxx  |1 
 vcl/source/app/scheduler.cxx |   56 ++-
 vcl/source/app/svmain.cxx|5 ++-
 4 files changed, 60 insertions(+), 3 deletions(-)

New commits:
commit fd0fff67798fea87217e65bb1561aa0d0e741c51
Author: Jan-Marek Glogowski 
Date:   Fri Jul 28 17:13:20 2017 +0200

Assert active Tasks on scheduler de-init

This shuts down the VCL scheduler later in the DeInitVCL call and
asserts active pending tasks, as these will never be processed
after shutdown.

There is currently a TODO whitelist, so the unit tests still pass
but probably most of these should be fixed. No task in the list
looks critical - all seem to do some idle / cleanup work.

This also processes all the Idles before shutdown. All seem to be
of type sfx::SfxItemDisruptor_Impl.

Change-Id: I9cc484a525cc2bacd54c4f271f86997517393e92
Reviewed-on: https://gerrit.libreoffice.org/40533
Tested-by: Jenkins 
Reviewed-by: Jan-Marek Glogowski 

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 46a75f5a6151..8539f4755cd6 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -459,6 +459,7 @@ certain functionality.
 @li @c vcl.plugadapt - the Unix/X11 backend plugin mechanism
 @li @c vcl.quartz
 @li @c vcl.schedule - scheduler / main-loop information
+@li @c vcl.schedule.deinit
 @li @c vcl.screensaverinhibitor
 @li @c vcl.scrollbar - Scroll Bars
 @li @c vcl.se - VCL Session Manager
diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx
index 5e5415fef884..56dd7bef8feb 100644
--- a/vcl/osx/salinst.cxx
+++ b/vcl/osx/salinst.cxx
@@ -108,6 +108,7 @@ void AquaSalInstance::delayedSettingsChanged( bool 
bInvalidate )
 {
 osl::Guard< comphelper::SolarMutex > aGuard( *mpSalYieldMutex );
 AquaDelayedSettingsChanged* pIdle = new AquaDelayedSettingsChanged( 
bInvalidate );
+pIdle->SetDebugName( "AquaSalInstance AquaDelayedSettingsChanged" );
 pIdle->Start();
 }
 
diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index 54922ccceaa9..d4d16384137a 100644
--- a/vcl/source/app/scheduler.cxx
+++ b/vcl/source/app/scheduler.cxx
@@ -95,6 +95,22 @@ void Scheduler::ImplDeInitScheduler()
 DBG_TESTSOLARMUTEX();
 
 SchedulerGuard aSchedulerGuard;
+
+#if OSL_DEBUG_LEVEL > 0
+{
+ImplSchedulerData* pSchedulerData = rSchedCtx.mpFirstSchedulerData;
+sal_uInt32 nTasks = 0;
+while ( pSchedulerData )
+{
+++nTasks;
+pSchedulerData = pSchedulerData->mpNext;
+}
+SAL_INFO( "vcl.schedule.deinit", "DeInit the scheduler - tasks: " << 
nTasks );
+}
+
+// clean up all the sfx::SfxItemDisruptor_Impl Idles
+ProcessEventsToIdle();
+#endif
 rSchedCtx.mbActive = false;
 
 assert( nullptr == rSchedCtx.mpSchedulerStack );
@@ -103,19 +119,57 @@ void Scheduler::ImplDeInitScheduler()
 if (rSchedCtx.mpSalTimer) rSchedCtx.mpSalTimer->Stop();
 DELETEZ( rSchedCtx.mpSalTimer );
 
+#if OSL_DEBUG_LEVEL > 0
+sal_uInt32 nActiveTasks = 0, nIgnoredTasks = 0;
+#endif
 ImplSchedulerData* pSchedulerData = rSchedCtx.mpFirstSchedulerData;
 while ( pSchedulerData )
 {
 Task *pTask = pSchedulerData->mpTask;
 if ( pTask )
 {
-pTask->mbActive = false;
+if ( pTask->mbActive )
+{
+#if OSL_DEBUG_LEVEL > 0
+const char *sIgnored = "";
+++nActiveTasks;
+// TODO: shutdown these timers before Scheduler de-init
+// TODO: remove Task from static object
+if ( pTask->GetDebugName() && ( false
+|| !strcmp( pTask->GetDebugName(), "desktop::Desktop 
m_firstRunTimer" )
+|| !strcmp( pTask->GetDebugName(), 
"editeng::ImpEditEngine aOnlineSpellTimer" )
+|| !strcmp( pTask->GetDebugName(), "ImplHandleMouseMsg 
SalData::mpMouseLeaveTimer" )
+|| !strcmp( pTask->GetDebugName(), "sc ScModule 
IdleTimer" )
+|| !strcmp( pTask->GetDebugName(), 
"sd::CacheConfiguration maReleaseTimer" )
+|| !strcmp( pTask->GetDebugName(), 
"svtools::GraphicCache maReleaseTimer" )
+|| !strcmp( pTask->GetDebugName(), 
"svtools::GraphicObject mpSwapOutTimer" )
+|| !strcmp( pTask->GetDebugName(), "svx OLEObjCache 
pTimer UnloadCheck" )
+|| !strcmp( pTask->GetDebugName(), "vcl::win 
GdiPlusBuffer aGdiPlusBuffer" )
+))
+{
+sIgnored = " (ignored)";
+++nIgnoredTasks;
+}
+const Timer *timer = dynamic_cast( pTask );
+if ( timer )
+SAL_WARN( 

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

2017-09-19 Thread Mike Kaganski
 include/sal/log-areas.dox |1 
 xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx |   48 +-
 2 files changed, 41 insertions(+), 8 deletions(-)

New commits:
commit 2caf390474150947c79b5f719e625145f9acd6d0
Author: Mike Kaganski 
Date:   Mon Sep 18 22:34:42 2017 +0300

PDF signing: don't fail unittest on invalid certificates

Without this, expired/not yet valid certificates, as well as
certificates without private key, make test needlessly fail.

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

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index d12ae1675bfe..46a75f5a6151 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -533,6 +533,7 @@ certain functionality.
 @li @c xmlsecurity.helper
 @li @c xmlsecurity.ooxml - OOXML signature support
 @li @c xmlsecurity.pdfio - signing of existing PDF
+@li @c xmlsecurity.pdfio.test
 @li @c xmlsecurity.xmlsec - xmlsec wrapper
 @li @c xmlsecurity.xmlsec.gpg - gpg xmlsec component
 
diff --git a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx 
b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
index 39746ac2a233..8d8e265c6aec 100644
--- a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
+++ b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
@@ -19,6 +19,11 @@
 #include 
 #include 
 
+#ifdef _WIN32
+ #define WIN32_LEAN_AND_MEAN
+ #include 
+#endif
+
 using namespace com::sun::star;
 
 namespace
@@ -162,24 +167,51 @@ bool PDFSigningTest::sign(const OUString& rInURL, const 
OUString& rOutURL, size_
 CPPUNIT_ASSERT_EQUAL(nOriginalSignatureCount, aSignatures.size());
 }
 
+bool bSignSuccessful = false;
 // Sign it and write out the result.
 {
 uno::Reference xSecurityEnvironment 
= xSecurityContext->getSecurityEnvironment();
 uno::Sequence aCertificates = 
xSecurityEnvironment->getPersonalCertificates();
-if (!aCertificates.hasElements())
+DateTime now(DateTime::SYSTEM);
+for (auto& cert : aCertificates)
 {
-// NSS failed to parse it's own profile or Windows has no 
certificates installed.
-return false;
+css::util::DateTime aNotValidAfter = cert->getNotValidAfter();
+css::util::DateTime aNotValidBefore = cert->getNotValidBefore();
+
+// Only try certificates that are already active and not expired
+if ((now > aNotValidAfter) || (now < aNotValidBefore))
+{
+SAL_WARN("xmlsecurity.pdfio.test", "Skipping a certificate 
that is not yet valid or already not valid");
+}
+else
+{
+bool bSignResult = aDocument.Sign(cert, "test", 
/*bAdES=*/true);
+#ifdef _WIN32
+if (!bSignResult)
+{
+DWORD dwErr = GetLastError();
+if (dwErr == CRYPT_E_NO_KEY_PROPERTY)
+{
+SAL_WARN("xmlsecurity.pdfio.test", "Skipping a 
certificate without a private key");
+continue; // The certificate does not have a private 
key - not a valid certificate
+}
+}
+#endif
+CPPUNIT_ASSERT(bSignResult);
+SvFileStream aOutStream(rOutURL, StreamMode::WRITE | 
StreamMode::TRUNC);
+CPPUNIT_ASSERT(aDocument.Write(aOutStream));
+bSignSuccessful = true;
+break;
+}
 }
-CPPUNIT_ASSERT(aDocument.Sign(aCertificates[0], "test", 
/*bAdES=*/true));
-SvFileStream aOutStream(rOutURL, StreamMode::WRITE | 
StreamMode::TRUNC);
-CPPUNIT_ASSERT(aDocument.Write(aOutStream));
 }
 
 // This was nOriginalSignatureCount when PDFDocument::Sign() silently 
returned success, without doing anything.
-verify(rOutURL, nOriginalSignatureCount + 1, 
/*rExpectedSubFilter=*/OString());
+if (bSignSuccessful)
+verify(rOutURL, nOriginalSignatureCount + 1, 
/*rExpectedSubFilter=*/OString());
 
-return true;
+// May return false if NSS failed to parse it's own profile or Windows has 
no valid certificates installed.
+return bSignSuccessful;
 }
 
 void PDFSigningTest::testPDFAdd()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/sal sal/osl sal/util svl/source

2017-09-06 Thread Stephan Bergmann
 include/sal/backtrace.hxx|   11 ---
 sal/osl/unx/backtraceapi.cxx |4 ++--
 sal/osl/w32/backtrace.cxx|4 ++--
 sal/util/sal.map |4 ++--
 svl/source/notify/lstner.cxx |7 ---
 5 files changed, 18 insertions(+), 12 deletions(-)

New commits:
commit 796c494d78a851aae7d58e0720f64984cb5716de
Author: Stephan Bergmann 
Date:   Tue Sep 5 11:04:42 2017 +0200

Clean up sal/backtrace.hxx

Change-Id: Id78e9c0ca29ff2e52591f3d446431ac23c20ab7a
Reviewed-on: https://gerrit.libreoffice.org/41926
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/include/sal/backtrace.hxx b/include/sal/backtrace.hxx
index f437a3b73620..f471549b7f7a 100644
--- a/include/sal/backtrace.hxx
+++ b/include/sal/backtrace.hxx
@@ -23,20 +23,25 @@
   a small handful of recorded stack traces.
 
   @param backtraceDepth value indicating the maximum backtrace depth; must be 
> 0
+
+  @since LibreOffice 6.0
 */
 #if defined LIBO_INTERNAL_ONLY
 
+namespace sal {
+
 struct BacktraceState {
 void** buffer;
 int nDepth;
 ~BacktraceState() {delete[] buffer;}
 };
 
-SAL_DLLPUBLIC std::unique_ptr SAL_CALL sal_backtrace_get(
+SAL_DLLPUBLIC std::unique_ptr backtrace_get(
 sal_uInt32 backtraceDepth);
 
-SAL_DLLPUBLIC OUString SAL_CALL sal_backtrace_to_string(
-BacktraceState* backtraceState);
+SAL_DLLPUBLIC OUString backtrace_to_string(BacktraceState* backtraceState);
+
+}
 
 #endif
 
diff --git a/sal/osl/unx/backtraceapi.cxx b/sal/osl/unx/backtraceapi.cxx
index 4838474be36c..4216bf2cd07d 100644
--- a/sal/osl/unx/backtraceapi.cxx
+++ b/sal/osl/unx/backtraceapi.cxx
@@ -59,7 +59,7 @@ OUString osl::detail::backtraceAsString(sal_uInt32 maxDepth) {
 return b3.makeStringAndClear();
 }
 
-std::unique_ptr sal_backtrace_get(sal_uInt32 maxDepth)
+std::unique_ptr sal::backtrace_get(sal_uInt32 maxDepth)
 {
 assert(maxDepth != 0);
 auto const maxInt = static_cast(
@@ -72,7 +72,7 @@ std::unique_ptr sal_backtrace_get(sal_uInt32 
maxDepth)
 return std::unique_ptr(new BacktraceState{ b1, n });
 }
 
-OUString sal_backtrace_to_string(BacktraceState* backtraceState)
+OUString sal::backtrace_to_string(BacktraceState* backtraceState)
 {
 FreeGuard b2(backtrace_symbols(backtraceState->buffer, 
backtraceState->nDepth));
 if (b2.buffer == nullptr) {
diff --git a/sal/osl/w32/backtrace.cxx b/sal/osl/w32/backtrace.cxx
index 230adca4a2f8..574e4a450f48 100644
--- a/sal/osl/w32/backtrace.cxx
+++ b/sal/osl/w32/backtrace.cxx
@@ -65,7 +65,7 @@ OUString osl::detail::backtraceAsString(sal_uInt32 maxDepth)
 return aBuf.makeStringAndClear();
 }
 
-std::unique_ptr sal_backtrace_get(sal_uInt32 maxDepth)
+std::unique_ptr sal::backtrace_get(sal_uInt32 maxDepth)
 {
 assert(maxDepth != 0);
 auto const maxUlong = std::numeric_limits::max();
@@ -87,7 +87,7 @@ std::unique_ptr sal_backtrace_get(sal_uInt32 
maxDepth)
 return std::unique_ptr(new BacktraceState{ pStack, nFrames 
});
 }
 
-OUString sal_backtrace_to_string(BacktraceState* backtraceState)
+OUString sal::backtrace_to_string(BacktraceState* backtraceState)
 {
 OUStringBuffer aBuf;
 
diff --git a/sal/util/sal.map b/sal/util/sal.map
index e9195a1434f8..4bfe548d22f0 100644
--- a/sal/util/sal.map
+++ b/sal/util/sal.map
@@ -735,8 +735,8 @@ PRIVATE_1.3 { # LibreOffice 5.4
 
 PRIVATE_1.4 { # LibreOffice 6.0
 global:
-_Z17sal_backtrace_getj;
-_Z23sal_backtrace_to_stringP14BacktraceState;
+_ZN3sal13backtrace_getEj;
+_ZN3sal19backtrace_to_stringEPNS_14BacktraceStateE;
 } PRIVATE_1.3;
 
 PRIVATE_textenc.1 { # LibreOffice 3.6
diff --git a/svl/source/notify/lstner.cxx b/svl/source/notify/lstner.cxx
index 75928021351a..9c79da9e5185 100644
--- a/svl/source/notify/lstner.cxx
+++ b/svl/source/notify/lstner.cxx
@@ -35,7 +35,8 @@ struct SfxListener::Impl
 {
 SfxBroadcasterArr_Impl maBCs;
 #ifdef DBG_UTIL
-std::map maCallStacks;
+std::map
+maCallStacks;
 #endif
 };
 
@@ -95,7 +96,7 @@ void SfxListener::StartListening( SfxBroadcaster& 
rBroadcaster, bool bPreventDup
 if (bListeningAlready && !bPreventDuplicates)
 {
 auto f = mpImpl->maCallStacks.find(  );
-SAL_WARN("svl", "previous StartListening call came from: " << 
sal_backtrace_to_string(f->second.get()));
+SAL_WARN("svl", "previous StartListening call came from: " << 
sal::backtrace_to_string(f->second.get()));
 }
 #endif
 assert(!(bListeningAlready && !bPreventDuplicates) && "duplicate listener, 
try building with DBG_UTIL to find the other insert site.");
@@ -105,7 +106,7 @@ void SfxListener::StartListening( SfxBroadcaster& 
rBroadcaster, bool bPreventDup
 rBroadcaster.AddListener(*this);
 mpImpl->maBCs.push_back(  );
 #ifdef DBG_UTIL
-mpImpl->maCallStacks.emplace( , sal_backtrace_get(10) );
+

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

2017-09-03 Thread Julien Nabet
 include/sal/backtrace.hxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 09ae0a74bb946bc64fbc76082a52064a36ee9b01
Author: Julien Nabet 
Date:   Sat Sep 2 23:58:19 2017 +0200

Fix leak BacktraceState (enable-dbgutil)

buffer is created from sal/osl/unx/backtraceapi.cxx with:
70 auto b1 = new void *[maxDepth];
71 int n = backtrace(b1, static_cast(maxDepth));
72 return std::unique_ptr(new BacktraceState{ b1, n });

and from sal/osl/w32/backtrace.cxx with:
79 auto pStack = new void *[maxDepth];
80 // 
https://msdn.microsoft.com/en-us/library/windows/desktop/bb204633.aspx
81 // "CaptureStackBackTrace function" claims that you "can capture up 
to
82 // MAXUSHORT frames", and on Windows Server 2003 and Windows XP it 
even
83 // "must be less than 63", but assume that a too large input value is
84 // clamped internally, instead of resulting in an error:
85 int nFrames = CaptureStackBackTrace( 0, 
static_cast(maxDepth), pStack, nullptr );
86
87 return std::unique_ptr(new BacktraceState{ pStack, 
nFrames });

Introduced with:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=bc9a2ba677ce3fcd46c2bbef6e8faeacb14292c1

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

diff --git a/include/sal/backtrace.hxx b/include/sal/backtrace.hxx
index 2c854e102eef..f437a3b73620 100644
--- a/include/sal/backtrace.hxx
+++ b/include/sal/backtrace.hxx
@@ -29,6 +29,7 @@
 struct BacktraceState {
 void** buffer;
 int nDepth;
+~BacktraceState() {delete[] buffer;}
 };
 
 SAL_DLLPUBLIC std::unique_ptr SAL_CALL sal_backtrace_get(
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-08-10 Thread Samuel Mehrbrodt
 include/sal/log-areas.dox|1 +
 xmlsecurity/source/helper/ooxmlsecparser.cxx |4 
 2 files changed, 5 insertions(+)

New commits:
commit c3f8727fe88e3073272f573516d5662ddcbbaa13
Author: Samuel Mehrbrodt 
Date:   Fri Aug 4 15:43:55 2017 +0200

xmlsecurity: Log unknown xml elements for ooxml

Change-Id: I0daf81ac91da1d6206282e486298d059b937bb21
Reviewed-on: https://gerrit.libreoffice.org/40819
Tested-by: Jenkins 
Reviewed-by: Samuel Mehrbrodt 

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index f6094bc1ddc3..e99a05bbfbc9 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -530,6 +530,7 @@ certain functionality.
 @li @c xmlsecurity.comp - xml security component
 @li @c xmlsecurity.dialogs - xml security dialogs
 @li @c xmlsecurity.helper
+@li @c xmlsecurity.ooxml - OOXML signature support
 @li @c xmlsecurity.pdfio - signing of existing PDF
 @li @c xmlsecurity.xmlsec - xmlsec wrapper
 @li @c xmlsecurity.xmlsec.gpg - gpg xmlsec component
diff --git a/xmlsecurity/source/helper/ooxmlsecparser.cxx 
b/xmlsecurity/source/helper/ooxmlsecparser.cxx
index 26f82b0ab47c..ed93da0fcca4 100644
--- a/xmlsecurity/source/helper/ooxmlsecparser.cxx
+++ b/xmlsecurity/source/helper/ooxmlsecparser.cxx
@@ -120,6 +120,10 @@ void SAL_CALL OOXMLSecParser::startElement(const OUString& 
rName, const uno::Ref
 m_aCertDigest.clear();
 m_bInCertDigest = true;
 }
+else
+{
+SAL_INFO("xmlsecurity.ooxml", "Unknown xml element: " << rName);
+}
 
 if (m_xNextHandler.is())
 m_xNextHandler->startElement(rName, xAttribs);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-08-10 Thread Stephan Bergmann
 include/sal/log-areas.dox |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 183b0b0b6038ec1fafb9f65024a846c90493a873
Author: Stephan Bergmann 
Date:   Thu Aug 10 11:41:15 2017 +0200

Sort list lexicographically

Change-Id: Ib52b66544cd3f0bed1742369404eced28b8b5904

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 3902e9a60117..f6094bc1ddc3 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -98,12 +98,12 @@ certain functionality.
 @section cppu
 
 @li @c cppu
+@li @c cppu.affinebridge
 @li @c cppu.log
+@li @c cppu.purpenv
 @li @c cppu.threadpool
 @li @c cppu.typelib
-@li @c cppu.purpenv
 @li @c cppu.unsafebridge
-@li @c cppu.affinebridge
 
 @section cppuhelper
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-08-09 Thread Miklos Vajna
 include/sal/types.h |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit a0e0b8372920e24672bb199e8e697fbc1cb8f5f2
Author: Miklos Vajna 
Date:   Wed Aug 9 08:55:07 2017 +0200

SAL_RETURNS_NONNULL: handle old clang not understanding returns_nonnull attr

Seen on the macOS baseline.

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

diff --git a/include/sal/types.h b/include/sal/types.h
index 52066bf40f7d..a138a90858df 100644
--- a/include/sal/types.h
+++ b/include/sal/types.h
@@ -707,7 +707,11 @@ inline char16_t const * SAL_U(wchar_t const * p)
 
 @since LibreOffice 5.5
 */
-#if defined LIBO_INTERNAL_ONLY && ((defined __GNUC__ && __GNUC__ > 4) || 
defined __clang__)
+#ifndef __has_attribute
+#define __has_attribute(x) 0
+#endif
+
+#if defined LIBO_INTERNAL_ONLY && ((defined __GNUC__ && __GNUC__ > 4) || 
(defined __clang__ && __has_attribute(returns_nonnull)))
 #define SAL_RETURNS_NONNULL  __attribute__((returns_nonnull))
 #else
 #define SAL_RETURNS_NONNULL
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/sal include/svl svl/Library_svl.mk svl/source

2017-07-15 Thread Ashod Nakashian
 include/sal/log-areas.dox|1 
 include/svl/cryptosign.hxx   |   71 +
 svl/Library_svl.mk   |   34 
 svl/source/crypto/cryptosign.cxx | 1653 +++
 4 files changed, 1759 insertions(+)

New commits:
commit 522d211764725b19b7975f500f315444601cdf6b
Author: Ashod Nakashian 
Date:   Fri Jul 14 22:21:00 2017 -0400

svl: move byte-array signing from vcl

Signing a generic byte-array can (and will be) used
by more than the existing PDF signing code, hence
the move into comphelper from vcl and ourside of
the PDF-specific logic.

Change-Id: I7257b5218c6ba37960c6a013746eb387917a23a4
Reviewed-on: https://gerrit.libreoffice.org/39717
Tested-by: Jenkins 
Reviewed-by: Ashod Nakashian 

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 63f1438d0211..cad1e42ad0a4 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -342,6 +342,7 @@ certain functionality.
 @section svl
 
 @li @c svl
+@li @c svl.crypto
 @li @c svl.items
 @li @c svl.numbers
 
diff --git a/include/svl/cryptosign.hxx b/include/svl/cryptosign.hxx
new file mode 100644
index ..db0abc9f1480
--- /dev/null
+++ b/include/svl/cryptosign.hxx
@@ -0,0 +1,71 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * 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 
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+#include "com/sun/star/uno/Reference.hxx"
+
+namespace com {
+namespace sun {
+namespace star {
+namespace security {
+class XCertificate; }
+}}}
+
+namespace svl {
+
+namespace crypto {
+
+/// Helper to cryptographically sign and verify
+/// arbitrary data blocks.
+class SVL_DLLPUBLIC Signing
+{
+public:
+
+Signing(const css::uno::Reference& 
xCertificate) :
+m_xCertificate(xCertificate)
+{
+}
+
+/// Add a range to sign.
+/// Note: for efficiency this takes a naked pointer, which must remain 
valid
+/// until this object is discarded.
+void AddDataRange(void* pData, sal_Int32 size)
+{
+m_dataBlocks.emplace_back(pData, size);
+}
+
+void SetSignTSA(const OUString& tsa) { m_aSignTSA = tsa; }
+void SetSignPassword(const OUString& password) { m_aSignPassword = 
password;; }
+
+/// Signs one or more data blocks (as a single, contiguous, array).
+/// Returns the signature (in PKCS#7 format) as string (hex).
+bool Sign(OStringBuffer& rCMSHexBuffer);
+
+private:
+/// The certificate to use for signing.
+const css::uno::Reference m_xCertificate;
+
+/// Data blocks (pointer-size pairs).
+std::vector> m_dataBlocks;
+OUString m_aSignTSA;
+OUString m_aSignPassword;
+};
+
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+
diff --git a/svl/Library_svl.mk b/svl/Library_svl.mk
index 292e7f14815d..e3969b1d90a3 100644
--- a/svl/Library_svl.mk
+++ b/svl/Library_svl.mk
@@ -21,6 +21,8 @@ $(eval $(call gb_Library_Library,svl))
 
 $(eval $(call gb_Library_use_externals,svl,\
 boost_headers \
+$(if $(filter LINUX MACOSX %BSD SOLARIS,$(OS)), \
+curl) \
 icu_headers \
 icuuc \
 mdds_headers \
@@ -46,6 +48,20 @@ $(eval $(call gb_Library_add_defs,svl,\
 -DSVL_DLLIMPLEMENTATION \
 ))
 
+ifeq ($(TLS),NSS)
+$(eval $(call gb_Library_use_externals,svl,\
+   plc4 \
+   nss3 \
+))
+else
+ifeq ($(TLS),OPENSSL)
+$(eval $(call gb_Library_use_externals,svl,\
+openssl \
+openssl_headers \
+))
+endif
+endif
+
 $(eval $(call gb_Library_use_libraries,svl,\
 basegfx \
 comphelper \
@@ -62,12 +78,30 @@ $(eval $(call gb_Library_use_libraries,svl,\
 utl \
 ))
 
+$(eval $(call gb_Library_use_system_win32_libs,svl,\
+advapi32 \
+crypt32 \
+gdi32 \
+gdiplus \
+imm32 \
+mpr \
+ole32 \
+shell32 \
+usp10 \
+uuid \
+version \
+winspool \
+setupapi \
+shlwapi \
+))
+
 $(eval $(call gb_Library_add_exception_objects,svl,\
 svl/source/config/asiancfg \
 svl/source/config/cjkoptions \
 svl/source/config/ctloptions \
 svl/source/config/itemholder2 \
 svl/source/config/languageoptions \
+svl/source/crypto/cryptosign \
 svl/source/filepicker/pickerhistory \
 svl/source/filerec/filerec \
 svl/source/items/aeitem \
diff --git a/svl/source/crypto/cryptosign.cxx b/svl/source/crypto/cryptosign.cxx
new file mode 100644
index ..0c16ba6fbd94
--- /dev/null
+++ b/svl/source/crypto/cryptosign.cxx
@@ -0,0 +1,1653 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice 

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

2017-05-30 Thread Noel Grandin
 include/sal/types.h |4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit b36120b8e1991bd4939b7d4838a4f0333c8a3016
Author: Noel Grandin 
Date:   Tue May 30 09:28:22 2017 +0200

and fix my previous commit

Change-Id: I63a22d5cf7a45d7b6fb3d1b356aa98ff954449e5

diff --git a/include/sal/types.h b/include/sal/types.h
index 053e53d87b8d..9d5f699c9794 100644
--- a/include/sal/types.h
+++ b/include/sal/types.h
@@ -697,13 +697,11 @@ inline char16_t const * SAL_U(wchar_t const * p)
 
 @since LibreOffice 5.5
 */
-#if defined LIBO_INTERNAL_ONLY
-#if (defined __GNUC__ && __GNUC__ > 4) || defined __clang__
+#if defined LIBO_INTERNAL_ONLY && ((defined __GNUC__ && __GNUC__ > 4) || 
defined __clang__)
 #define SAL_RETURNS_NONNULL  __attribute__((returns_nonnull))
 #else
 #define SAL_RETURNS_NONNULL
 #endif
-#endif
 /// @endcond
 
 #endif // INCLUDED_SAL_TYPES_H
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-05-30 Thread Noel Grandin
 include/sal/types.h |9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit cd3d9ed0ad281dfcc2b71c393e1b124ae78c4dcc
Author: Noel Grandin 
Date:   Tue May 30 09:06:51 2017 +0200

define SAL_RETURNS_NONNULL as LIBO_INTERNAL_ONLY

and improve the comment

Change-Id: I832fa0133810fee920024e7df9ff3c5c1c335582

diff --git a/include/sal/types.h b/include/sal/types.h
index b6d6730e88a5..053e53d87b8d 100644
--- a/include/sal/types.h
+++ b/include/sal/types.h
@@ -687,9 +687,9 @@ 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.
+/// @cond INTERNAL
+/** Annotate pointer-returning functions to indicate that such a pointer
+is never nullptr.
 
 Note that MSVC supports this feature via it's SAL _Ret_notnull_
 annotation, but since it's in a completely different place on
@@ -697,11 +697,14 @@ inline char16_t const * SAL_U(wchar_t const * p)
 
 @since LibreOffice 5.5
 */
+#if defined LIBO_INTERNAL_ONLY
 #if (defined __GNUC__ && __GNUC__ > 4) || defined __clang__
 #define SAL_RETURNS_NONNULL  __attribute__((returns_nonnull))
 #else
 #define SAL_RETURNS_NONNULL
 #endif
+#endif
+/// @endcond
 
 #endif // INCLUDED_SAL_TYPES_H
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-10 Thread Stephan Bergmann
 include/sal/log-areas.dox |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 40d26609efdcc7f5aaf708baccb1355e11ccf379
Author: Stephan Bergmann 
Date:   Mon Apr 10 11:12:12 2017 +0200

Keep list sorted

Change-Id: I34fd3ed006bdcecbe8b7e1f17cb379242a5eef95

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 7715f78c93e7..b0dc5ab2437f 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -203,8 +203,8 @@ certain functionality.
 
 @li @c filter.config
 @li @c filter.eps
-@li @c filter.icgm
 @li @c filter.flash
+@li @c filter.icgm
 @li @c filter.ms - escher import/export
 @li @c filter.odfflatxml
 @li @c filter.os2met
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-04 Thread Stephan Bergmann
 include/sal/log-areas.dox |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c6c37aafd2a2af62fe94d7a5b38c77055e4ad357
Author: Stephan Bergmann 
Date:   Tue Apr 4 14:35:10 2017 +0200

Keep list sorted

Change-Id: I680be319b6c2d87a8fba0e07a3b24d0a2ed478b7

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index b28bfe61132e..8a27ae7ccb60 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -474,7 +474,6 @@ certain functionality.
 @li @c sw
 @li @c sw.a11y - accessibility
 @li @c sw.core - Writer core
-@li @c sw.layout - Writer core view: document layout
 @li @c sw.createcopy
 @li @c sw.doc
 @li @c sw.docappend
@@ -483,6 +482,7 @@ certain functionality.
 @li @c sw.filter
 @li @c sw.html - Writer HTML import/export
 @li @c sw.idle
+@li @c sw.layout - Writer core view: document layout
 @li @c sw.level2
 @li @c sw.mailmerge - Writer mail merge
 @li @c sw.pageframe - debug lifecycle of SwPageFrame
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-03 Thread Michael Stahl
 include/sal/log-areas.dox  |1 +
 sw/source/core/layout/laycache.cxx |6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 282b3e8c4d45aacae57e3542b872cdbfebcc7195
Author: Michael Stahl 
Date:   Mon Apr 3 21:06:59 2017 +0200

sw: [loplugin:sallogareas]

Change-Id: I94c552e4b2ae95f57b0c667f6072664eab570042

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index d5b9934ea0a9..b28bfe61132e 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -474,6 +474,7 @@ certain functionality.
 @li @c sw
 @li @c sw.a11y - accessibility
 @li @c sw.core - Writer core
+@li @c sw.layout - Writer core view: document layout
 @li @c sw.createcopy
 @li @c sw.doc
 @li @c sw.docappend
diff --git a/sw/source/core/layout/laycache.cxx 
b/sw/source/core/layout/laycache.cxx
index 5903b7d4a4d0..4d0e4c24bd03 100644
--- a/sw/source/core/layout/laycache.cxx
+++ b/sw/source/core/layout/laycache.cxx
@@ -468,7 +468,7 @@ bool sanityCheckLayoutCache(SwLayCacheImpl const& rCache,
 auto const nBreakIndex(rCache.GetBreakIndex(nIndex));
 if (nBreakIndex < nNodeIndex || nMaxIndex <= nBreakIndex)
 {
-SAL_WARN("sw.core",
+SAL_WARN("sw.layout",
 "invalid node index in layout-cache: " << nBreakIndex);
 return false;
 }
@@ -478,7 +478,7 @@ bool sanityCheckLayoutCache(SwLayCacheImpl const& rCache,
 case SW_LAYCACHE_IO_REC_PARA:
 if (!rNodes[nBreakIndex + nStartOfContent]->IsTextNode())
 {
-SAL_WARN("sw.core",
+SAL_WARN("sw.layout",
 "invalid node of type 'P' in layout-cache");
 return false;
 }
@@ -486,7 +486,7 @@ bool sanityCheckLayoutCache(SwLayCacheImpl const& rCache,
 case SW_LAYCACHE_IO_REC_TABLE:
 if (!rNodes[nBreakIndex + nStartOfContent]->IsTableNode())
 {
-SAL_WARN("sw.core",
+SAL_WARN("sw.layout",
 "invalid node of type 'T' in layout-cache");
 return false;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/sal solenv/bin

2017-03-03 Thread Stephan Bergmann
 include/sal/types.h|   10 --
 solenv/bin/create-tags |2 +-
 2 files changed, 1 insertion(+), 11 deletions(-)

New commits:
commit 5742868ccf030b2c0f03538d030bd18bd5666bdb
Author: Stephan Bergmann 
Date:   Fri Mar 3 13:27:04 2017 +0100

[API CHANGE] Remove SAL_CONSTEXPR again

...now that LIBO_INTERNAL_ONLY always has constexpr support.

It had been added for LO 5.0 (effectively always expanding to nothing for
!LIBO_INTERNAL_ONLY), not wrapped in '#if LIBO_INTERNAL_ONLY' presumably 
because
it was assumed to be used freely in URE include files, but turned out to be 
only
used in LIBO_INTERNAL_ONLY code.  It is unlikely that any 3rd party code 
made
use of it.

Change-Id: I68970c5a2e2d7ef68ac5b79efc8dc1de54c43198

diff --git a/include/sal/types.h b/include/sal/types.h
index 9da283b..6616670 100644
--- a/include/sal/types.h
+++ b/include/sal/types.h
@@ -418,16 +418,6 @@ namespace css = ::com::sun::star;
 #define SAL_FINAL
 #endif
 
-/** C++11 "constexpr" feature.
-
-@since LibreOffice 5.0
-*/
-#if defined LIBO_INTERNAL_ONLY
-#define SAL_CONSTEXPR constexpr
-#else
-#define SAL_CONSTEXPR
-#endif
-
 #if defined LIBO_INTERNAL_ONLY
 #if defined __clang__
 #define SAL_FALLTHROUGH [[clang::fallthrough]]
diff --git a/solenv/bin/create-tags b/solenv/bin/create-tags
index 639111c..47400f5 100755
--- a/solenv/bin/create-tags
+++ b/solenv/bin/create-tags
@@ -12,7 +12,7 @@ if test "$1" = "-e"; then
 ctags=etags
 fi
 
-saloptions="-ISAL_DELETED_FUNCTION -ISAL_OVERRIDE -ISAL_FINAL -ISAL_CONSTEXPR"
+saloptions="-ISAL_DELETED_FUNCTION -ISAL_OVERRIDE -ISAL_FINAL"
 omnicppoptions="--c++-kinds=+p --fields=+iaS --extra=+q"
 
 $ctags -h "+.hdl.hrc" --langmap=c:+.hrc.src,c++:+.hdl $saloptions 
$omnicppoptions \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-02-28 Thread Stephan Bergmann
 include/sal/log-areas.dox |1 +
 1 file changed, 1 insertion(+)

New commits:
commit e6a90b3f28d948275188e7504fc9d46f0793e36f
Author: Stephan Bergmann 
Date:   Tue Feb 28 18:02:58 2017 +0100

loplugin:sallogareas

Change-Id: I9af09bc52775501c8dbf0e883f4ec3b53c397de4

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 0afd32e..c8036ab 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -273,6 +273,7 @@ certain functionality.
 
 @section io
 
+@li @c io.connector
 @li @c io.streams
 
 @section jvmfwk
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-02-11 Thread Stephan Bergmann
 include/sal/types.h |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 99839ca138d69fd30943cfb985d6cd385626402b
Author: Stephan Bergmann 
Date:   Sat Feb 11 13:05:54 2017 +0100

Remove comment that is no longer accurate/relevant

...after e16fa715c43dcdf836ce8c400b6d54eae87b627d "Handle wchar_t as native
C++11 type on windows"

Change-Id: I8005a48a43f1baba3c04c11ff52d26d756f25204

diff --git a/include/sal/types.h b/include/sal/types.h
index a2e7b12..1bf6976 100644
--- a/include/sal/types.h
+++ b/include/sal/types.h
@@ -133,8 +133,6 @@ typedef signed char sal_sChar;
 typedef unsigned char sal_uChar;
 
 #if defined(SAL_W32)
-// http://msdn.microsoft.com/en-us/library/s3f49ktz%28v=vs.80%29.aspx
-// "By default wchar_t is a typedef for unsigned short."
 typedef wchar_t sal_Unicode;
 #else
 #define SAL_UNICODE_NOTEQUAL_WCHAR_T
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-02-09 Thread Stephan Bergmann
 include/sal/log.hxx |6 +++---
 sal/osl/all/log.cxx |   28 +++-
 2 files changed, 10 insertions(+), 24 deletions(-)

New commits:
commit c697ae306cd4eaa8144ed93fc908e50d5934e249
Author: Stephan Bergmann 
Date:   Thu Feb 9 17:05:22 2017 +0100

Some clean up

No more need to call sal_detail_log_report from sal_detail_log, now that it 
is
called from SAL_DETAIL_LOG_STREAM since 
b3a11c8f4f307597c9c6e7e61ee93e794873
"tdf#91872: Make SAL_INFO and friends more efficient".

Change-Id: Idb6cf7a4814abe29d5ba68591f39b4279267bc9b

diff --git a/include/sal/log.hxx b/include/sal/log.hxx
index a21f80b..c096d52 100644
--- a/include/sal/log.hxx
+++ b/include/sal/log.hxx
@@ -27,11 +27,11 @@
 /// @cond INTERNAL
 
 extern "C" SAL_DLLPUBLIC void SAL_CALL sal_detail_log(
-enum sal_detail_LogLevel level, char const * area, char const * where,
+sal_detail_LogLevel level, char const * area, char const * where,
 char const * message, sal_uInt32 backtraceDepth);
 
-extern "C" SAL_DLLPUBLIC int SAL_CALL sal_detail_log_report(
-enum sal_detail_LogLevel level, char const * area);
+extern "C" SAL_DLLPUBLIC sal_Bool SAL_CALL sal_detail_log_report(
+sal_detail_LogLevel level, char const * area);
 
 namespace sal { namespace detail {
 
diff --git a/sal/osl/all/log.cxx b/sal/osl/all/log.cxx
index 774e7e8..0e15aab 100644
--- a/sal/osl/all/log.cxx
+++ b/sal/osl/all/log.cxx
@@ -186,11 +186,9 @@ void maybeOutputTimestamp(std::ostringstream ) {
 
 #endif
 
-bool isDebug(sal_detail_LogLevel level) {
-return level == SAL_DETAIL_LOG_LEVEL_DEBUG;
 }
 
-void log(
+void sal_detail_log(
 sal_detail_LogLevel level, char const * area, char const * where,
 char const * message, sal_uInt32 backtraceDepth)
 {
@@ -202,13 +200,13 @@ void log(
 maybeOutputTimestamp(s);
 s << toString(level) << ':';
 }
-if (!isDebug(level)) {
+if (level != SAL_DETAIL_LOG_LEVEL_DEBUG) {
 s << area << ':';
 }
 s << OSL_DETAIL_GETPID << ':';
 #endif
 s << osl::Thread::getCurrentIdentifier() << ':';
-if (isDebug(level)) {
+if (level == SAL_DETAIL_LOG_LEVEL_DEBUG) {
 s << ' ';
 } else {
 const size_t nStrLen(std::strlen(SRCDIR "/"));
@@ -216,13 +214,11 @@ void log(
   + (std::strncmp(where, SRCDIR "/", nStrLen) == 0
  ? nStrLen : 0));
 }
-
 s << message;
 if (backtraceDepth != 0) {
 s << " at:\n" << osl::detail::backtraceAsString(backtraceDepth);
 }
 s << '\n';
-
 #if defined ANDROID
 int android_log_level;
 switch (level) {
@@ -276,17 +272,6 @@ void log(
 #endif
 }
 
-}
-
-void sal_detail_log(
-sal_detail_LogLevel level, char const * area, char const * where,
-char const * message, sal_uInt32 backtraceDepth)
-{
-if (sal_detail_log_report(level, area)) {
-log(level, area, where, message, backtraceDepth);
-}
-}
-
 void sal_detail_logFormat(
 sal_detail_LogLevel level, char const * area, char const * where,
 char const * format, ...)
@@ -302,14 +287,15 @@ void sal_detail_logFormat(
 } else if (n >= len) {
 std::strcpy(buf + len - 1, "...");
 }
-log(level, area, where, buf, 0);
+sal_detail_log(level, area, where, buf, 0);
 va_end(args);
 }
 }
 
-int sal_detail_log_report(enum sal_detail_LogLevel level, char const * area) {
-if (isDebug(level))
+sal_Bool sal_detail_log_report(sal_detail_LogLevel level, char const * area) {
+if (level == SAL_DETAIL_LOG_LEVEL_DEBUG) {
 return true;
+}
 assert(area != nullptr);
 char const * env = getEnvironmentVariable();
 if (env == nullptr) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-02-09 Thread Stephan Bergmann
 include/sal/log.hxx   |   50 ++
 sal/inc/backtraceasstring.hxx |3 +-
 sal/osl/all/log.cxx   |   29 +---
 sal/osl/unx/backtraceapi.cxx  |   17 --
 sal/osl/w32/backtrace.cxx |   23 +++
 sal/util/sal.map  |1 
 6 files changed, 59 insertions(+), 64 deletions(-)

New commits:
commit b6a69585b00867005820c1dd94e10e0e6b545e2a
Author: Stephan Bergmann 
Date:   Thu Feb 9 13:19:11 2017 +0100

Fold sal_detail_log_backtrace into sal_detail_log

...the latter is LO-privately exported from sal, so it should be OK to add 
one
more parameter to it.

Change-Id: If6bf3458433aac2cc8b4e0cbd1602306051a777b
Reviewed-on: https://gerrit.libreoffice.org/34080
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/include/sal/log.hxx b/include/sal/log.hxx
index b383fd0..a21f80b 100644
--- a/include/sal/log.hxx
+++ b/include/sal/log.hxx
@@ -28,20 +28,16 @@
 
 extern "C" SAL_DLLPUBLIC void SAL_CALL sal_detail_log(
 enum sal_detail_LogLevel level, char const * area, char const * where,
-char const * message);
-
-extern "C" SAL_DLLPUBLIC void SAL_CALL sal_detail_log_backtrace(
-enum sal_detail_LogLevel level, char const * area, char const * where,
-char const * message, int maxNoStackFramesToDisplay);
+char const * message, sal_uInt32 backtraceDepth);
 
 extern "C" SAL_DLLPUBLIC int SAL_CALL sal_detail_log_report(
 enum sal_detail_LogLevel level, char const * area);
 
 namespace sal { namespace detail {
 
-inline void SAL_CALL log(
+inline void log(
 sal_detail_LogLevel level, char const * area, char const * where,
-std::ostringstream const & stream)
+std::ostringstream const & stream, sal_uInt32 backtraceDepth)
 {
 // An alternative would be to have sal_detail_log take a std::ostringstream
 // pointer (via a C void pointer); the advantage would be smaller client
@@ -51,15 +47,7 @@ inline void SAL_CALL log(
 // on the C++ ABI; as a compromise, the ".str().c_str()" part has been 
moved
 // to this inline function so that it is potentially only emitted once per
 // dynamic library:
-sal_detail_log(level, area, where, stream.str().c_str());
-}
-
-inline void SAL_CALL log_backtrace(
-sal_detail_LogLevel level, char const * area, char const * where,
-std::ostringstream const & stream, int maxNoStackFramesToDisplay)
-{
-sal_detail_log_backtrace(
-level, area, where, stream.str().c_str(), maxNoStackFramesToDisplay);
+sal_detail_log(level, area, where, stream.str().c_str(), backtraceDepth);
 }
 
 // Special handling of the common case where the message consists of just a
@@ -134,12 +122,13 @@ inline char const * unwrapStream(SAL_UNUSED_PARAMETER 
StreamIgnore const &) {
 ::sal_detail_log( \
 (level), (area), (where), \
 ::sal::detail::unwrapStream( \
-::sal::detail::StreamStart() << stream)); \
+::sal::detail::StreamStart() << stream), \
+0); \
 } else { \
 ::std::ostringstream sal_detail_stream; \
 sal_detail_stream << stream; \
 ::sal::detail::log( \
-(level), (area), (where), sal_detail_stream); \
+(level), (area), (where), sal_detail_stream, 0); \
 } \
 } \
 } while (false)
@@ -351,28 +340,33 @@ inline char const * unwrapStream(SAL_UNUSED_PARAMETER 
StreamIgnore const &) {
 SAL_LOG_TRUE, ::SAL_DETAIL_LOG_LEVEL_DEBUG, NULL, NULL, stream)
 
 /**
-  Produce temporary debugging output from stream along with a
-  stack trace of the calling location.  This macro is meant to
-  be used only while working on code and should never exist
-  in production code.
+  Produce temporary debugging output from stream along with a backtrace of the
+  calling location.
+
+  This macro is meant to be used only while working on code and should never
+  exist in production code.
+
+  @param backtraceDepth a sal_uInt32 value indicating the maximum backtrace
+  depth; zero means no backtrace
 
   See @ref sal_log "basic logging functionality" for details.
 */
-#define SAL_DEBUG_BACKTRACE(stream, maxNoStackFramesToDisplay) \
+#define SAL_DEBUG_BACKTRACE(stream, backtraceDepth) \
 do { \
-if (sizeof ::sal::detail::getResult(::sal::detail::StreamStart() << 
stream) == 1) \
+if (sizeof ::sal::detail::getResult( \
+::sal::detail::StreamStart() << stream) == 1) \
 { \
-::sal_detail_log_backtrace( \
+::sal_detail_log( \
 ::SAL_DETAIL_LOG_LEVEL_DEBUG, NULL, NULL, \
 ::sal::detail::unwrapStream( \
 ::sal::detail::StreamStart() << stream), \
-maxNoStackFramesToDisplay); \

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

2017-02-03 Thread Arnold Dumas
 include/sal/log.hxx |5 +
 sal/osl/all/log.cxx |  162 ++--
 sal/util/sal.map|1 
 3 files changed, 86 insertions(+), 82 deletions(-)

New commits:
commit b3a11c8f4f307597c9c6e7e61ee93e794873
Author: Arnold Dumas 
Date:   Thu Feb 2 20:50:44 2017 +0100

tdf#91872: Make SAL_INFO and friends more efficient

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

diff --git a/include/sal/log.hxx b/include/sal/log.hxx
index 4438ec5..ea070dd 100644
--- a/include/sal/log.hxx
+++ b/include/sal/log.hxx
@@ -34,6 +34,9 @@ extern "C" SAL_DLLPUBLIC void SAL_CALL 
sal_detail_log_backtrace(
 enum sal_detail_LogLevel level, char const * area, char const * where,
 char const * message, int maxNoStackFramesToDisplay);
 
+extern "C" SAL_DLLPUBLIC int SAL_CALL sal_detail_log_report(
+enum sal_detail_LogLevel level, char const * area);
+
 namespace sal { namespace detail {
 
 inline void SAL_CALL log(
@@ -116,7 +119,7 @@ inline char const * unwrapStream(SAL_UNUSED_PARAMETER 
StreamIgnore const &) {
 
 #define SAL_DETAIL_LOG_STREAM(condition, level, area, where, stream) \
 do { \
-if (condition) { \
+if ((condition) && sal_detail_log_report(level, area)) { \
 if (sizeof ::sal::detail::getResult( \
 ::sal::detail::StreamStart() << stream) == 1) \
 { \
diff --git a/sal/osl/all/log.cxx b/sal/osl/all/log.cxx
index 7245a51..5e4497f 100644
--- a/sal/osl/all/log.cxx
+++ b/sal/osl/all/log.cxx
@@ -190,84 +190,6 @@ bool isDebug(sal_detail_LogLevel level) {
 return level == SAL_DETAIL_LOG_LEVEL_DEBUG;
 }
 
-bool report(sal_detail_LogLevel level, char const * area) {
-if (isDebug(level))
-return true;
-assert(area != nullptr);
-char const * env = getEnvironmentVariable();
-if (env == nullptr) {
-env = "+WARN";
-}
-std::size_t areaLen = std::strlen(area);
-enum Sense { POSITIVE = 0, NEGATIVE = 1 };
-std::size_t senseLen[2] = { 0, 1 };
-// initial senseLen[POSITIVE] < senseLen[NEGATIVE], so that if there 
are
-// no matching switches at all, the result will be negative (and
-// initializing with 1 is safe as the length of a valid switch, even
-// without the "+"/"-" prefix, will always be > 1)
-bool seenWarn = false;
-for (char const * p = env;;) {
-Sense sense;
-switch (*p++) {
-case '\0':
-if (level == SAL_DETAIL_LOG_LEVEL_WARN && !seenWarn)
-return report(SAL_DETAIL_LOG_LEVEL_INFO, area);
-return senseLen[POSITIVE] >= senseLen[NEGATIVE];
-// if a specific item is both positive and negative
-// (senseLen[POSITIVE] == senseLen[NEGATIVE]), default to
-// positive
-case '+':
-sense = POSITIVE;
-break;
-case '-':
-sense = NEGATIVE;
-break;
-default:
-return true; // upon an illegal SAL_LOG value, enable everything
-}
-char const * p1 = p;
-while (*p1 != '.' && *p1 != '+' && *p1 != '-' && *p1 != '\0') {
-++p1;
-}
-bool match;
-if (equalStrings(p, p1 - p, RTL_CONSTASCII_STRINGPARAM("INFO"))) {
-match = level == SAL_DETAIL_LOG_LEVEL_INFO;
-} else if (equalStrings(p, p1 - p, RTL_CONSTASCII_STRINGPARAM("WARN")))
-{
-match = level == SAL_DETAIL_LOG_LEVEL_WARN;
-seenWarn = true;
-} else if (equalStrings(p, p1 - p, 
RTL_CONSTASCII_STRINGPARAM("TIMESTAMP")) ||
-   equalStrings(p, p1 - p, 
RTL_CONSTASCII_STRINGPARAM("RELATIVETIMER")))
-{
-// handled later
-match = false;
-} else {
-return true;
-// upon an illegal SAL_LOG value, everything is considered
-// positive
-}
-char const * p2 = p1;
-while (*p2 != '+' && *p2 != '-' && *p2 != '\0') {
-++p2;
-}
-if (match) {
-if (*p1 == '.') {
-++p1;
-std::size_t n = p2 - p1;
-if ((n == areaLen && equalStrings(p1, n, area, areaLen))
-|| (n < areaLen && area[n] == '.'
-&& equalStrings(p1, n, area, n)))
-{
-senseLen[sense] = p2 - p;
-}
-} else {
-senseLen[sense] = p1 - p;
-}
-}
-p = p2;
-}
-}
-
 void log(
 sal_detail_LogLevel level, char const * area, char const * where,
 char const * message)
@@ -367,7 +289,7 @@ void sal_detail_log(
 sal_detail_LogLevel level, char const * area, char const * where,
 char const * 

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

2017-01-27 Thread Stephan Bergmann
 include/sal/types.h |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 9ee0f108ca104ec76d2d73220686fb10c89e78e8
Author: Stephan Bergmann 
Date:   Fri Jan 27 18:04:53 2017 +0100

GCC 7 supports [[fallthrough]]

Change-Id: Ic6fb995a76a30b60b597005e714de03d43c36a7c

diff --git a/include/sal/types.h b/include/sal/types.h
index 3fc2be3..0aee648 100644
--- a/include/sal/types.h
+++ b/include/sal/types.h
@@ -448,6 +448,8 @@ namespace css = ::com::sun::star;
 #if defined LIBO_INTERNAL_ONLY
 #if defined __clang__
 #define SAL_FALLTHROUGH [[clang::fallthrough]]
+#elif defined __GNUC__ && __GNUC__ >= 7
+#define SAL_FALLTHROUGH [[fallthrough]]
 #else
 #define SAL_FALLTHROUGH
 #endif
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-01-09 Thread Noel Grandin
 include/sal/detail/log.h |1 -
 include/sal/log.hxx  |   24 +---
 sal/inc/misc.hxx |2 +-
 sal/osl/all/log.cxx  |   29 -
 sal/osl/unx/backtraceapi.cxx |2 +-
 sal/osl/w32/backtrace.cxx|6 +++---
 sal/util/sal.map |5 +
 7 files changed, 51 insertions(+), 18 deletions(-)

New commits:
commit 56d071c10ca8016848f1f059aa3eb197fe928844
Author: Noel Grandin 
Date:   Thu Dec 8 11:22:37 2016 +0200

rename SAL_DEBUG_TRACE to SAL_DEBUG_BACKTRACE

since "trace" is such a generic term, this makes it easier to actually find 
the feature when you need it.

And add feature to limit stack depth of the reported backtrace.

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

diff --git a/include/sal/detail/log.h b/include/sal/detail/log.h
index ab97185..11ece36 100644
--- a/include/sal/detail/log.h
+++ b/include/sal/detail/log.h
@@ -52,7 +52,6 @@ extern "C" {
 
 enum sal_detail_LogLevel {
 SAL_DETAIL_LOG_LEVEL_INFO, SAL_DETAIL_LOG_LEVEL_WARN,
-SAL_DETAIL_LOG_LEVEL_DEBUG_TRACE = SAL_MAX_ENUM - 1,
 SAL_DETAIL_LOG_LEVEL_DEBUG = SAL_MAX_ENUM
 };
 
diff --git a/include/sal/log.hxx b/include/sal/log.hxx
index 8b4ef0a..4438ec5 100644
--- a/include/sal/log.hxx
+++ b/include/sal/log.hxx
@@ -30,6 +30,10 @@ extern "C" SAL_DLLPUBLIC void SAL_CALL sal_detail_log(
 enum sal_detail_LogLevel level, char const * area, char const * where,
 char const * message);
 
+extern "C" SAL_DLLPUBLIC void SAL_CALL sal_detail_log_backtrace(
+enum sal_detail_LogLevel level, char const * area, char const * where,
+char const * message, int maxNoStackFramesToDisplay);
+
 namespace sal { namespace detail {
 
 inline void SAL_CALL log(
@@ -343,9 +347,23 @@ inline char const * unwrapStream(SAL_UNUSED_PARAMETER 
StreamIgnore const &) {
 
   See @ref sal_log "basic logging functionality" for details.
 */
-#define SAL_DEBUG_TRACE(stream) \
-SAL_DETAIL_LOG_STREAM( \
-SAL_LOG_TRUE, ::SAL_DETAIL_LOG_LEVEL_DEBUG_TRACE, NULL, NULL, stream)
+#define SAL_DEBUG_BACKTRACE(stream, maxNoStackFramesToDisplay) \
+do { \
+if (sizeof ::sal::detail::getResult(::sal::detail::StreamStart() << 
stream) == 1) \
+{ \
+::sal_detail_log_backtrace( \
+::SAL_DETAIL_LOG_LEVEL_DEBUG, NULL, NULL, \
+::sal::detail::unwrapStream( \
+::sal::detail::StreamStart() << stream)); \
+} else { \
+::std::ostringstream sal_detail_stream; \
+sal_detail_stream << stream; \
+::sal::detail::log( \
+::SAL_DETAIL_LOG_LEVEL_DEBUG, NULL, NULL, sal_detail_stream); \
+} \
+} while (false)
+
+
 
 #endif
 
diff --git a/sal/inc/misc.hxx b/sal/inc/misc.hxx
index b93868e..440c00c 100644
--- a/sal/inc/misc.hxx
+++ b/sal/inc/misc.hxx
@@ -12,7 +12,7 @@
 #include 
 
 /// Build a debugging backtrace from current PC location.
-rtl_uString *osl_backtraceAsString(void);
+rtl_uString *osl_backtraceAsString(int maxNoStackFramesToDisplay);
 
 #endif // INCLUDED_SAL_INC_INTERNAL_MISC_H
 
diff --git a/sal/osl/all/log.cxx b/sal/osl/all/log.cxx
index 23f45cd..7245a51 100644
--- a/sal/osl/all/log.cxx
+++ b/sal/osl/all/log.cxx
@@ -68,7 +68,6 @@ char const * toString(sal_detail_LogLevel level) {
 case SAL_DETAIL_LOG_LEVEL_WARN:
 return "warn";
 case SAL_DETAIL_LOG_LEVEL_DEBUG:
-case SAL_DETAIL_LOG_LEVEL_DEBUG_TRACE:
 return "debug";
 default:
 assert(false); // this cannot happen
@@ -188,8 +187,7 @@ void maybeOutputTimestamp(std::ostringstream ) {
 #endif
 
 bool isDebug(sal_detail_LogLevel level) {
-return level == SAL_DETAIL_LOG_LEVEL_DEBUG ||
-level == SAL_DETAIL_LOG_LEVEL_DEBUG_TRACE;
+return level == SAL_DETAIL_LOG_LEVEL_DEBUG;
 }
 
 bool report(sal_detail_LogLevel level, char const * area) {
@@ -298,10 +296,6 @@ void log(
 }
 
 s << message;
-if (level == SAL_DETAIL_LOG_LEVEL_DEBUG_TRACE) {
-s << " at:\n";
-s << OUString(osl_backtraceAsString(), SAL_NO_ACQUIRE);
-}
 s << '\n';
 
 #if defined ANDROID
@@ -314,7 +308,6 @@ void log(
 android_log_level = ANDROID_LOG_WARN;
 break;
 case SAL_DETAIL_LOG_LEVEL_DEBUG:
-case SAL_DETAIL_LOG_LEVEL_DEBUG_TRACE:
 android_log_level = ANDROID_LOG_DEBUG;
 break;
 default:
@@ -336,7 +329,6 @@ void log(
 prio = LOG_WARNING;
 break;
 case SAL_DETAIL_LOG_LEVEL_DEBUG:
-case SAL_DETAIL_LOG_LEVEL_DEBUG_TRACE:
 prio = LOG_DEBUG;
 break;
 default:
@@ -359,6 +351,16 @@ void log(
 #endif
 }
 
+void log_backtrace(
+sal_detail_LogLevel level, char const * area, 

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

2016-12-20 Thread Takeshi Abe
 include/sal/macros.h  |4 
 vcl/source/gdi/gdimtf.cxx |5 +++--
 2 files changed, 3 insertions(+), 6 deletions(-)

New commits:
commit b55c205460fe7e7b133e179cd567764df7ac3508
Author: Takeshi Abe 
Date:   Tue Dec 20 20:39:37 2016 +0900

[API CHANGE] Retire SAL_ABS

which had served since d441fa1f8cc0a17a2bc166bf2f2a44f76b83a773;
we now have polymorhpic std::abs.

Change-Id: Ibe48ac51508f7d9f5a44d712550237db7f553df3
Reviewed-on: https://gerrit.libreoffice.org/32225
Reviewed-by: Stephan Bergmann 
Tested-by: Stephan Bergmann 

diff --git a/include/sal/macros.h b/include/sal/macros.h
index e5d2338..2e5a4b9 100644
--- a/include/sal/macros.h
+++ b/include/sal/macros.h
@@ -52,10 +52,6 @@
 #define SAL_BOUND(x,l,h)((x) <= (l) ? (l) : ((x) >= (h) ? (h) : 
(x)))
 #endif
 
-#ifndef SAL_ABS
-#define SAL_ABS(a)  (((a) < 0) ? (-(a)) : (a))
-#endif
-
 #ifndef SAL_STRINGIFY
 #   define SAL_STRINGIFY_ARG(x) #x
 #   define SAL_STRINGIFY(x) SAL_STRINGIFY_ARG(x)
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index 304ce21..e70f4d22 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -18,6 +18,7 @@
  */
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -611,7 +612,7 @@ bool GDIMetaFile::Mirror( BmpMirrorFlags nMirrorFlags )
 
 if( nMirrorFlags & BmpMirrorFlags::Horizontal )
 {
-nMoveX = SAL_ABS( aOldPrefSize.Width() ) - 1;
+nMoveX = std::abs( aOldPrefSize.Width() ) - 1;
 fScaleX = -1.0;
 }
 else
@@ -622,7 +623,7 @@ bool GDIMetaFile::Mirror( BmpMirrorFlags nMirrorFlags )
 
 if( nMirrorFlags & BmpMirrorFlags::Vertical )
 {
-nMoveY = SAL_ABS( aOldPrefSize.Height() ) - 1;
+nMoveY = std::abs( aOldPrefSize.Height() ) - 1;
 fScaleY = -1.0;
 }
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-12-14 Thread Stephan Bergmann
 include/sal/log-areas.dox  |1 
 vcl/inc/textlineinfo.hxx   |5 
 vcl/source/outdev/font.cxx |6 -
 vcl/source/outdev/text.cxx |   53 -
 4 files changed, 65 deletions(-)

New commits:
commit afa4a054596e0e850f8886f196e6bdd25bfc0e33
Author: Stephan Bergmann 
Date:   Wed Dec 14 11:33:28 2016 +0100

Remove the sal.rtl.xub SAL_INFOs

...that were apparently meant to flag cases where conversion from old tools
strings to rtl strings was done wrongly.  But that flagging is probably of 
no
use: SAL_INFOs are usually disabled, so won't be noticed; and SAL_WARN or 
assert
would not be acceptable, as cases like 'nLen == 0x0' can legitimately
happen with long strings.  I did a successful 'make check' with these 
SAL_INFOs
temporarily turned into assert, so there seems to be at least no gross
conversion error remaining.

Change-Id: I57f11db9119fb12555e3bfef17c077ee5eef3844

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index c343151e..5175459 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -28,7 +28,6 @@ certain functionality.
 @li @c sal.osl.mutex
 @li @c sal.osl.pipe
 @li @c sal.rtl - SAL RTL library
-@li @c sal.rtl.xub - SAL RTL warnings related to possible String->OUString 
conversion issues.
 @li @c sal.textenc - the textencoding SAL library
 
 @section basctl
diff --git a/vcl/inc/textlineinfo.hxx b/vcl/inc/textlineinfo.hxx
index a14d774..519aa48 100644
--- a/vcl/inc/textlineinfo.hxx
+++ b/vcl/inc/textlineinfo.hxx
@@ -30,11 +30,6 @@ private:
 public:
ImplTextLineInfo( long nWidth, sal_Int32 nIndex, sal_Int32 nLen )
{
-   if(nIndex == -1 || nIndex == 0x0 || nLen == -1 || nLen == 0x0)
-   {
-SAL_INFO("sal.rtl.xub",
- "ImplTextLine Info Suspicious arguments nIndex:" << 
nIndex << " nLen:" << nLen);
-   }
mnWidth = nWidth;
mnIndex = nIndex;
mnLen   = nLen;
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index fe54a3d..fe5e49c 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -1479,12 +1479,6 @@ bool OutputDevice::GetGlyphBoundRects( const Point& 
rOrigin, const OUString& rSt
 
 rVector.clear();
 
-if(nLen == 0x0)
-{
-SAL_INFO("sal.rtl.xub",
- "GetGlyphBoundRects Suspicious arguments nLen:" << nLen);
-}
-
 if( nIndex >= rStr.getLength() )
 return false;
 
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 74ce12f..a3f3d83 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -806,11 +806,6 @@ void OutputDevice::DrawText( const Point& rStartPt, const 
OUString& rStr,
 {
 assert(!is_double_buffered_window());
 
-if(nLen == 0x0)
-{
-SAL_INFO("sal.rtl.xub",
- "DrawText Suspicious arguments nLen:" << nLen);
-}
 if( (nLen < 0) || (nIndex + nLen >= rStr.getLength()))
 {
 nLen = rStr.getLength() - nIndex;
@@ -929,11 +924,6 @@ void OutputDevice::DrawTextArray( const Point& rStartPt, 
const OUString& rStr,
 {
 assert(!is_double_buffered_window());
 
-if(nLen == 0x0)
-{
-SAL_INFO("sal.rtl.xub",
- "DrawTextArray Suspicious arguments nLen:" << nLen);
-}
 if( nLen < 0 || nIndex + nLen >= rStr.getLength() )
 {
 nLen = rStr.getLength() - nIndex;
@@ -965,12 +955,6 @@ long OutputDevice::GetTextArray( const OUString& rStr, 
long* pDXAry,
  sal_Int32 nIndex, sal_Int32 nLen,
  vcl::TextLayoutCache const*const 
pLayoutCache) const
 {
-if(nLen == 0x0)
-{
-SAL_INFO("sal.rtl.xub",
- "GetTextArray Suspicious arguments nLen:" << nLen);
-}
-
 if( nIndex >= rStr.getLength() )
 return 0; // TODO: this looks like a buggy caller?
 
@@ -1137,11 +1121,6 @@ void OutputDevice::DrawStretchText( const Point& 
rStartPt, sal_uLong nWidth,
 {
 assert(!is_double_buffered_window());
 
-if(nIndex < 0 || nIndex == 0x0 || nLen == 0x0)
-{
-SAL_INFO("sal.rtl.xub",
- "DrawStretchText Suspicious arguments nIndex:" << nIndex << " 
nLen:" << nLen);
-}
 if( (nLen < 0) || (nIndex + nLen >= rStr.getLength()))
 {
 nLen = rStr.getLength() - nIndex;
@@ -2101,11 +2080,6 @@ void OutputDevice::DrawCtrlText( const Point& rPos, 
const OUString& rStr,
 {
 assert(!is_double_buffered_window());
 
-if(nLen == 0x0)
-{
-SAL_INFO("sal.rtl.xub",
- "DrawCtrlText Suspicious arguments nLen:" << nLen);
-}
 if( (nLen < 0) || (nIndex + nLen >= rStr.getLength()))
 {
 nLen = rStr.getLength() - nIndex;
@@ -2314,11 +2288,6 @@ OUString OutputDevice::GetNonMnemonicString( const 
OUString& rStr, sal_Int32& rM
 SystemTextLayoutData 

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

2016-12-13 Thread Stephan Bergmann
 include/sal/log-areas.dox |1 -
 sal/osl/unx/process.cxx   |   16 
 sal/osl/unx/signal.cxx|2 +-
 sal/osl/w32/profile.cxx   |   30 +++---
 sal/osl/w32/socket.cxx|2 +-
 5 files changed, 25 insertions(+), 26 deletions(-)

New commits:
commit 58fc735175c37ac9a31578481b8173054fb49f63
Author: Stephan Bergmann 
Date:   Tue Dec 13 11:03:55 2016 +0100

Reuse existing sal.osl log area

Change-Id: Ib1fc80c79355322489b7ebd37cb6614ec67a

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index f812fc8..c343151e 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -20,7 +20,6 @@ certain functionality.
 
 @section SAL
 
-@li @c sal
 @li @c sal.bootstrap - SAL bootstrap
 @li @c sal.debug - SAL debugging functionality
 @li @c sal.file
diff --git a/sal/osl/unx/process.cxx b/sal/osl/unx/process.cxx
index b988798..21b24d3 100644
--- a/sal/osl/unx/process.cxx
+++ b/sal/osl/unx/process.cxx
@@ -181,7 +181,7 @@ static void ChildStatusProc(void *pData)
 OSL_ASSERT(geteuid() == 0); /* must be root */
 
 if (! INIT_GROUPS(data.m_name, data.m_gid) || (setuid(data.m_uid) 
!= 0))
-SAL_WARN("sal", "Failed to change uid and guid, errno=" << 
errno << " (" << strerror(errno) << ")" );
+SAL_WARN("sal.osl", "Failed to change uid and guid, errno=" << 
errno << " (" << strerror(errno) << ")" );
 
 const rtl::OUString envVar("HOME");
 osl_clearEnvironment(envVar.pData);
@@ -205,7 +205,7 @@ static void ChildStatusProc(void *pData)
 }
 }
 
-SAL_INFO("sal", "ChildStatusProc : starting " << 
data.m_pszArgs[0]);
+SAL_INFO("sal.osl", "ChildStatusProc : starting " << 
data.m_pszArgs[0]);
 
 /* Connect std IO to pipe ends */
 
@@ -243,14 +243,14 @@ static void ChildStatusProc(void *pData)
 execv(data.m_pszArgs[0], const_cast(data.m_pszArgs));
 }
 
-SAL_WARN("sal", "Failed to exec, errno=" << errno << " (" << 
strerror(errno) << ")");
+SAL_WARN("sal.osl", "Failed to exec, errno=" << errno << " (" << 
strerror(errno) << ")");
 
-SAL_WARN("sal", "ChildStatusProc : starting '" << data.m_pszArgs[0] << 
"' failed");
+SAL_WARN("sal.osl", "ChildStatusProc : starting '" << 
data.m_pszArgs[0] << "' failed");
 
 /* if we reach here, something went wrong */
 errno_copy = errno;
 if ( !safeWrite(channel[1], _copy, sizeof(errno_copy)) )
-SAL_WARN("sal", "sendFdPipe : sending failed (" << strerror(errno) 
<< ")");
+SAL_WARN("sal.osl", "sendFdPipe : sending failed (" << 
strerror(errno) << ")");
 
 if ( channel[1] != -1 )
 close(channel[1]);
@@ -309,7 +309,7 @@ static void ChildStatusProc(void *pData)
 
 if ( child_pid < 0)
 {
-SAL_WARN("sal", "Failed to wait for child process, errno=" << 
errno << " (" << strerror(errno) << ")");
+SAL_WARN("sal.osl", "Failed to wait for child process, errno=" 
<< errno << " (" << strerror(errno) << ")");
 
 /*
 We got an other error than EINTR. Anyway we have to wake up the
@@ -349,8 +349,8 @@ static void ChildStatusProc(void *pData)
 }
 else
 {
-SAL_WARN("sal", "ChildStatusProc : starting '" << 
data.m_pszArgs[0] << "' failed");
-SAL_WARN("sal", "Failed to launch child process, child reports 
errno=" << status << " (" << strerror(status) << ")");
+SAL_WARN("sal.osl", "ChildStatusProc : starting '" << 
data.m_pszArgs[0] << "' failed");
+SAL_WARN("sal.osl", "Failed to launch child process, child reports 
errno=" << status << " (" << strerror(status) << ")");
 
 /* Close pipe ends */
 if ( pdata->m_pInputWrite )
diff --git a/sal/osl/unx/signal.cxx b/sal/osl/unx/signal.cxx
index 69242d2..3892818 100644
--- a/sal/osl/unx/signal.cxx
+++ b/sal/osl/unx/signal.cxx
@@ -256,7 +256,7 @@ bool onInitSignal()
 if (sigemptyset() < 0 ||
 pthread_sigmask(SIG_SETMASK, , nullptr) < 0)
 {
-SAL_WARN("sal", "sigemptyset or pthread_sigmask failed");
+SAL_WARN("sal.osl", "sigemptyset or pthread_sigmask failed");
 }
 
 return true;
diff --git a/sal/osl/w32/profile.cxx b/sal/osl/w32/profile.cxx
index 6928c61..86592b0 100644
--- a/sal/osl/w32/profile.cxx
+++ b/sal/osl/w32/profile.cxx
@@ -191,23 +191,23 @@ oslProfile SAL_CALL osl_openProfile(rtl_uString 
*strProfileName, sal_uInt32 Flag
 
 if ( Flags == osl_Profile_DEFAULT )
 {
-SAL_INFO("sal", "with osl_Profile_DEFAULT");
+SAL_INFO("sal.osl", "with osl_Profile_DEFAULT");
 }
 if ( Flags & osl_Profile_SYSTEM )
 {
-SAL_INFO("sal", "with osl_Profile_SYSTEM");
+SAL_INFO("sal.osl", "with osl_Profile_SYSTEM");
 }
 if ( Flags & 

[Libreoffice-commits] core.git: include/sal sdext/source sd/source

2016-12-12 Thread Noel Grandin
 include/sal/log-areas.dox   |1 
 sd/source/filter/eppt/pptx-epptooxml.cxx|2 
 sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx   |   13 -
 sd/source/ui/accessibility/AccessibleOutlineView.cxx|9 ---
 sd/source/ui/accessibility/AccessiblePageShape.cxx  |7 --
 sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx  |2 
 sd/source/ui/accessibility/AccessibleSlideSorterView.cxx|2 
 sd/source/ui/docshell/docshel4.cxx  |2 
 sd/source/ui/framework/configuration/ConfigurationUpdater.cxx   |2 
 sd/source/ui/framework/configuration/ResourceFactoryManager.cxx |4 -
 sd/source/ui/framework/factories/ChildWindowPane.cxx|5 --
 sd/source/ui/framework/module/ModuleController.cxx  |8 +--
 sd/source/ui/sidebar/DocumentHelper.cxx |4 -
 sd/source/ui/sidebar/MasterPageObserver.cxx |   20 
 sd/source/ui/sidebar/PanelBase.cxx  |3 -
 sd/source/ui/slideshow/showwin.cxx  |2 
 sd/source/ui/slidesorter/model/SlideSorterModel.cxx |1 
 sd/source/ui/slidesorter/view/SlideSorterView.cxx   |4 -
 sd/source/ui/tools/ConfigurationAccess.cxx  |4 -
 sd/source/ui/tools/EventMultiplexer.cxx |8 +--
 sd/source/ui/unoidl/DrawController.cxx  |2 
 sd/source/ui/unoidl/unomodel.cxx|3 -
 sd/source/ui/view/ViewShellBase.cxx |2 
 sd/source/ui/view/drawview.cxx  |6 --
 sd/source/ui/view/drviews5.cxx  |2 
 sd/source/ui/view/drviews7.cxx  |4 -
 sd/source/ui/view/outlnvsh.cxx  |6 +-
 sd/source/ui/view/sdwindow.cxx  |2 
 sd/source/ui/view/viewoverlaymanager.cxx|2 
 sdext/source/minimizer/configurationaccess.cxx  |7 --
 sdext/source/pdfimport/filterdet.cxx|   24 
--
 sdext/source/pdfimport/misc/pwdinteract.cxx |1 
 sdext/source/pdfimport/tree/pdfiprocessor.cxx   |2 
 sdext/source/pdfimport/wrapper/wrapper.cxx  |1 
 sdext/source/presenter/PresenterConfigurationAccess.cxx |8 ---
 sdext/source/presenter/PresenterWindowManager.cxx   |5 --
 36 files changed, 40 insertions(+), 140 deletions(-)

New commits:
commit 02ed1924eb34e8ea13da8337c12b127f81211770
Author: Noel Grandin 
Date:   Mon Dec 12 12:35:46 2016 +0200

OSL_TRACE->SAL in sd..sdext

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

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index a1b3418..adfa1c2 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -300,6 +300,7 @@ certain functionality.
 
 @section sdext
 
+@li @c sdext
 @li @c sdext.minimizer
 @li @c sdext.pdfimport
 @li @c sdext.pdfimport.pdfparse
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx 
b/sd/source/filter/eppt/pptx-epptooxml.cxx
index e88be43..c6c0a22 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -507,8 +507,6 @@ void PowerPointExport::WriteTransition( const FSHelperPtr& 
pFS )
 FadeEffect eFadeEffect = FadeEffect_NONE;
 GET( eFadeEffect, Effect );
 
-OSL_TRACE("fade effect %d", eFadeEffect);
-
 sal_Int16 nTransitionType = 0, nTransitionSubtype = 0;
 sal_Int8 nPPTTransitionType = 0;
 sal_uInt8 nDirection = 0;
diff --git a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx 
b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
index 4f2dc6e..1f18b70 100644
--- a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
+++ b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
@@ -88,13 +88,11 @@ AccessibleDrawDocumentView::AccessibleDrawDocumentView (
   mpSdViewSh( pViewShell ),
   mpChildrenManager (nullptr)
 {
-OSL_TRACE ("AccessibleDrawDocumentView");
 UpdateAccessibleName();
 }
 
 AccessibleDrawDocumentView::~AccessibleDrawDocumentView()
 {
-OSL_TRACE ("~AccessibleDrawDocumentView");
 DBG_ASSERT (rBHelper.bDisposed || rBHelper.bInDispose,
 "~AccessibleDrawDocumentView: object has not been disposed");
 }
@@ -298,13 +296,10 @@ void SAL_CALL
 
 AccessibleDocumentViewBase::propertyChange (rEventObject);
 
-OSL_TRACE ("AccessibleDrawDocumentView::propertyChange");
 // add page switch event for 

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

2016-12-09 Thread Stephan Bergmann
 include/sal/log-areas.dox  |4 
 testtools/source/bridgetest/cppobj.cxx |5 -
 2 files changed, 9 deletions(-)

New commits:
commit a1959d05b8531abc24edb9b9cc42c29e8412ba76
Author: Stephan Bergmann 
Date:   Fri Dec 9 21:37:22 2016 +0100

Remove irrelevant SAL_INFOs

Change-Id: Ieb58ed113c6a3e85a806ec57a6557e2d37bf9b06

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index b1bdf59..a1b3418 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -412,10 +412,6 @@ certain functionality.
 
 @li @c stoc.corerefl - CoreReflection
 
-@section testtools
-
-@li @c testtools
-
 @section VCL
 
 @li @c vcl
diff --git a/testtools/source/bridgetest/cppobj.cxx 
b/testtools/source/bridgetest/cppobj.cxx
index bcfa65a..ad3fd18 100644
--- a/testtools/source/bridgetest/cppobj.cxx
+++ b/testtools/source/bridgetest/cppobj.cxx
@@ -151,10 +151,6 @@ public:
   m_bFirstCall( true ),
   m_bSequenceOfCallTestPassed( true )
 {}
-virtual ~Test_Impl() override
-{
-SAL_INFO("testtools", "> scalar Test_Impl dtor <" );
-}
 
 void SAL_CALL acquire() throw () override
 {
@@ -683,7 +679,6 @@ void dothrow(const RuntimeException& e)
 Any a( getCaughtException() );
 RuntimeException exc;
 OSL_VERIFY( a >>= exc );
-SAL_INFO("testtools", exc.Message );
 }
 catch (...) // never throws anything
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/sal sw/source testtools/source toolkit/source tools/source ucb/source

2016-12-08 Thread Noel Grandin
 include/sal/log-areas.dox |4 +
 sw/source/core/doc/DocumentDeviceManager.cxx  |2 
 sw/source/core/doc/docbasic.cxx   |6 --
 sw/source/core/doc/docbm.cxx  |4 -
 sw/source/core/text/inftxt.cxx|6 +-
 sw/source/core/unocore/unorefmk.cxx   |2 
 sw/source/filter/ww8/docxattributeoutput.cxx  |   44 +-
 sw/source/filter/ww8/docxexport.cxx   |6 +-
 sw/source/filter/ww8/docxexportfilter.cxx |2 
 sw/source/filter/ww8/wrtw8nds.cxx |2 
 sw/source/filter/ww8/wrtww8gr.cxx |4 -
 sw/source/filter/ww8/ww8par.cxx   |2 
 sw/source/filter/xml/XMLRedlineImportHelper.cxx   |8 +--
 sw/source/ui/vba/service.cxx  |2 
 sw/source/ui/vba/vbaaddins.cxx|2 
 sw/source/ui/vba/vbadocument.cxx  |4 -
 sw/source/ui/vba/vbadocumentproperties.cxx|8 +--
 sw/source/ui/vba/vbafield.cxx |4 -
 sw/source/ui/vba/vbaglobals.cxx   |   18 +++
 sw/source/ui/vba/vbalisthelper.cxx|2 
 sw/source/ui/vba/vbastyles.cxx|2 
 testtools/source/bridgetest/cppobj.cxx|6 --
 toolkit/source/awt/vclxtabpagecontainer.cxx   |2 
 toolkit/source/awt/vclxtoolkit.cxx|   20 +---
 toolkit/source/awt/vclxwindows.cxx|   16 ++
 toolkit/source/controls/controlmodelcontainerbase.cxx |   10 ++--
 toolkit/source/controls/stdtabcontroller.cxx  |2 
 tools/source/generic/config.cxx   |   24 -
 tools/source/rc/resmgr.cxx|   14 ++---
 tools/source/stream/strmunx.cxx   |   13 +
 ucb/source/core/ucb.cxx   |6 +-
 ucb/source/core/ucbstore.cxx  |9 +--
 32 files changed, 110 insertions(+), 146 deletions(-)

New commits:
commit e61521f6cf0a065d23b420c4007ea224c3070052
Author: Noel Grandin 
Date:   Thu Dec 8 15:54:14 2016 +0200

OSL_TRACE -> SAL in sw..ucb

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

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index a1b3418..b1bdf59 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -412,6 +412,10 @@ certain functionality.
 
 @li @c stoc.corerefl - CoreReflection
 
+@section testtools
+
+@li @c testtools
+
 @section VCL
 
 @li @c vcl
diff --git a/sw/source/core/doc/DocumentDeviceManager.cxx 
b/sw/source/core/doc/DocumentDeviceManager.cxx
index 1659263..8caf93a 100644
--- a/sw/source/core/doc/DocumentDeviceManager.cxx
+++ b/sw/source/core/doc/DocumentDeviceManager.cxx
@@ -284,7 +284,7 @@ SfxPrinter& DocumentDeviceManager::CreatePrinter_() const
 OSL_ENSURE( ! mpPrt, "Do not call CreatePrinter_(), call getPrinter() 
instead" );
 
 #if OSL_DEBUG_LEVEL > 1
-OSL_TRACE( "Printer will be created!" );
+SAL_INFO("sw", "Printer will be created!" );
 #endif
 
 // We create a default SfxPrinter.
diff --git a/sw/source/core/doc/docbasic.cxx b/sw/source/core/doc/docbasic.cxx
index 80c894b..e513260 100644
--- a/sw/source/core/doc/docbasic.cxx
+++ b/sw/source/core/doc/docbasic.cxx
@@ -117,8 +117,7 @@ bool SwDoc::ExecMacro( const SvxMacro& rMacro, OUString* 
pRet, SbxArray* pArgs )
 Sequence< sal_Int16 > aOutArgsIndex;
 Sequence< Any > aOutArgs;
 
-OSL_TRACE( "SwDoc::ExecMacro URL is %s", OUStringToOString( 
rMacro.GetMacName(),
-RTL_TEXTENCODING_UTF8).getStr() );
+SAL_INFO("sw", "SwDoc::ExecMacro URL is " << rMacro.GetMacName() );
 
 eErr = mpDocShell->CallXScript(
 rMacro.GetMacName(), *pUnoArgs, aRet, aOutArgsIndex, aOutArgs);
@@ -218,8 +217,7 @@ sal_uInt16 SwDoc::CallEvent( sal_uInt16 nEvent, const 
SwCallMouseEvent& rCallEve
 Sequence< sal_Int16 > aOutArgsIndex;
 Sequence< Any > aOutArgs;
 
-OSL_TRACE( "SwDoc::CallEvent URL is %s", OUStringToOString(
-rMacro.GetMacName(), RTL_TEXTENCODING_UTF8).getStr() );
+SAL_INFO("sw", "SwDoc::CallEvent URL is " << 
rMacro.GetMacName() );
 
 nRet += 0 == mpDocShell->CallXScript(
 rMacro.GetMacName(), *pUnoArgs,aRet, aOutArgsIndex, 
aOutArgs) ? 1 : 0;
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index 07bf110..9b50b03 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -220,8 +220,6 @@ namespace
 

[Libreoffice-commits] core.git: include/sal unotools/source unoxml/qa unoxml/source uui/source

2016-12-06 Thread Noel Grandin
 include/sal/log-areas.dox  |1 +
 unotools/source/config/bootstrap.cxx   |2 +-
 unotools/source/config/eventcfg.cxx|6 +++---
 unotools/source/i18n/localedatawrapper.cxx |2 +-
 unoxml/qa/unit/domtest.cxx |2 +-
 unoxml/source/dom/attr.cxx |4 +++-
 unoxml/source/dom/node.cxx |7 +++
 uui/source/iahndl-authentication.cxx   |2 +-
 8 files changed, 14 insertions(+), 12 deletions(-)

New commits:
commit 3224f26cfed1963994db53172a70f332068ae41e
Author: Noel Grandin 
Date:   Tue Dec 6 12:31:23 2016 +0200

OSL_TRACE->SAL in unotools..uui

Change-Id: I7f391604401b8a10f5d451673ed6223c031c56ab

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index a27e77e..a1b3418 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -393,6 +393,7 @@ certain functionality.
 
 @section unotools
 
+@li @c unotools
 @li @c unotools.config
 @li @c unotools.i18n
 @li @c unotools.misc
diff --git a/unotools/source/config/bootstrap.cxx 
b/unotools/source/config/bootstrap.cxx
index 68868f6..5c53080 100644
--- a/unotools/source/config/bootstrap.cxx
+++ b/unotools/source/config/bootstrap.cxx
@@ -372,7 +372,7 @@ OUString getExecutableBaseName()
sExecutable  = sExecutable.copy(0,nExtIndex);
 }
 else
-OSL_TRACE("Cannot get executable name: osl_getExecutableFile failed");
+SAL_WARN("unotools", "Cannot get executable name: 
osl_getExecutableFile failed");
 
 return sExecutable;
 }
diff --git a/unotools/source/config/eventcfg.cxx 
b/unotools/source/config/eventcfg.cxx
index f9e846e..c331ede 100644
--- a/unotools/source/config/eventcfg.cxx
+++ b/unotools/source/config/eventcfg.cxx
@@ -161,7 +161,7 @@ void GlobalEventConfig_Impl::Notify( const Sequence< 
OUString >& )
 void GlobalEventConfig_Impl::ImplCommit()
 {
 //DF need to check it this is correct??
-OSL_TRACE("In GlobalEventConfig_Impl::ImplCommit");
+SAL_INFO("unotools", "In GlobalEventConfig_Impl::ImplCommit");
 EventBindingHash::const_iterator it = m_eventBindingHash.begin();
 EventBindingHash::const_iterator it_end = m_eventBindingHash.end();
 // clear the existing nodes
@@ -177,7 +177,7 @@ void GlobalEventConfig_Impl::ImplCommit()
 sNode = SETNODE_BINDINGS PATHDELIMITER "BindingType['" +
 it->first +
 "']" PATHDELIMITER PROPERTYNAME_BINDINGURL;
-OSL_TRACE("writing binding for: %s",OUStringToOString(sNode , 
RTL_TEXTENCODING_ASCII_US ).pData->buffer);
+SAL_INFO("unotools", "writing binding for: " << sNode);
 seqValues[ 0 ].Name = sNode;
 seqValues[ 0 ].Value <<= it->second;
 //write the data to the registry
@@ -207,7 +207,7 @@ void GlobalEventConfig_Impl::initBindingInfo()
 aBuffer.append( lEventNames[i] );
 aBuffer.append( aCommandKey );
 lMacros[0] = aBuffer.makeStringAndClear();
-OSL_TRACE("reading binding for: %s",OUStringToOString(lMacros[0] , 
RTL_TEXTENCODING_ASCII_US ).pData->buffer);
+SAL_INFO("unotools", "reading binding for: " << lMacros[0]);
 Sequence< Any > lValues = GetProperties( lMacros );
 OUString sMacroURL;
 if( lValues.getLength() > 0 )
diff --git a/unotools/source/i18n/localedatawrapper.cxx 
b/unotools/source/i18n/localedatawrapper.cxx
index a467685..bb68778 100644
--- a/unotools/source/i18n/localedatawrapper.cxx
+++ b/unotools/source/i18n/localedatawrapper.cxx
@@ -1795,7 +1795,7 @@ void LocaleDataWrapper::outputCheckMessage( const char* 
pStr )
 {
 fprintf( stderr, "\n%s\n", pStr);
 fflush( stderr);
-OSL_TRACE("%s", pStr);
+SAL_WARN("unotools", pStr);
 }
 
 // static
diff --git a/unoxml/qa/unit/domtest.cxx b/unoxml/qa/unit/domtest.cxx
index a01e59e..f6b940b 100644
--- a/unoxml/qa/unit/domtest.cxx
+++ b/unoxml/qa/unit/domtest.cxx
@@ -173,7 +173,7 @@ struct TokenHandler
 {
 virtual ::sal_Int32 SAL_CALL getTokenFromUTF8( const uno::Sequence< 
::sal_Int8 >& Identifier ) throw (uno::RuntimeException) override
 {
-OSL_TRACE("getTokenFromUTF8() %s", reinterpret_cast(Identifier.getConstArray()));
+SAL_INFO("unoxml", "getTokenFromUTF8() " << reinterpret_cast(Identifier.getConstArray()));
 return Identifier.getLength() ? Identifier[0] : 0;
 }
 
diff --git a/unoxml/source/dom/attr.cxx b/unoxml/source/dom/attr.cxx
index 5d53151..ed2a87c 100644
--- a/unoxml/source/dom/attr.cxx
+++ b/unoxml/source/dom/attr.cxx
@@ -63,7 +63,9 @@ namespace DOM
 }
 pNs = xmlSearchNsByHref(pNode->doc, pNode, pUri);
 // if (!pNs) hmm... now what? throw?
-if (!pNs) { OSL_TRACE("CAtttr: cannot create namespace"); }
+if (!pNs) {
+SAL_WARN("unoxml", "CAtttr: cannot create namespace");
+}
 return pNs;
 }
 
diff --git a/unoxml/source/dom/node.cxx b/unoxml/source/dom/node.cxx
index 

[Libreoffice-commits] core.git: include/sal Repository.mk xmlsecurity/Executable_pdfverify.mk xmlsecurity/Module_xmlsecurity.mk xmlsecurity/source

2016-10-12 Thread Miklos Vajna
 Repository.mk  |1 
 include/sal/log-areas.dox  |1 
 xmlsecurity/Executable_pdfverify.mk|   41 
 xmlsecurity/Module_xmlsecurity.mk  |8 
 xmlsecurity/source/pdfio/pdfverify.cxx | 1539 +
 5 files changed, 1590 insertions(+)

New commits:
commit 53bba96ac0c76e2971532d13a09d9fd90b3299c7
Author: Miklos Vajna 
Date:   Wed Oct 12 16:50:09 2016 +0200

xmlsecurity: add initial Executable_pdfverify

We have code to verify ODF and OOXML signatures, this adds initial
support for verifying a PDF signature.

Initially this is a standalone executable, need to turn this into a unit
test + hook it into sfx2 in follow-up commits.

Change-Id: Ideb5ec63f761c74fd4527cf1766b0aa739e275ee

diff --git a/Repository.mk b/Repository.mk
index cac6233..f8599b3 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -47,6 +47,7 @@ $(eval $(call gb_Helper_register_executables,NONE, \
osl_process_child \
pdf2xml \
pdfunzip \
+   pdfverify \
pocheck \
propex \
regsvrex \
diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 70661fe..c5c8f4e 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -509,6 +509,7 @@ certain functionality.
 @li @c xmlsecurity.comp - xml security component
 @li @c xmlsecurity.dialogs - xml security dialogs
 @li @c xmlsecurity.helper
+@li @c xmlsecurity.pdfio - signing of existing PDF
 @li @c xmlsecurity.xmlsec - xmlsec wrapper
 
 @section xmlscript
diff --git a/xmlsecurity/Executable_pdfverify.mk 
b/xmlsecurity/Executable_pdfverify.mk
new file mode 100644
index 000..c62698f
--- /dev/null
+++ b/xmlsecurity/Executable_pdfverify.mk
@@ -0,0 +1,41 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# 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/.
+#
+
+$(eval $(call gb_Executable_Executable,pdfverify))
+
+$(eval $(call gb_Executable_use_sdk_api,pdfverify))
+
+$(eval $(call gb_Executable_set_include,pdfverify,\
+$$(INCLUDE) \
+))
+
+$(eval $(call gb_Executable_use_libraries,pdfverify,\
+comphelper \
+sal \
+tl \
+))
+
+$(eval $(call gb_Executable_add_exception_objects,pdfverify,\
+xmlsecurity/source/pdfio/pdfverify \
+))
+
+ifeq ($(OS)-$(COM),WNT-MSC)
+$(eval $(call gb_Executable_add_defs,pdfverify,\
+-DXMLSEC_CRYPTO_MSCRYPTO \
+))
+else
+$(eval $(call gb_Executable_add_defs,pdfverify,\
+-DXMLSEC_CRYPTO_NSS \
+))
+$(eval $(call gb_Executable_use_externals,pdfverify,\
+nss3 \
+))
+endif
+
+# vim:set noet sw=4 ts=4:
diff --git a/xmlsecurity/Module_xmlsecurity.mk 
b/xmlsecurity/Module_xmlsecurity.mk
index 3c9b220..04d1087 100644
--- a/xmlsecurity/Module_xmlsecurity.mk
+++ b/xmlsecurity/Module_xmlsecurity.mk
@@ -36,4 +36,12 @@ $(eval $(call gb_Module_add_screenshot_targets,xmlsecurity,\
 CppunitTest_xmlsecurity_dialogs_test \
 ))
 
+ifneq (,$(filter DESKTOP,$(BUILD_TYPE)))
+
+$(eval $(call gb_Module_add_targets,xmlsecurity,\
+Executable_pdfverify \
+))
+
+endif
+
 # vim: set noet sw=4 ts=4:
diff --git a/xmlsecurity/source/pdfio/pdfverify.cxx 
b/xmlsecurity/source/pdfio/pdfverify.cxx
new file mode 100644
index 000..5bf50b6
--- /dev/null
+++ b/xmlsecurity/source/pdfio/pdfverify.cxx
@@ -0,0 +1,1539 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * 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 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#ifdef XMLSEC_CRYPTO_NSS
+#include 
+#include 
+#include 
+#include 
+#endif
+
+using namespace com::sun::star;
+
+namespace xmlsecurity
+{
+namespace pdfio
+{
+
+/// A byte range in a PDF file.
+class PDFElement
+{
+public:
+virtual bool Read(SvStream& rStream) = 0;
+virtual ~PDFElement() { }
+};
+
+class PDFTrailerElement;
+class PDFObjectElement;
+
+/// In-memory representation of an on-disk PDF document.
+class PDFDocument
+{
+/// This vector owns all elements.
+std::vector< std::unique_ptr > m_aElements;
+// List of object offsets we know.
+std::vector m_aXRef;
+PDFTrailerElement* m_pTrailer;
+
+static int AsHex(char ch);
+
+public:
+PDFDocument();
+static OString ReadKeyword(SvStream& rStream);
+static size_t FindStartXRef(SvStream& rStream);
+void ReadXRef(SvStream& rStream);
+static void SkipWhitespace(SvStream& rStream);
+size_t GetObjectOffset(size_t nIndex) const;
+const 

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

2016-08-18 Thread Tor Lillqvist
 include/sal/log.hxx |3 +++
 sal/osl/all/log.cxx |   10 +++---
 2 files changed, 10 insertions(+), 3 deletions(-)

New commits:
commit 99ee4ebb0e934413bed881a02e4634e4d3f813ea
Author: Tor Lillqvist 
Date:   Thu Aug 18 16:55:11 2016 +0300

If no WARN in SAL_LOG, use the INFO selection for WARNs, too

Often the choice whether some particular message is displayed with
SAL_INFO or SAL_WARN has not necessarily been that well thought
through. Many SAL_WARNs are not actually warnings but purely
informative. If you want to see the INFOs for an area it makes sense
to want to see also the WARNs for it. So make it so, unless a specific
WARN selection is specified.

Change-Id: I6286c5f856b29e68bedb7f20efadf56953f94b72

diff --git a/include/sal/log.hxx b/include/sal/log.hxx
index e879a2f..8b4ef0a 100644
--- a/include/sal/log.hxx
+++ b/include/sal/log.hxx
@@ -262,6 +262,9 @@ inline char const * unwrapStream(SAL_UNUSED_PARAMETER 
StreamIgnore const &) {
 that has a sense of "+".  (That is, if both +INFO.foo and -INFO.foo are
 present, +INFO.foo wins.)
 
+If no WARN selection is specified, but an INFO selection is, the
+INFO selection is used for WARN messages, too.
+
 For example, if SAL_LOG is "+INFO-INFO.foo+INFO.foo.bar", then calls like
 SAL_INFO("foo.bar", ...), SAL_INFO("foo.bar.baz", ...), or
 SAL_INFO("other", ...) generate output, while calls like
diff --git a/sal/osl/all/log.cxx b/sal/osl/all/log.cxx
index 7f865f6..c1608b1 100644
--- a/sal/osl/all/log.cxx
+++ b/sal/osl/all/log.cxx
@@ -202,14 +202,17 @@ bool report(sal_detail_LogLevel level, char const * area) 
{
 // no matching switches at all, the result will be negative (and
 // initializing with 1 is safe as the length of a valid switch, even
 // without the "+"/"-" prefix, will always be > 1)
+bool seenWarn = false;
 for (char const * p = env;;) {
 Sense sense;
 switch (*p++) {
 case '\0':
+// if a specific item is both positive and negative
+// (senseLen[POSITIVE] == senseLen[NEGATIVE]), default to
+// positive
+if (level == SAL_DETAIL_LOG_LEVEL_WARN && !seenWarn)
+return report(SAL_DETAIL_LOG_LEVEL_INFO, area);
 return senseLen[POSITIVE] >= senseLen[NEGATIVE];
-// if a specific item is both positive and negative
-// (senseLen[POSITIVE] == senseLen[NEGATIVE]), default to
-// positive
 case '+':
 sense = POSITIVE;
 break;
@@ -229,6 +232,7 @@ bool report(sal_detail_LogLevel level, char const * area) {
 } else if (equalStrings(p, p1 - p, RTL_CONSTASCII_STRINGPARAM("WARN")))
 {
 match = level == SAL_DETAIL_LOG_LEVEL_WARN;
+seenWarn = true;
 } else if (equalStrings(p, p1 - p, 
RTL_CONSTASCII_STRINGPARAM("TIMESTAMP")) ||
equalStrings(p, p1 - p, 
RTL_CONSTASCII_STRINGPARAM("RELATIVETIMER")))
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-08-18 Thread Tor Lillqvist
 include/sal/log.hxx |   21 +-
 sal/osl/all/log.cxx |   73 +++-
 2 files changed, 64 insertions(+), 30 deletions(-)

New commits:
commit ed815a242ef962afa52033a0d94ba6aa4539dd07
Author: Tor Lillqvist 
Date:   Thu Aug 18 15:31:25 2016 +0300

Add handling of a +RELATIVETIMER flag in the SAL_LOG environment variable

Outputs a timestamp in decimal seconds (with millisecond accuracy).

Simplified the handling of SAL_LOG if no "level" is specified. Now
just a totally unset (or empty) SAL_LOG causes the default of "+WARN"
to be used. Given how the code works, it would have become too
unwieldy to check for all combinations of TIMESTAMP and RELATIVETIMER
but no WARN or INFO.

Change-Id: I7bb5bb665d4e764e7eee447e93486f6467042e97

diff --git a/include/sal/log.hxx b/include/sal/log.hxx
index 6ce3bfe..e879a2f 100644
--- a/include/sal/log.hxx
+++ b/include/sal/log.hxx
@@ -231,18 +231,25 @@ inline char const * unwrapStream(SAL_UNUSED_PARAMETER 
StreamIgnore const &) {
::= 
::= "+"|"-"
::= |(".")?
-   ::= "TIMESTAMP"
+   ::= "TIMESTAMP"|"RELATIVETIMER"
::= "INFO"|"WARN"
 @endverbatim
 
-If the environment variable is unset, or contains no level, the level
-setting "+WARN" is assumed instead (which results in all warnings being
-output but no infos).  If the given value does not match the regular
-expression, "+INFO+WARN" is used instead (which in turn results in
-everything being output).
+If the environment variable is unset, the setting "+WARN" is
+assumed instead (which results in all warnings being output but no
+infos).  If the given value does not match the regular expression,
+"+INFO+WARN" is used instead (which in turn results in everything
+being output).
 
 The "+TIMESTAMP" flag causes each output line (as selected by the level
-switch(es)) to be prefixed by a timestamp like 2016-08-18:14:04:43..
+switch(es)) to be prefixed by a timestamp like 2016-08-18:14:04:43.
+
+The "+RELATIVETIMER" flag causes each output line (as selected by
+the level switch(es)) to be prefixed by a relative timestamp in
+seconds since the first output line like 1.312.
+
+If both +TIMESTAMP and +RELATIVETIMER are specified, they are
+output in that order.
 
 Specifying a flag with a negative sense has no effect. Specifying
 the same flag multiple times has no extra effect.
diff --git a/sal/osl/all/log.cxx b/sal/osl/all/log.cxx
index 276cbe4..7f865f6 100644
--- a/sal/osl/all/log.cxx
+++ b/sal/osl/all/log.cxx
@@ -109,9 +109,52 @@ void maybeOutputTimestamp(std::ostringstream ) {
 char const * env = getEnvironmentVariable();
 if (env == nullptr)
 return;
+bool outputTimestamp = false;
+bool outputRelativeTimer = false;
 for (char const * p = env;;) {
 switch (*p++) {
 case '\0':
+if (outputTimestamp) {
+char ts[100];
+TimeValue systemTime;
+osl_getSystemTime();
+TimeValue localTime;
+osl_getLocalTimeFromSystemTime(, );
+oslDateTime dateTime;
+osl_getDateTimeFromTimeValue(, );
+struct tm tm;
+tm.tm_sec = dateTime.Seconds;
+tm.tm_min = dateTime.Minutes;
+tm.tm_hour = dateTime.Hours;
+tm.tm_mday = dateTime.Day;
+tm.tm_mon = dateTime.Month - 1;
+tm.tm_year = dateTime.Year - 1900;
+strftime(ts, sizeof(ts), "%Y-%m-%d:%H:%M:%S", );
+char milliSecs[10];
+sprintf(milliSecs, "%03d", dateTime.NanoSeconds/100);
+s << ts << '.' << milliSecs << ':';
+}
+if (outputRelativeTimer) {
+static bool beenHere = false;
+static TimeValue first;
+if (!beenHere) {
+osl_getSystemTime();
+beenHere = true;
+}
+TimeValue now;
+osl_getSystemTime();
+int seconds = now.Seconds - first.Seconds;
+int milliSeconds;
+if (now.Nanosec < first.Nanosec) {
+seconds--;
+milliSeconds = 1000-(first.Nanosec-now.Nanosec)/100;
+}
+else
+milliSeconds = (now.Nanosec-first.Nanosec)/100;
+char relativeTimestamp[100];
+sprintf(relativeTimestamp, "%d.%03d", seconds, milliSeconds);
+s << relativeTimestamp << ':';
+}
 return;
 case '+':
 {
@@ -119,27 +162,10 @@ void maybeOutputTimestamp(std::ostringstream ) {
 while (*p1 != '.' && *p1 != '+' && *p1 != '-' && *p1 != '\0') {
 ++p1;
   

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

2016-08-18 Thread Tor Lillqvist
 include/sal/log.hxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit e4626191f7739834d2f66a24b42e12de7a1115cd
Author: Tor Lillqvist 
Date:   Thu Aug 18 14:43:31 2016 +0300

Mention what negative or multiply specified flags mean (nothing special)

Change-Id: I8ac1839aab3438aa685aa8cdab2e972447352599

diff --git a/include/sal/log.hxx b/include/sal/log.hxx
index 9465486..6ce3bfe 100644
--- a/include/sal/log.hxx
+++ b/include/sal/log.hxx
@@ -242,7 +242,10 @@ inline char const * unwrapStream(SAL_UNUSED_PARAMETER 
StreamIgnore const &) {
 everything being output).
 
 The "+TIMESTAMP" flag causes each output line (as selected by the level
-switch(es)) to be prefixed by a timestamp like 2016-08-18:14:04:43.672.
+switch(es)) to be prefixed by a timestamp like 2016-08-18:14:04:43..
+
+Specifying a flag with a negative sense has no effect. Specifying
+the same flag multiple times has no extra effect.
 
 A given macro call's level (INFO or WARN) and area is matched against the
 given switches as follows:  Only those switches for which the level matches
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-08-18 Thread Tor Lillqvist
 include/sal/log.hxx |   28 +++--
 sal/osl/all/log.cxx |   58 ++--
 2 files changed, 73 insertions(+), 13 deletions(-)

New commits:
commit fb00c725bba8b5ea30d47d28d0e54c071f1fe2a6
Author: Tor Lillqvist 
Date:   Thu Aug 18 14:07:00 2016 +0300

Add handling of a +TIMESTAMP flag in the SAL_LOG environment variable

Change-Id: I9bdcd8b2d7b46a087d7f5461b6f7c3d9f02ec084

diff --git a/include/sal/log.hxx b/include/sal/log.hxx
index e01d708..9465486 100644
--- a/include/sal/log.hxx
+++ b/include/sal/log.hxx
@@ -228,15 +228,21 @@ inline char const * unwrapStream(SAL_UNUSED_PARAMETER 
StreamIgnore const &) {
 with
 
 @verbatim
-   ::= (".")?
+   ::= 
::= "+"|"-"
+   ::= |(".")?
+   ::= "TIMESTAMP"
::= "INFO"|"WARN"
 @endverbatim
 
-If the environment variable is unset, "+WARN" is used instead (which 
results
-in all warnings being output but no infos).  If the given value does not
-match the regular expression, "+INFO+WARN" is used instead (which in turn
-results in everything being output).
+If the environment variable is unset, or contains no level, the level
+setting "+WARN" is assumed instead (which results in all warnings being
+output but no infos).  If the given value does not match the regular
+expression, "+INFO+WARN" is used instead (which in turn results in
+everything being output).
+
+The "+TIMESTAMP" flag causes each output line (as selected by the level
+switch(es)) to be prefixed by a timestamp like 2016-08-18:14:04:43.672.
 
 A given macro call's level (INFO or WARN) and area is matched against the
 given switches as follows:  Only those switches for which the level matches
@@ -251,12 +257,12 @@ inline char const * unwrapStream(SAL_UNUSED_PARAMETER 
StreamIgnore const &) {
 SAL_INFO("other", ...) generate output, while calls like
 SAL_INFO("foo", ...) or SAL_INFO("foo.barzzz", ...) do not.
 
-The generated log output consists of the given level ("info" or "warn"), 
the
-given area, the process ID, the thread ID, the source file, and the source
-line number, each followed by a colon, followed by a space, the given
-message, and a newline.  The precise format of the log output is subject to
-change.  The log output is printed to stderr without further text encoding
-conversion.
+The generated log output consists of the optinal timestamp, the given level
+("info" or "warn"), the given area, the process ID, the thread ID, the
+source file, and the source line number, each followed by a colon, followed
+by a space, the given message, and a newline.  The precise format of the 
log
+output is subject to change.  The log output is printed to stderr without
+further text encoding conversion.
 
 @see @ref sal_log_areas
 
diff --git a/sal/osl/all/log.cxx b/sal/osl/all/log.cxx
index 9c75393..da7eeeb 100644
--- a/sal/osl/all/log.cxx
+++ b/sal/osl/all/log.cxx
@@ -105,6 +105,55 @@ char const * getEnvironmentVariable() {
 return env;
 }
 
+void maybeOutputTimestamp(std::ostringstream ) {
+char const * env = getEnvironmentVariable();
+if (env == nullptr)
+return;
+for (char const * p = env;;) {
+switch (*p++) {
+case '\0':
+return;
+case '+':
+{
+char const * p1 = p;
+while (*p1 != '.' && *p1 != '+' && *p1 != '-' && *p1 != '\0') {
+++p1;
+}
+if (equalStrings(p, p1 - p, 
RTL_CONSTASCII_STRINGPARAM("TIMESTAMP"))) {
+char ts[100];
+TimeValue systemTime;
+osl_getSystemTime();
+TimeValue localTime;
+osl_getLocalTimeFromSystemTime(, );
+oslDateTime dateTime;
+osl_getDateTimeFromTimeValue(, );
+struct tm tm;
+tm.tm_sec = dateTime.Seconds;
+tm.tm_min = dateTime.Minutes;
+tm.tm_hour = dateTime.Hours;
+tm.tm_mday = dateTime.Day;
+tm.tm_mon = dateTime.Month - 1;
+tm.tm_year = dateTime.Year - 1900;
+strftime(ts, sizeof(ts), "%Y-%m-%d:%H:%M:%S", );
+char milliSecs[10];
+sprintf(milliSecs, "%03d", dateTime.NanoSeconds/100);
+s << ts << '.' << milliSecs << ':';
+return;
+}
+char const * p2 = p1;
+while (*p2 != '+' && *p2 != '-' && *p2 != '\0') {
+++p2;
+}
+p = p2;
+}
+break;
+default:
+; // nothing
+}
+}
+return;
+}
+
 #endif
 
 namespace {
@@ -119,7 +168,7 @@ bool report(sal_detail_LogLevel 

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

2016-06-27 Thread Tor Lillqvist
 include/sal/log-areas.dox |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 5e9b46f66fe2120106d74a1679c2810b30a8ef70
Author: Tor Lillqvist 
Date:   Mon Jun 27 18:45:14 2016 +0300

Bin unused log area

Change-Id: I40f2364bd4941941a8766bc492e303e56c9e4256

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 8a6fbdd..e88e1a2 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -127,7 +127,6 @@ certain functionality.
 @li @c sc.filter - Calc filter
 @li @c sc.opencl - OpenCL-related stuff in general
 @li @c sc.opencl.source - Generated OpenCL source code
-@li @c sc.opencl.thread - Background thread to compile OpenCL kernels
 @li @c sc.orcus
 @li @c sc.orcus.autofilter
 @li @c sc.orcus.condformat
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/sal include/sfx2 sc/source sd/source sfx2/source sw/inc sw/source

2016-06-23 Thread Miklos Vajna
 include/sal/log-areas.dox  |1 -
 include/sfx2/objsh.hxx |7 ---
 sc/source/ui/docshell/docsh.cxx|4 
 sc/source/ui/inc/docsh.hxx |2 --
 sd/source/ui/docshell/docshell.cxx |4 
 sd/source/ui/inc/DrawDocShell.hxx  |2 --
 sfx2/source/doc/objcont.cxx|5 -
 sw/inc/docsh.hxx   |2 --
 sw/source/uibase/app/docsh.cxx |4 
 9 files changed, 31 deletions(-)

New commits:
commit ed2d342e97e43ff25f450ab6a5752baded6813e4
Author: Miklos Vajna 
Date:   Thu Jun 23 08:47:05 2016 +0200

Remove unused SfxObjectShell::libreOfficeKitCallback()

All clients have been converted to use
SfxViewShell::libreOfficeKitViewCallback() instead.

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

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index dd32631..8a6fbdd 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -316,7 +316,6 @@ certain functionality.
 @li @c sfx.doc
 @li @c sfx.notify
 @li @c sfx.sidebar
-@li @c sfx.tiledrendering
 @li @c sfx.view
 
 @section slideshow
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index ee86c34..fd8e710 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -722,13 +722,6 @@ public:
 SAL_DLLPRIVATE void CancelCheckOut( );
 SAL_DLLPRIVATE void CheckIn( );
 SAL_DLLPRIVATE css::uno::Sequence< css::document::CmisVersion > 
GetCmisVersions();
-
-/**
- * Interface shared by document shell. Allow LOK calls from sfx.
- * Default behavior doesn't do anything. relevant SfxObjectShells should 
override
- * the default behavior and implements LOK calls.
- */
-virtual void libreOfficeKitCallback(int nType, const char* pPayload) const;
 };
 
 #define SFX_GLOBAL_CLASSID \
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 12f8b5d..79cb8c8 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -3220,8 +3220,4 @@ bool ScDocShell::GetProtectionHash( /*out*/ 
css::uno::Sequence< sal_Int8 > 
 return bRes;
 }
 
-void ScDocShell::libreOfficeKitCallback(int /*nType*/, const char* 
/*pPayload*/) const
-{
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index 84346fb..107c2dc 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -422,8 +422,6 @@ public:
 virtual boolGetProtectionHash( /*out*/ css::uno::Sequence< sal_Int8 > 
 ) override;
 
 void SnapVisArea( Rectangle& rRect ) const;
-
-virtual void libreOfficeKitCallback(int nType, const char* pPayload) const 
override;
 };
 
 void UpdateAcceptChangesDialog();
diff --git a/sd/source/ui/docshell/docshell.cxx 
b/sd/source/ui/docshell/docshell.cxx
index b948bd9..ccf257c 100644
--- a/sd/source/ui/docshell/docshell.cxx
+++ b/sd/source/ui/docshell/docshell.cxx
@@ -478,10 +478,6 @@ void DrawDocShell::ClearUndoBuffer()
 pUndoManager->Clear();
 }
 
-void DrawDocShell::libreOfficeKitCallback(int /*nType*/, const char* 
/*pPayload*/) const
-{
-}
-
 } // end of namespace sd
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/inc/DrawDocShell.hxx 
b/sd/source/ui/inc/DrawDocShell.hxx
index cc5a8c0..d377abf 100644
--- a/sd/source/ui/inc/DrawDocShell.hxx
+++ b/sd/source/ui/inc/DrawDocShell.hxx
@@ -201,8 +201,6 @@ public:
 
 voidClearUndoBuffer();
 
-virtual void libreOfficeKitCallback(int nType, const char* pPayload) const 
override;
-
 protected:
 
 SdDrawDocument* mpDoc;
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index e5681b8..5192e9e 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -651,9 +651,4 @@ bool SfxObjectShell::IsModifyPasswordEntered()
 return pImpl->m_bModifyPasswordEntered;
 }
 
-void SfxObjectShell::libreOfficeKitCallback(int /*nType*/, const char* 
/*pPayload*/) const
-{
-SAL_INFO("sfx.tiledrendering", "SfxObjectShell::libreOfficeKitCallback 
interface not overridden for SfxObjectShell subclass typeId: " << 
typeid(*this).name());
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
index cce1600..50ac3c9 100644
--- a/sw/inc/docsh.hxx
+++ b/sw/inc/docsh.hxx
@@ -307,8 +307,6 @@ public:
 virtual voidSetChangeRecording( bool bActivate ) override;
 virtual voidSetProtectionPassword( const OUString  ) 
override;
 virtual boolGetProtectionHash( /*out*/ css::uno::Sequence< sal_Int8 > 
 ) override;
-
-virtual void libreOfficeKitCallback(int nType, const char* pPayload) const 
override;
 };
 
 /** Find the right DocShell and create a new one:
diff --git 

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

2016-06-06 Thread Michael Stahl
 include/sal/log-areas.dox |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 106bcf136892944d9430ffa70d21de641bb1
Author: Michael Stahl 
Date:   Mon Jun 6 15:31:13 2016 +0200

loplugin:sallogareas

Change-Id: Id9204f2499bd995f36c5962da56a6d486fe4ca59

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index cbb93eb..06da4f8 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -72,7 +72,8 @@ certain functionality.
 
 @li @c connectivity.commontools
 @li @c connectivity.cpool
-@li @c connectivity.drivers
+@li @c connectivity.drivers - a bit overly general, maybe it should be removed?
+@li @c connectivity.dbase
 @li @c connectivity.evoab2
 @li @c connectivity.firebird
 @li @c connectivity.flat
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-06 Thread Stephan Bergmann
 include/sal/log-areas.dox |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 2562d39d56bb48df3fb7daf8365ef93ff5f0dfdb
Author: Stephan Bergmann 
Date:   Mon Jun 6 14:47:32 2016 +0200

Revert "loplugin:sallogareas"

This reverts commit 94e6d9d0667781fc733bd18d7cf2b81d4a5366cb, which wasn't
necessary after 69c997428b748357918994ae1b0e2dbd052687d0 
"loplugin:sallogareas".

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index c7a97ce..cbb93eb 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -470,7 +470,6 @@ certain functionality.
 @li @c sw.level2
 @li @c sw.mailmerge - Writer mail merge
 @li @c sw.rtf - .rtf export filter
-@li @c sw.sidebar
 @li @c sw.tiled
 @li @c sw.ui
 @li @c sw.uno - Writer UNO interfaces
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-06 Thread Noel Grandin
 include/sal/log-areas.dox |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 94e6d9d0667781fc733bd18d7cf2b81d4a5366cb
Author: Noel Grandin 
Date:   Mon Jun 6 14:20:03 2016 +0200

loplugin:sallogareas

Change-Id: Id285f7b7f100f7bfd21ca786ef260243aad35825

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index cbb93eb..c7a97ce 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -470,6 +470,7 @@ certain functionality.
 @li @c sw.level2
 @li @c sw.mailmerge - Writer mail merge
 @li @c sw.rtf - .rtf export filter
+@li @c sw.sidebar
 @li @c sw.tiled
 @li @c sw.ui
 @li @c sw.uno - Writer UNO interfaces
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-05-30 Thread Markus Mohrhard
 include/sal/config.h |4 
 svx/source/dialog/crashreportdlg.cxx |   17 +
 2 files changed, 13 insertions(+), 8 deletions(-)

New commits:
commit 7259f07deaa9f9d5ce5c5b0f8f0847c673449135
Author: Markus Mohrhard 
Date:   Sun May 29 12:15:18 2016 +0200

use the existing URL to path tools

Change-Id: I20aa47556205f5efc70f8f5ea39c63009110f986
Reviewed-on: https://gerrit.libreoffice.org/25646
Reviewed-by: Markus Mohrhard 
Tested-by: Markus Mohrhard 

diff --git a/include/sal/config.h b/include/sal/config.h
index ea3e897..29fe63b 100644
--- a/include/sal/config.h
+++ b/include/sal/config.h
@@ -29,6 +29,7 @@
 #ifdef _WIN32
 #define SAL_W32
 #define SAL_DLLEXTENSION ".dll"
+#define SAL_EXEEXTENSION ".exe"
 #define SAL_PATHSEPARATOR ';'
 #define SAL_PATHDELIMITER '\\'
 #define SAL_NEWLINE_STRING "\r\n"
@@ -56,6 +57,7 @@
 defined(AIX) || defined(OPENBSD) || defined(DRAGONFLY) || defined(ANDROID)
 #define SAL_UNX
 #define SAL_DLLEXTENSION ".so"
+#define SAL_EXEEXTENSION ""
 #define SAL_DLLPREFIX "lib"
 #define SAL_PATHSEPARATOR ':'
 #define SAL_PATHDELIMITER '/'
@@ -66,6 +68,7 @@
 #ifdef EMSCRIPTEN
 #define SAL_UNX
 #define SAL_DLLEXTENSION ".bc"
+#define SAL_EXEEXTENSION ""
 #define SAL_DLLPREFIX "lib"
 #define SAL_PATHSEPARATOR ':'
 #define SAL_PATHDELIMITER '/'
@@ -76,6 +79,7 @@
 #ifdef MACOSX
 #define SAL_UNX
 #define SAL_DLLEXTENSION ".dylib"
+#define SAL_EXEEXTENSION ""
 #define SAL_DLLPREFIX "lib"
 #define SAL_PATHSEPARATOR ':'
 #define SAL_PATHDELIMITER '/'
diff --git a/svx/source/dialog/crashreportdlg.cxx 
b/svx/source/dialog/crashreportdlg.cxx
index a3ac1d9..aeb5c14 100644
--- a/svx/source/dialog/crashreportdlg.cxx
+++ b/svx/source/dialog/crashreportdlg.cxx
@@ -13,6 +13,7 @@
 
 #include 
 #include 
+#include 
 
 CrashReportDialog::CrashReportDialog(vcl::Window* pParent):
 Dialog(pParent, "CrashReportDialog",
@@ -40,12 +41,12 @@ void CrashReportDialog::dispose()
 
 namespace {
 
-OString getLibDir()
+OUString getLibDir()
 {
 OUString aOriginal = "$BRAND_BASE_DIR/" LIBO_LIBEXEC_FOLDER;
 rtl::Bootstrap::expandMacros(aOriginal);
 
-return rtl::OUStringToOString(aOriginal, RTL_TEXTENCODING_UTF8);
+return aOriginal;
 }
 
 }
@@ -55,12 +56,12 @@ IMPL_LINK_TYPED(CrashReportDialog, BtnHdl, Button*, pBtn, 
void)
 if (pBtn == mpBtnSend.get())
 {
 std::string ini_path = CrashReporter::getIniFileName();
-#if defined WNT
-OString aCommand = getLibDir().copy(8) + "/minidump_upload.exe " + 
ini_path.c_str();
-#else
-OString aCommand = getLibDir().copy(7) + "/minidump_upload " + 
ini_path.c_str();
-#endif
-int retVal = std::system(aCommand.getStr());
+OUString aCommand;
+osl::FileBase::getSystemPathFromFileURL(getLibDir() + 
"/minidump_upload" + SAL_EXEEXTENSION, aCommand);
+
+aCommand = aCommand;
+OString aOStringCommand = rtl::OUStringToOString(aCommand, 
RTL_TEXTENCODING_UTF8) + " " + ini_path.c_str();
+int retVal = std::system(aOStringCommand.getStr());
 SAL_WARN_IF(retVal != 0, "svx.dialog", "Failed to upload minidump. 
Error Code: " << retVal);
 // TODO: moggi: return the id for the user to look it up
 Close();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-05-08 Thread Andrea Gelmini
 include/sal/types.h |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a5fee58c72c80f6592d9d11f7b5156da275fbc2c
Author: Andrea Gelmini 
Date:   Sat May 7 17:07:30 2016 +0200

Updated file path.

Since commit 6c7659b584ea7ed3652ca4eb9a2297f36310c365
the new path is include/sal/types.h

Change-Id: I742ea2f6df06ff7345f3bbed0c90af13acafdbd7
Reviewed-on: https://gerrit.libreoffice.org/24718
Tested-by: Jenkins 
Reviewed-by: jan iversen 

diff --git a/include/sal/types.h b/include/sal/types.h
index 23a4b31..80df886 100644
--- a/include/sal/types.h
+++ b/include/sal/types.h
@@ -120,7 +120,7 @@ typedef unsigned char   sal_uInt8;
 #error "Could not find 64-bit type, add support for your architecture"
 #endif
 #else
-#error "Please define the 64-bit types for your architecture/compiler in 
sal/inc/sal/types.h"
+#error "Please define the 64-bit types for your architecture/compiler in 
include/sal/types.h"
 #endif
 
 /** A legacy synonym for `char`.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-05-03 Thread Stephan Bergmann
 include/sal/types.h |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit acdc855f0b9b97e23ea5282f5a31e28dbcf2b311
Author: Stephan Bergmann 
Date:   Tue May 3 22:05:42 2016 +0200

Trivially improve sal/types.h code indentation

...to trigger rebuilding of PCH on Windows after
e16fa715c43dcdf836ce8c400b6d54eae87b627d "Handle wchar_t as native C++11 
type on
windows"

Change-Id: Ia1cafb8a2f207f34b6fb1cb53fbaf23d90e6b296

diff --git a/include/sal/types.h b/include/sal/types.h
index 5614c99..23a4b31 100644
--- a/include/sal/types.h
+++ b/include/sal/types.h
@@ -146,13 +146,13 @@ typedef unsigned char sal_uChar;
 // "By default wchar_t is a typedef for unsigned short."
 // But MinGW has a native wchar_t, and on many places, we cannot deal with
 // that, so sal_Unicode has to be explicitly typedef'd as sal_uInt16 there.
-typedef wchar_t sal_Unicode;
+typedef wchar_t sal_Unicode;
 #else
 #define SAL_UNICODE_NOTEQUAL_WCHAR_T
 #if LIBO_INTERNAL_ONLY && defined __cplusplus
 typedef char16_t sal_Unicode;
 #else
-typedef sal_uInt16  sal_Unicode;
+typedef sal_uInt16 sal_Unicode;
 #endif
 #endif
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-04-14 Thread Stephan Bergmann
 include/sal/log-areas.dox |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit bec9f636da388f90fa2c7b11b8192528e4f563d9
Author: Stephan Bergmann 
Date:   Thu Apr 14 14:34:20 2016 +0200

loplugin:sallogareas

Change-Id: I220735e76174438d18929a9a92e289933c12fb0c

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index ec874bc..0b19721 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -59,10 +59,13 @@ certain functionality.
 
 @li @c chart2
 @li @c chart2.3dopengl
+@li @c chart2.accessibility
 @li @c chart2.areachart
+@li @c chart2.main
 @li @c chart2.opengl
 @li @c chart2.pie.label.bestfit
 @li @c chart2.pie.label.bestfit.inside
+@li @c chart2.template
 @li @c chart2.tools
 
 @section connectivity
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/sal include/vcl

2016-04-07 Thread Rohan Kumar
 include/sal/log-areas.dox  |1 +
 include/vcl/lazydelete.hxx |   17 +++--
 2 files changed, 4 insertions(+), 14 deletions(-)

New commits:
commit c829898453d75c0f13ff589b7f8adf8fb062a39f
Author: Rohan Kumar 
Date:   Thu Apr 7 13:56:53 2016 +0530

tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals

I disentangled my previous patch and converted fprintf statements to
SAL_INFOs

Change-Id: I4b993e00f82bdf904586ab5e7c954c4ee3ff1bac
Reviewed-on: https://gerrit.libreoffice.org/22925
Tested-by: Jenkins 
Reviewed-by: Björn Michaelsen 

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index e76e948..ec874bc 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -429,6 +429,7 @@ certain functionality.
 @li @c vcl.kde - KDE
 @li @c vcl.kde4 - KDE4
 @li @c vcl.layout - Widget layout
+@li @c vcl.lazydelete
 @li @c vcl.pdfwriter
 @li @c vcl.plugadapt - the Unix/X11 backend plugin mechanism
 @li @c vcl.opengl
diff --git a/include/vcl/lazydelete.hxx b/include/vcl/lazydelete.hxx
index 1f1235d..0c2840f 100644
--- a/include/vcl/lazydelete.hxx
+++ b/include/vcl/lazydelete.hxx
@@ -28,10 +28,7 @@
 #include 
 #include 
 
-#if OSL_DEBUG_LEVEL > 2
 #include 
-#include 
-#endif
 
 #include 
 
@@ -128,10 +125,7 @@ namespace vcl
 LazyDeletor()  { LazyDelete::addDeletor( this ); }
 virtual ~LazyDeletor()
 {
-#if OSL_DEBUG_LEVEL > 2
-fprintf( stderr, "%s %p deleted\n",
- typeid(*this).name(), this );
-#endif
+SAL_INFO("vcl.lazydelete", typeid(*this).name() << std::hex << 
this << " deleted");
 if( s_pOneInstance == this ) // sanity check
 s_pOneInstance = nullptr;
 
@@ -151,12 +145,8 @@ namespace vcl
 nCount = aRealDelete.size();
 for( unsigned int n = 0; n < nCount; n++ )
 {
-#if OSL_DEBUG_LEVEL > 2
-fprintf( stderr, "%s deletes object %p of type %s\n",
- typeid(*this).name(),
- aRealDelete[n],
- typeid(*aRealDelete[n]).name() );
-#endif
+SAL_INFO("vcl.lazydelete", typeid(*this).name() << " deletes 
object " << aRealDelete[n] << " of type "
+ << typeid(*aRealDelete[n]).name());
 // check if the object to be deleted is not already destroyed
 // as a side effect of a previous lazily destroyed object
 if( ! m_aObjects[ m_aPtrToIndex[ 
reinterpret_cast(aRealDelete[n].get()) ] ].m_bDeleted )
@@ -296,5 +286,4 @@ namespace vcl
 }
 
 #endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-08 Thread Stephan Bergmann
 include/sal/log-areas.dox |5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit 2ed1b3e0cdd74a6bb78c666375d0f4af2218b5db
Author: Stephan Bergmann 
Date:   Tue Mar 8 16:09:09 2016 +0100

Keep entries sorted (and no need for a @section here)

Change-Id: I356a6bde62d883adf4cfa9e34e87791eee9668ca

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 3387889..1183e6d 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -386,10 +386,6 @@ certain functionality.
 @li @c unotools.misc
 @li @c unotools.ucbhelper
 
-@section unodevtools
-
-@li @c unodevtools
-
 @section URE
 
 @li @c rtl.string - ::rtl::OString, ::rtl::OUString, and related functionality
@@ -552,6 +548,7 @@ certain functionality.
 @li @c svg
 @li @c test
 @li @c ucbhelper
+@li @c unodevtools
 @li @c unoidl
 @li @c unoxml
 @li @c uui
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-08 Thread Rohan Kumar
 include/sal/log-areas.dox  |4 
 unodevtools/source/unodevtools/options.cxx |   29 +++--
 2 files changed, 7 insertions(+), 26 deletions(-)

New commits:
commit 26b69a9d0f6ae454ccd57019a68ef96be2568ba5
Author: Rohan Kumar 
Date:   Mon Mar 7 19:57:40 2016 +0530

tdf#91794 Remove OSL_DEBUG_LEVEL > 1 conditionals

I removed the fprintf statements and replaced them with
SAL_WARN statements.

Change-Id: Id75e310e3a95b249fdf92a4dd5a9bcf1b7fb9be6
Reviewed-on: https://gerrit.libreoffice.org/22984
Tested-by: Jenkins 
Reviewed-by: jan iversen 

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index d2de637..3387889 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -386,6 +386,10 @@ certain functionality.
 @li @c unotools.misc
 @li @c unotools.ucbhelper
 
+@section unodevtools
+
+@li @c unodevtools
+
 @section URE
 
 @li @c rtl.string - ::rtl::OString, ::rtl::OUString, and related functionality
diff --git a/unodevtools/source/unodevtools/options.cxx 
b/unodevtools/source/unodevtools/options.cxx
index 8e0e870..fbbca04 100644
--- a/unodevtools/source/unodevtools/options.cxx
+++ b/unodevtools/source/unodevtools/options.cxx
@@ -27,14 +27,6 @@
 namespace unodevtools {
 
 
-#if OSL_DEBUG_LEVEL > 1
-static void out( const sal_Char * pText )
-{
-fprintf( stderr, pText );
-}
-#endif
-
-
 bool readOption( OUString * pValue, const sal_Char * pOpt,
  sal_uInt32 * pnIndex, const OUString & aArg)
 {
@@ -58,25 +50,13 @@ bool readOption( OUString * pValue, const sal_Char * pOpt,
 throw CannotDumpException(
 "incomplete option \"-" + aOpt + "\" given!");
 } else {
-#if OSL_DEBUG_LEVEL > 1
-out( "\n> identified option -" );
-out( pOpt );
-out( " = " );
-OString tmp = OUStringToOString(*pValue, 
RTL_TEXTENCODING_ASCII_US);
-  out( tmp.getStr() );
-#endif
+SAL_INFO("unodevtools", "> identified option -" << pOpt << " = " 
<< *pValue);
 ++(*pnIndex);
 return true;
 }
 } else if (aArg.indexOf(aOpt) == 1) {
 *pValue = aArg.copy(1 + aOpt.getLength());
-#if OSL_DEBUG_LEVEL > 1
-out( "\n> identified option -" );
-out( pOpt );
-out( " = " );
-OString tmp = OUStringToOString(*pValue, RTL_TEXTENCODING_ASCII_US);
-out( tmp.getStr() );
-#endif
+SAL_INFO("unodevtools", "> identified option -" << pOpt << " = " << 
*pValue);
 ++(*pnIndex);
 
 return true;
@@ -95,10 +75,7 @@ bool readOption( sal_Bool * pbOpt, const sal_Char * pOpt,
 {
 ++(*pnIndex);
 *pbOpt = sal_True;
-#if OSL_DEBUG_LEVEL > 1
-out( "\n> identified option --" );
-out( pOpt );
-#endif
+SAL_INFO("unodevtools", "> identified option --" << pOpt);
 return true;
 }
 return false;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-04 Thread Stephan Bergmann
 include/sal/log-areas.dox |1 -
 sal/osl/w32/socket.cxx|4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)

New commits:
commit d7c4c45bc8daa9e3dffe2d5d6557c250f1d683c0
Author: Stephan Bergmann 
Date:   Fri Mar 4 12:35:42 2016 +0100

Use existing "sal.osl" log area

Change-Id: I7d48c1543b0d3239c8e646ca0765421f933cfecc

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 3bc2ace..d2de637 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -30,7 +30,6 @@ certain functionality.
 @li @c sal.rtl - SAL RTL library
 @li @c sal.rtl.xub - SAL RTL warnings related to possible String->OUString 
conversion issues.
 @li @c sal.textenc - the textencoding SAL library
-@li @c sal.w32
 
 @section basctl
 
diff --git a/sal/osl/w32/socket.cxx b/sal/osl/w32/socket.cxx
index e3aad35..a0d1340 100644
--- a/sal/osl/w32/socket.cxx
+++ b/sal/osl/w32/socket.cxx
@@ -412,8 +412,8 @@ struct LeakWarning
 {
 ~LeakWarning()
 {
-SAL_WARN_IF( g_nSocketImpl, "sal.w32", "sal_socket: " << g_nSocketImpl 
<< " socket instances leak" );
-SAL_WARN_IF( g_nSocketAddr, "sal.w32", "sal_socket: " << g_nSocketAddr 
<< " socket address instances leak" );
+SAL_WARN_IF( g_nSocketImpl, "sal.osl", "sal_socket: " << g_nSocketImpl 
<< " socket instances leak" );
+SAL_WARN_IF( g_nSocketAddr, "sal.osl", "sal_socket: " << g_nSocketAddr 
<< " socket address instances leak" );
 }
 };
 LeakWarning socketWarning;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-04 Thread Stephan Bergmann
 include/sal/log-areas.dox |1 -
 1 file changed, 1 deletion(-)

New commits:
commit c3ab4e1970c1dcd260985fe92ffade8a60459e72
Author: Stephan Bergmann 
Date:   Fri Mar 4 12:31:13 2016 +0100

sal/test/testbootstrap.cxx is dead test code

...so no need to add dead log areas here (as questionably introduced with
f59136a2ed1e3eb01cc5b62c5a7da07c34cbdfae "tdf#91794 remove OSL_DEBUG_LEVEL 
> 1
conditionals")

Change-Id: Id0544a76f9c426bc06e327f0f2ec2d421da1fa50

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 6ed94fb..3bc2ace 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -31,7 +31,6 @@ certain functionality.
 @li @c sal.rtl.xub - SAL RTL warnings related to possible String->OUString 
conversion issues.
 @li @c sal.textenc - the textencoding SAL library
 @li @c sal.w32
-@li @c sal.test
 
 @section basctl
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-04 Thread Stephan Bergmann
 include/sal/log-areas.dox   |1 -
 sal/qa/rtl/doublelock/rtl_doublelocking.cxx |   15 ---
 2 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit d35eac83abff0a8860cd31c6e08b294e5ee8688f
Author: Stephan Bergmann 
Date:   Fri Mar 4 12:19:10 2016 +0100

This is test code, OK to unconditionally print to stdout

...and where appropriate use CPPUNIT_ASSERT_EQUAL to have no need to always
print out certain values

Change-Id: Iad2ccb235b09852fffd3f010cf069c45b36e2d4b

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 1ccf4b1..6ed94fb 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -32,7 +32,6 @@ certain functionality.
 @li @c sal.textenc - the textencoding SAL library
 @li @c sal.w32
 @li @c sal.test
-@li @c sal.doublelock
 
 @section basctl
 
diff --git a/sal/qa/rtl/doublelock/rtl_doublelocking.cxx 
b/sal/qa/rtl/doublelock/rtl_doublelocking.cxx
index 8678ee0..164e4a5 100644
--- a/sal/qa/rtl/doublelock/rtl_doublelocking.cxx
+++ b/sal/qa/rtl/doublelock/rtl_doublelocking.cxx
@@ -17,7 +17,9 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-// include files
+#include 
+
+#include 
 
 #include 
 
@@ -190,24 +192,23 @@ namespace rtl_DoubleLocking
 sal_Int32 nValueOK2 = 0;
 nValueOK2 = p2Thread->getOK();
 
-SAL_INFO("sal.doublelock", "Value in Thread #1 is " << 
nValueOK);
-SAL_INFO("sal.doublelock", "Value in Thread #2 is " << 
nValueOK2);
+std::cout << "Value in Thread #1 is " << nValueOK << "\n";
+std::cout << "Value in Thread #2 is " << nValueOK2 << "\n";
 sal_Int32 nValueFails = 0;
 nValueFails = pThread->getFails();
 
 sal_Int32 nValueFails2 = 0;
 nValueFails2 = p2Thread->getFails();
 
-SAL_INFO("sal.doublelock", "Fails in Thread #1 is " << 
nValueFails);
-SAL_INFO("sal.doublelock", "Fails in Thead #2 is " << 
nValueFails2);
-
 delete pThread;
 delete p2Thread;
 
 CPPUNIT_ASSERT_MESSAGE(
 "getValue() failed, wrong value expected.",
-nValueOK != 0 && nValueFails == 0 && nValueFails2 == 0
+nValueOK != 0
 );
+CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nValueFails);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nValueFails2);
 }
 
 CPPUNIT_TEST_SUITE(getValue);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


  1   2   >