[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-1' - 2 commits - external/postgresql officecfg/registry sfx2/source

2021-02-03 Thread Samuel Mehrbrodt (via logerrit)
 external/postgresql/ExternalProject_postgresql.mk  |4 +++-
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |6 ++
 sfx2/source/doc/objstor.cxx|4 +++-
 3 files changed, 12 insertions(+), 2 deletions(-)

New commits:
commit fc1bb2e5271f4810f7abebaf84eb6d839a3f3e43
Author: Samuel Mehrbrodt 
AuthorDate: Tue Feb 4 10:36:09 2020 +0100
Commit: Thorsten Behrens 
CommitDate: Wed Feb 3 23:59:23 2021 +0100

Allow opt-out from document events check

Commit b3edf85e0fe6ca03dc26e1bf531be82193bc9627 added a warning on load
when a document binds events to a macro.

This adds an option to restore the old behavior, so that the warning only
appears when a document actually has Macros.

Change-Id: I5ad398d3d503a0954a746f4cba150f68630b820c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108141
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 

diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index 2830a61082ba..cf4154524599 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -2668,6 +2668,12 @@
   
   false
 
+
+  
+Warn on load when a document binds an event to a macro
+  
+  true
+
 
   
 List with trusted authors.
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 4df362520b10..6daa9d5e507d 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -3591,7 +3591,9 @@ void SfxObjectShell::SetMacroCallsSeenWhileLoading()
 
 bool SfxObjectShell::GetMacroCallsSeenWhileLoading() const
 {
-return pImpl->m_bMacroCallsSeenWhileLoading;
+if 
(officecfg::Office::Common::Security::Scripting::CheckDocumentEvents::get())
+return pImpl->m_bMacroCallsSeenWhileLoading;
+return false;
 }
 
 bool SfxObjectShell::QuerySaveSizeExceededModules_Impl( const uno::Reference< 
task::XInteractionHandler >& xHandler )
commit 02c1cd9f93e5b5da469e9d6ff8668f415965ecfc
Author: Michael Stahl 
AuthorDate: Wed Feb 3 18:59:41 2021 +0100
Commit: Thorsten Behrens 
CommitDate: Wed Feb 3 23:23:40 2021 +0100

postgresql: try to cargo-cult MSBuild arguments

Extremely unclear to me whether these are useful or necessary,
but the other MSBuild ones have them.

Change-Id: Iacdd1a1e326bd9ae7c918f5b143495f613ff41d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110385
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/external/postgresql/ExternalProject_postgresql.mk 
b/external/postgresql/ExternalProject_postgresql.mk
index 1e0c7d848047..151b62397dd4 100644
--- a/external/postgresql/ExternalProject_postgresql.mk
+++ b/external/postgresql/ExternalProject_postgresql.mk
@@ -24,7 +24,9 @@ $(eval $(call gb_ExternalProject_use_nmake,postgresql,build))
 
 $(call gb_ExternalProject_get_state_target,postgresql,build) :
$(call gb_ExternalProject_run,build,\
-   MSBFLAGS=/p:Platform=$(if $(filter 
X86_64,$(CPUNAME)),x64,Win32) \
+   MSBFLAGS="/p:Platform=$(if $(filter 
X86_64,$(CPUNAME)),x64,Win32) \
+   $(if $(filter 160,$(VCVER)),/p:PlatformToolset=v142 
/p:VisualStudioVersion=16.0 /ToolsVersion:Current) \
+   $(if $(filter 
10,$(WINDOWS_SDK_VERSION)),/p:WindowsTargetPlatformVersion=$(UCRTVERSION))" \
$(PERL) build.pl $(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release) 
libpq \
,src/tools/msvc)
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - include/sfx2 include/svtools sfx2/source svtools/inc

2021-02-02 Thread Samuel Mehrbrodt (via logerrit)
 include/sfx2/docmacromode.hxx|7 +--
 include/svtools/sfxecode.hxx |1 +
 sfx2/source/doc/docmacromode.cxx |   23 +++
 sfx2/source/doc/objmisc.cxx  |5 +++--
 svtools/inc/errtxt.hrc   |1 +
 5 files changed, 29 insertions(+), 8 deletions(-)

New commits:
commit 91cf71e27e7a317b002697b1e54b749599e1d982
Author: Samuel Mehrbrodt 
AuthorDate: Mon Jan 18 15:24:48 2021 +0100
Commit: Andras Timar 
CommitDate: Tue Feb 2 20:08:53 2021 +0100

Improve macro checks

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109552
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 
(cherry picked from commit 1dc71daf7fa7204a98c75dac680af664ab9c8edb)

Change-Id: Ie40801df8866b52c1458e020ffa9cba120720af7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110076
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/include/sfx2/docmacromode.hxx b/include/sfx2/docmacromode.hxx
index a15bbbe9ba56..bd4f13fb016c 100644
--- a/include/sfx2/docmacromode.hxx
+++ b/include/sfx2/docmacromode.hxx
@@ -220,7 +220,8 @@ namespace sfx2
  if and only if macro execution in this document is 
allowed.
 */
 booladjustMacroMode(
-const css::uno::Reference< css::task::XInteractionHandler 
>& _rxInteraction
+const css::uno::Reference< css::task::XInteractionHandler 
>& _rxInteraction,
+bool bHasValidContentSignature = false
 );
 
 /** determines whether macro execution is disallowed
@@ -286,11 +287,13 @@ namespace sfx2
 */
 bool
 checkMacrosOnLoading(
-const css::uno::Reference< css::task::XInteractionHandler 
>& _rxInteraction
+const css::uno::Reference< css::task::XInteractionHandler 
>& _rxInteraction,
+bool bHasValidContentSignature = false
 );
 
 private:
 std::shared_ptr< DocumentMacroMode_Data >   m_xData;
+bool m_bNeedsContentSigned;
 };
 
 
diff --git a/include/svtools/sfxecode.hxx b/include/svtools/sfxecode.hxx
index 3cdad87f4cd9..ccdccae9014b 100644
--- a/include/svtools/sfxecode.hxx
+++ b/include/svtools/sfxecode.hxx
@@ -37,6 +37,7 @@ class ErrCode;
 #define ERRCODE_SFX_CANTCREATEBACKUPErrCode(ErrCodeArea::Sfx, 
ErrCodeClass::Create, 50)
 #define ERRCODE_SFX_MACROS_SUPPORT_DISABLED ErrCode(WarningFlag::Yes, 
ErrCodeArea::Sfx, ErrCodeClass::NONE, 51)
 #define ERRCODE_SFX_DOCUMENT_MACRO_DISABLED ErrCode(WarningFlag::Yes, 
ErrCodeArea::Sfx, ErrCodeClass::NONE, 52)
+#define ERRCODE_SFX_DOCUMENT_MACRO_DISABLED_CONTENT_UNSIGNED 
ErrCode(WarningFlag::Yes, ErrCodeArea::Sfx, ErrCodeClass::NONE, 53)
 #define ERRCODE_SFX_SHARED_NOPASSWORDCHANGE ErrCode(WarningFlag::Yes, 
ErrCodeArea::Sfx, ErrCodeClass::NONE, 54)
 #define ERRCODE_SFX_INCOMPLETE_ENCRYPTION   ErrCode(WarningFlag::Yes, 
ErrCodeArea::Sfx, ErrCodeClass::NONE, 55)
 #define ERRCODE_SFX_DOCUMENT_MACRO_DISABLED_MAC \
diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx
index 492bd0a63009..2fa7b968fc41 100644
--- a/sfx2/source/doc/docmacromode.cxx
+++ b/sfx2/source/doc/docmacromode.cxx
@@ -113,6 +113,10 @@ namespace sfx2
 #endif
 }
 
+void lcl_showMacrosDisabledUnsignedContentError( const Reference< 
XInteractionHandler >& rxHandler, bool& rbAlreadyShown )
+{
+lcl_showGeneralSfxErrorOnce( rxHandler, 
ERRCODE_SFX_DOCUMENT_MACRO_DISABLED_CONTENT_UNSIGNED, rbAlreadyShown );
+}
 
 bool lcl_showMacroWarning( const Reference< XInteractionHandler >& 
rxHandler,
 const OUString& rDocumentLocation )
@@ -125,7 +129,8 @@ namespace sfx2
 
 //= DocumentMacroMode
 DocumentMacroMode::DocumentMacroMode( IMacroDocumentAccess& 
rDocumentAccess )
-:m_xData( new DocumentMacroMode_Data( rDocumentAccess ) )
+:m_xData( new DocumentMacroMode_Data( rDocumentAccess ) ),
+m_bNeedsContentSigned(false)
 {
 }
 
@@ -141,7 +146,7 @@ namespace sfx2
 return false;
 }
 
-bool DocumentMacroMode::adjustMacroMode( const Reference< 
XInteractionHandler >& rxInteraction )
+bool DocumentMacroMode::adjustMacroMode( const Reference< 
XInteractionHandler >& rxInteraction, bool bHasValidContentSignature )
 {
 sal_uInt16 nMacroExecutionMode = 
m_xData->m_rDocumentAccess.getCurrentMacroExecMode();
 
@@ -238,6 +243,14 @@ namespace sfx2
 lcl_showDocumentMacrosDisabledError(rxInteraction, 
m_xData->m_bDocMacroDisabledMessageShown);
 return disallowMacroExecution();
 }
+else if ( 
m_xData->m_rDocumentAccess.macroCallsSeenWhileLoading() &&
+  bHasTrustedMacroSignature &&am

[Libreoffice-commits] core.git: Branch 'distro/nisz/libreoffice-7-0' - include/sfx2 include/svtools sfx2/source svtools/inc

2021-02-01 Thread Samuel Mehrbrodt (via logerrit)
 include/sfx2/docmacromode.hxx|7 +--
 include/svtools/sfxecode.hxx |1 +
 sfx2/source/doc/docmacromode.cxx |   23 +++
 sfx2/source/doc/objmisc.cxx  |5 +++--
 svtools/inc/errtxt.hrc   |1 +
 5 files changed, 29 insertions(+), 8 deletions(-)

New commits:
commit 8f6aaa38d7dfe527a113d7b483bd80d3c4fbde30
Author: Samuel Mehrbrodt 
AuthorDate: Mon Jan 18 15:24:48 2021 +0100
Commit: Gabor Kelemen 
CommitDate: Mon Feb 1 21:32:31 2021 +0100

Improve macro checks

Change-Id: Ie40801df8866b52c1458e020ffa9cba120720af7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109552
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 
(cherry picked from commit 1dc71daf7fa7204a98c75dac680af664ab9c8edb)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110059
Tested-by: Gabor Kelemen 
Reviewed-by: Gabor Kelemen 

diff --git a/include/sfx2/docmacromode.hxx b/include/sfx2/docmacromode.hxx
index a15bbbe9ba56..bd4f13fb016c 100644
--- a/include/sfx2/docmacromode.hxx
+++ b/include/sfx2/docmacromode.hxx
@@ -220,7 +220,8 @@ namespace sfx2
  if and only if macro execution in this document is 
allowed.
 */
 booladjustMacroMode(
-const css::uno::Reference< css::task::XInteractionHandler 
>& _rxInteraction
+const css::uno::Reference< css::task::XInteractionHandler 
>& _rxInteraction,
+bool bHasValidContentSignature = false
 );
 
 /** determines whether macro execution is disallowed
@@ -286,11 +287,13 @@ namespace sfx2
 */
 bool
 checkMacrosOnLoading(
-const css::uno::Reference< css::task::XInteractionHandler 
>& _rxInteraction
+const css::uno::Reference< css::task::XInteractionHandler 
>& _rxInteraction,
+bool bHasValidContentSignature = false
 );
 
 private:
 std::shared_ptr< DocumentMacroMode_Data >   m_xData;
+bool m_bNeedsContentSigned;
 };
 
 
diff --git a/include/svtools/sfxecode.hxx b/include/svtools/sfxecode.hxx
index 3cdad87f4cd9..ccdccae9014b 100644
--- a/include/svtools/sfxecode.hxx
+++ b/include/svtools/sfxecode.hxx
@@ -37,6 +37,7 @@ class ErrCode;
 #define ERRCODE_SFX_CANTCREATEBACKUPErrCode(ErrCodeArea::Sfx, 
ErrCodeClass::Create, 50)
 #define ERRCODE_SFX_MACROS_SUPPORT_DISABLED ErrCode(WarningFlag::Yes, 
ErrCodeArea::Sfx, ErrCodeClass::NONE, 51)
 #define ERRCODE_SFX_DOCUMENT_MACRO_DISABLED ErrCode(WarningFlag::Yes, 
ErrCodeArea::Sfx, ErrCodeClass::NONE, 52)
+#define ERRCODE_SFX_DOCUMENT_MACRO_DISABLED_CONTENT_UNSIGNED 
ErrCode(WarningFlag::Yes, ErrCodeArea::Sfx, ErrCodeClass::NONE, 53)
 #define ERRCODE_SFX_SHARED_NOPASSWORDCHANGE ErrCode(WarningFlag::Yes, 
ErrCodeArea::Sfx, ErrCodeClass::NONE, 54)
 #define ERRCODE_SFX_INCOMPLETE_ENCRYPTION   ErrCode(WarningFlag::Yes, 
ErrCodeArea::Sfx, ErrCodeClass::NONE, 55)
 #define ERRCODE_SFX_DOCUMENT_MACRO_DISABLED_MAC \
diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx
index bbb3b629de2b..c49f7cec00c6 100644
--- a/sfx2/source/doc/docmacromode.cxx
+++ b/sfx2/source/doc/docmacromode.cxx
@@ -111,6 +111,10 @@ namespace sfx2
 #endif
 }
 
+void lcl_showMacrosDisabledUnsignedContentError( const Reference< 
XInteractionHandler >& rxHandler, bool& rbAlreadyShown )
+{
+lcl_showGeneralSfxErrorOnce( rxHandler, 
ERRCODE_SFX_DOCUMENT_MACRO_DISABLED_CONTENT_UNSIGNED, rbAlreadyShown );
+}
 
 bool lcl_showMacroWarning( const Reference< XInteractionHandler >& 
rxHandler,
 const OUString& rDocumentLocation )
@@ -123,7 +127,8 @@ namespace sfx2
 
 //= DocumentMacroMode
 DocumentMacroMode::DocumentMacroMode( IMacroDocumentAccess& 
rDocumentAccess )
-:m_xData( std::make_shared( rDocumentAccess ) )
+:m_xData( std::make_shared( rDocumentAccess ) 
),
+m_bNeedsContentSigned(false)
 {
 }
 
@@ -139,7 +144,7 @@ namespace sfx2
 return false;
 }
 
-bool DocumentMacroMode::adjustMacroMode( const Reference< 
XInteractionHandler >& rxInteraction )
+bool DocumentMacroMode::adjustMacroMode( const Reference< 
XInteractionHandler >& rxInteraction, bool bHasValidContentSignature )
 {
 sal_uInt16 nMacroExecutionMode = 
m_xData->m_rDocumentAccess.getCurrentMacroExecMode();
 
@@ -237,6 +242,14 @@ namespace sfx2
 lcl_showDocumentMacrosDisabledError(rxInteraction, 
m_xData->m_bDocMacroDisabledMessageShown);
 return disallowMacroExecution();
 }
+else if ( 
m_xData->m_rDocumentAccess.macroCallsSeenWhileLoading() &&
+  bHasTrustedMacroSignature &&
+  !bHasValidC

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

2021-01-31 Thread Samuel Mehrbrodt (via logerrit)
 sfx2/source/doc/objmisc.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7140cd40170d60c65672b45ce634f9a35948f108
Author: Samuel Mehrbrodt 
AuthorDate: Thu Jan 28 13:50:30 2021 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Mon Feb 1 07:29:04 2021 +0100

Fix TODO: Remove parameter

Left-over from 1dc71daf7fa7204a98c75dac680af664ab9c8edb

At this point macros are already disabled when content signature is
missing or invalid, and this call does not change it.

Change-Id: I5a609c07dea115d45fa8f71195b2455c13381e73
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110078
Tested-by: Samuel Mehrbrodt 
Reviewed-by: Samuel Mehrbrodt 

diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 5148ed0c62b6..90758ff28bf7 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -1599,7 +1599,7 @@ bool SfxObjectShell::AdjustMacroMode()
 
 CheckEncryption_Impl( xInteraction );
 
-return pImpl->aMacroMode.adjustMacroMode( xInteraction, true /*TODO*/ );
+return pImpl->aMacroMode.adjustMacroMode( xInteraction );
 }
 
 vcl::Window* SfxObjectShell::GetDialogParent( SfxMedium const * pLoadingMedium 
)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-01-31 Thread Samuel Mehrbrodt (via logerrit)
 include/sfx2/docmacromode.hxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 994cf0e0994dcd4a7ba2b984f9840110ab43a295
Author: Samuel Mehrbrodt 
AuthorDate: Thu Jan 28 13:50:18 2021 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Mon Feb 1 07:13:56 2021 +0100

Document parameter

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

diff --git a/include/sfx2/docmacromode.hxx b/include/sfx2/docmacromode.hxx
index aa120240688e..c5a3c89702e4 100644
--- a/include/sfx2/docmacromode.hxx
+++ b/include/sfx2/docmacromode.hxx
@@ -216,6 +216,9 @@ namespace sfx2
 this parameter is , the most defensive assumptions will 
be made,
 effectively disabling macro execution.
 
+@param bHasValidContentSignature
+Whether the document content is signed and the signature is 
valid.
+
 @return
  if and only if macro execution in this document is 
allowed.
 */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - include/sfx2 include/svtools sfx2/source svtools/inc

2021-01-30 Thread Samuel Mehrbrodt (via logerrit)
 include/sfx2/docmacromode.hxx|7 +--
 include/svtools/sfxecode.hxx |1 +
 sfx2/source/doc/docmacromode.cxx |   23 +++
 sfx2/source/doc/objmisc.cxx  |5 +++--
 svtools/inc/errtxt.hrc   |1 +
 5 files changed, 29 insertions(+), 8 deletions(-)

New commits:
commit fe69915020518bcee87e29e3623ad50a73b9b5da
Author: Samuel Mehrbrodt 
AuthorDate: Mon Jan 18 15:24:48 2021 +0100
Commit: Christian Lohmaier 
CommitDate: Sat Jan 30 14:18:32 2021 +0100

Improve macro checks

Change-Id: Ie40801df8866b52c1458e020ffa9cba120720af7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109552
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 
(cherry picked from commit 1dc71daf7fa7204a98c75dac680af664ab9c8edb)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110056
Reviewed-by: Michael Stahl 
Reviewed-by: Christian Lohmaier 

diff --git a/include/sfx2/docmacromode.hxx b/include/sfx2/docmacromode.hxx
index 9533518bee9d..aa120240688e 100644
--- a/include/sfx2/docmacromode.hxx
+++ b/include/sfx2/docmacromode.hxx
@@ -220,7 +220,8 @@ namespace sfx2
  if and only if macro execution in this document is 
allowed.
 */
 booladjustMacroMode(
-const css::uno::Reference< css::task::XInteractionHandler 
>& _rxInteraction
+const css::uno::Reference< css::task::XInteractionHandler 
>& _rxInteraction,
+bool bHasValidContentSignature = false
 );
 
 /** determines whether macro execution is disallowed
@@ -286,11 +287,13 @@ namespace sfx2
 */
 bool
 checkMacrosOnLoading(
-const css::uno::Reference< css::task::XInteractionHandler 
>& _rxInteraction
+const css::uno::Reference< css::task::XInteractionHandler 
>& _rxInteraction,
+bool bHasValidContentSignature = false
 );
 
 private:
 std::shared_ptr< DocumentMacroMode_Data >   m_xData;
+bool m_bNeedsContentSigned;
 };
 
 
diff --git a/include/svtools/sfxecode.hxx b/include/svtools/sfxecode.hxx
index a57c6b9e966f..fe6f26dc3623 100644
--- a/include/svtools/sfxecode.hxx
+++ b/include/svtools/sfxecode.hxx
@@ -36,6 +36,7 @@ class ErrCode;
 #define ERRCODE_SFX_CANTCREATEBACKUPErrCode(ErrCodeArea::Sfx, 
ErrCodeClass::Create, 50)
 #define ERRCODE_SFX_MACROS_SUPPORT_DISABLED ErrCode(WarningFlag::Yes, 
ErrCodeArea::Sfx, ErrCodeClass::NONE, 51)
 #define ERRCODE_SFX_DOCUMENT_MACRO_DISABLED ErrCode(WarningFlag::Yes, 
ErrCodeArea::Sfx, ErrCodeClass::NONE, 52)
+#define ERRCODE_SFX_DOCUMENT_MACRO_DISABLED_CONTENT_UNSIGNED 
ErrCode(WarningFlag::Yes, ErrCodeArea::Sfx, ErrCodeClass::NONE, 53)
 #define ERRCODE_SFX_SHARED_NOPASSWORDCHANGE ErrCode(WarningFlag::Yes, 
ErrCodeArea::Sfx, ErrCodeClass::NONE, 54)
 #define ERRCODE_SFX_INCOMPLETE_ENCRYPTION   ErrCode(WarningFlag::Yes, 
ErrCodeArea::Sfx, ErrCodeClass::NONE, 55)
 #define ERRCODE_SFX_DOCUMENT_MACRO_DISABLED_MAC \
diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx
index bbb3b629de2b..c49f7cec00c6 100644
--- a/sfx2/source/doc/docmacromode.cxx
+++ b/sfx2/source/doc/docmacromode.cxx
@@ -111,6 +111,10 @@ namespace sfx2
 #endif
 }
 
+void lcl_showMacrosDisabledUnsignedContentError( const Reference< 
XInteractionHandler >& rxHandler, bool& rbAlreadyShown )
+{
+lcl_showGeneralSfxErrorOnce( rxHandler, 
ERRCODE_SFX_DOCUMENT_MACRO_DISABLED_CONTENT_UNSIGNED, rbAlreadyShown );
+}
 
 bool lcl_showMacroWarning( const Reference< XInteractionHandler >& 
rxHandler,
 const OUString& rDocumentLocation )
@@ -123,7 +127,8 @@ namespace sfx2
 
 //= DocumentMacroMode
 DocumentMacroMode::DocumentMacroMode( IMacroDocumentAccess& 
rDocumentAccess )
-:m_xData( std::make_shared( rDocumentAccess ) )
+:m_xData( std::make_shared( rDocumentAccess ) 
),
+m_bNeedsContentSigned(false)
 {
 }
 
@@ -139,7 +144,7 @@ namespace sfx2
 return false;
 }
 
-bool DocumentMacroMode::adjustMacroMode( const Reference< 
XInteractionHandler >& rxInteraction )
+bool DocumentMacroMode::adjustMacroMode( const Reference< 
XInteractionHandler >& rxInteraction, bool bHasValidContentSignature )
 {
 sal_uInt16 nMacroExecutionMode = 
m_xData->m_rDocumentAccess.getCurrentMacroExecMode();
 
@@ -237,6 +242,14 @@ namespace sfx2
 lcl_showDocumentMacrosDisabledError(rxInteraction, 
m_xData->m_bDocMacroDisabledMessageShown);
 return disallowMacroExecution();
 }
+else if ( 
m_xData->m_rDocumentAccess.macroCallsSeenWhileLoading() &&
+  bHasTrustedMacroSignature &&
+ 

[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - include/sfx2 include/svtools sfx2/source svtools/inc

2021-01-30 Thread Samuel Mehrbrodt (via logerrit)
 include/sfx2/docmacromode.hxx|7 +--
 include/svtools/sfxecode.hxx |1 +
 sfx2/source/doc/docmacromode.cxx |   23 +++
 sfx2/source/doc/objmisc.cxx  |5 +++--
 svtools/inc/errtxt.hrc   |1 +
 5 files changed, 29 insertions(+), 8 deletions(-)

New commits:
commit 4e328f614a85802f1625d9faa7fc4f74f87bc58d
Author: Samuel Mehrbrodt 
AuthorDate: Mon Jan 18 15:24:48 2021 +0100
Commit: Christian Lohmaier 
CommitDate: Sat Jan 30 14:17:47 2021 +0100

Improve macro checks

Change-Id: Ie40801df8866b52c1458e020ffa9cba120720af7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109552
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 
(cherry picked from commit 1dc71daf7fa7204a98c75dac680af664ab9c8edb)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110057
Reviewed-by: Michael Stahl 
Reviewed-by: Christian Lohmaier 

diff --git a/include/sfx2/docmacromode.hxx b/include/sfx2/docmacromode.hxx
index a15bbbe9ba56..bd4f13fb016c 100644
--- a/include/sfx2/docmacromode.hxx
+++ b/include/sfx2/docmacromode.hxx
@@ -220,7 +220,8 @@ namespace sfx2
  if and only if macro execution in this document is 
allowed.
 */
 booladjustMacroMode(
-const css::uno::Reference< css::task::XInteractionHandler 
>& _rxInteraction
+const css::uno::Reference< css::task::XInteractionHandler 
>& _rxInteraction,
+bool bHasValidContentSignature = false
 );
 
 /** determines whether macro execution is disallowed
@@ -286,11 +287,13 @@ namespace sfx2
 */
 bool
 checkMacrosOnLoading(
-const css::uno::Reference< css::task::XInteractionHandler 
>& _rxInteraction
+const css::uno::Reference< css::task::XInteractionHandler 
>& _rxInteraction,
+bool bHasValidContentSignature = false
 );
 
 private:
 std::shared_ptr< DocumentMacroMode_Data >   m_xData;
+bool m_bNeedsContentSigned;
 };
 
 
diff --git a/include/svtools/sfxecode.hxx b/include/svtools/sfxecode.hxx
index 3cdad87f4cd9..ccdccae9014b 100644
--- a/include/svtools/sfxecode.hxx
+++ b/include/svtools/sfxecode.hxx
@@ -37,6 +37,7 @@ class ErrCode;
 #define ERRCODE_SFX_CANTCREATEBACKUPErrCode(ErrCodeArea::Sfx, 
ErrCodeClass::Create, 50)
 #define ERRCODE_SFX_MACROS_SUPPORT_DISABLED ErrCode(WarningFlag::Yes, 
ErrCodeArea::Sfx, ErrCodeClass::NONE, 51)
 #define ERRCODE_SFX_DOCUMENT_MACRO_DISABLED ErrCode(WarningFlag::Yes, 
ErrCodeArea::Sfx, ErrCodeClass::NONE, 52)
+#define ERRCODE_SFX_DOCUMENT_MACRO_DISABLED_CONTENT_UNSIGNED 
ErrCode(WarningFlag::Yes, ErrCodeArea::Sfx, ErrCodeClass::NONE, 53)
 #define ERRCODE_SFX_SHARED_NOPASSWORDCHANGE ErrCode(WarningFlag::Yes, 
ErrCodeArea::Sfx, ErrCodeClass::NONE, 54)
 #define ERRCODE_SFX_INCOMPLETE_ENCRYPTION   ErrCode(WarningFlag::Yes, 
ErrCodeArea::Sfx, ErrCodeClass::NONE, 55)
 #define ERRCODE_SFX_DOCUMENT_MACRO_DISABLED_MAC \
diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx
index bbb3b629de2b..c49f7cec00c6 100644
--- a/sfx2/source/doc/docmacromode.cxx
+++ b/sfx2/source/doc/docmacromode.cxx
@@ -111,6 +111,10 @@ namespace sfx2
 #endif
 }
 
+void lcl_showMacrosDisabledUnsignedContentError( const Reference< 
XInteractionHandler >& rxHandler, bool& rbAlreadyShown )
+{
+lcl_showGeneralSfxErrorOnce( rxHandler, 
ERRCODE_SFX_DOCUMENT_MACRO_DISABLED_CONTENT_UNSIGNED, rbAlreadyShown );
+}
 
 bool lcl_showMacroWarning( const Reference< XInteractionHandler >& 
rxHandler,
 const OUString& rDocumentLocation )
@@ -123,7 +127,8 @@ namespace sfx2
 
 //= DocumentMacroMode
 DocumentMacroMode::DocumentMacroMode( IMacroDocumentAccess& 
rDocumentAccess )
-:m_xData( std::make_shared( rDocumentAccess ) )
+:m_xData( std::make_shared( rDocumentAccess ) 
),
+m_bNeedsContentSigned(false)
 {
 }
 
@@ -139,7 +144,7 @@ namespace sfx2
 return false;
 }
 
-bool DocumentMacroMode::adjustMacroMode( const Reference< 
XInteractionHandler >& rxInteraction )
+bool DocumentMacroMode::adjustMacroMode( const Reference< 
XInteractionHandler >& rxInteraction, bool bHasValidContentSignature )
 {
 sal_uInt16 nMacroExecutionMode = 
m_xData->m_rDocumentAccess.getCurrentMacroExecMode();
 
@@ -237,6 +242,14 @@ namespace sfx2
 lcl_showDocumentMacrosDisabledError(rxInteraction, 
m_xData->m_bDocMacroDisabledMessageShown);
 return disallowMacroExecution();
 }
+else if ( 
m_xData->m_rDocumentAccess.macroCallsSeenWhileLoading() &&
+  bHasTrustedMacroSignature &&
+ 

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

2021-01-28 Thread Samuel Mehrbrodt (via logerrit)
 include/sfx2/docmacromode.hxx|7 +--
 include/svtools/sfxecode.hxx |1 +
 sfx2/source/doc/docmacromode.cxx |   23 +++
 sfx2/source/doc/objmisc.cxx  |5 +++--
 svtools/inc/errtxt.hrc   |1 +
 5 files changed, 29 insertions(+), 8 deletions(-)

New commits:
commit 1dc71daf7fa7204a98c75dac680af664ab9c8edb
Author: Samuel Mehrbrodt 
AuthorDate: Mon Jan 18 15:24:48 2021 +0100
Commit: Thorsten Behrens 
CommitDate: Thu Jan 28 12:45:30 2021 +0100

Improve macro checks

Change-Id: Ie40801df8866b52c1458e020ffa9cba120720af7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109552
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/include/sfx2/docmacromode.hxx b/include/sfx2/docmacromode.hxx
index 9533518bee9d..aa120240688e 100644
--- a/include/sfx2/docmacromode.hxx
+++ b/include/sfx2/docmacromode.hxx
@@ -220,7 +220,8 @@ namespace sfx2
  if and only if macro execution in this document is 
allowed.
 */
 booladjustMacroMode(
-const css::uno::Reference< css::task::XInteractionHandler 
>& _rxInteraction
+const css::uno::Reference< css::task::XInteractionHandler 
>& _rxInteraction,
+bool bHasValidContentSignature = false
 );
 
 /** determines whether macro execution is disallowed
@@ -286,11 +287,13 @@ namespace sfx2
 */
 bool
 checkMacrosOnLoading(
-const css::uno::Reference< css::task::XInteractionHandler 
>& _rxInteraction
+const css::uno::Reference< css::task::XInteractionHandler 
>& _rxInteraction,
+bool bHasValidContentSignature = false
 );
 
 private:
 std::shared_ptr< DocumentMacroMode_Data >   m_xData;
+bool m_bNeedsContentSigned;
 };
 
 
diff --git a/include/svtools/sfxecode.hxx b/include/svtools/sfxecode.hxx
index a57c6b9e966f..fe6f26dc3623 100644
--- a/include/svtools/sfxecode.hxx
+++ b/include/svtools/sfxecode.hxx
@@ -36,6 +36,7 @@ class ErrCode;
 #define ERRCODE_SFX_CANTCREATEBACKUPErrCode(ErrCodeArea::Sfx, 
ErrCodeClass::Create, 50)
 #define ERRCODE_SFX_MACROS_SUPPORT_DISABLED ErrCode(WarningFlag::Yes, 
ErrCodeArea::Sfx, ErrCodeClass::NONE, 51)
 #define ERRCODE_SFX_DOCUMENT_MACRO_DISABLED ErrCode(WarningFlag::Yes, 
ErrCodeArea::Sfx, ErrCodeClass::NONE, 52)
+#define ERRCODE_SFX_DOCUMENT_MACRO_DISABLED_CONTENT_UNSIGNED 
ErrCode(WarningFlag::Yes, ErrCodeArea::Sfx, ErrCodeClass::NONE, 53)
 #define ERRCODE_SFX_SHARED_NOPASSWORDCHANGE ErrCode(WarningFlag::Yes, 
ErrCodeArea::Sfx, ErrCodeClass::NONE, 54)
 #define ERRCODE_SFX_INCOMPLETE_ENCRYPTION   ErrCode(WarningFlag::Yes, 
ErrCodeArea::Sfx, ErrCodeClass::NONE, 55)
 #define ERRCODE_SFX_DOCUMENT_MACRO_DISABLED_MAC \
diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx
index bbb3b629de2b..c49f7cec00c6 100644
--- a/sfx2/source/doc/docmacromode.cxx
+++ b/sfx2/source/doc/docmacromode.cxx
@@ -111,6 +111,10 @@ namespace sfx2
 #endif
 }
 
+void lcl_showMacrosDisabledUnsignedContentError( const Reference< 
XInteractionHandler >& rxHandler, bool& rbAlreadyShown )
+{
+lcl_showGeneralSfxErrorOnce( rxHandler, 
ERRCODE_SFX_DOCUMENT_MACRO_DISABLED_CONTENT_UNSIGNED, rbAlreadyShown );
+}
 
 bool lcl_showMacroWarning( const Reference< XInteractionHandler >& 
rxHandler,
 const OUString& rDocumentLocation )
@@ -123,7 +127,8 @@ namespace sfx2
 
 //= DocumentMacroMode
 DocumentMacroMode::DocumentMacroMode( IMacroDocumentAccess& 
rDocumentAccess )
-:m_xData( std::make_shared( rDocumentAccess ) )
+:m_xData( std::make_shared( rDocumentAccess ) 
),
+m_bNeedsContentSigned(false)
 {
 }
 
@@ -139,7 +144,7 @@ namespace sfx2
 return false;
 }
 
-bool DocumentMacroMode::adjustMacroMode( const Reference< 
XInteractionHandler >& rxInteraction )
+bool DocumentMacroMode::adjustMacroMode( const Reference< 
XInteractionHandler >& rxInteraction, bool bHasValidContentSignature )
 {
 sal_uInt16 nMacroExecutionMode = 
m_xData->m_rDocumentAccess.getCurrentMacroExecMode();
 
@@ -237,6 +242,14 @@ namespace sfx2
 lcl_showDocumentMacrosDisabledError(rxInteraction, 
m_xData->m_bDocMacroDisabledMessageShown);
 return disallowMacroExecution();
 }
+else if ( 
m_xData->m_rDocumentAccess.macroCallsSeenWhileLoading() &&
+  bHasTrustedMacroSignature &&
+  !bHasValidContentSignature)
+{
+// When macros are signed, and the document has events 
which call macros, the document content needs to be signed to

[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-4' - sw/source

2021-01-28 Thread Samuel Mehrbrodt (via logerrit)
 sw/source/uibase/shells/basesh.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ad808ac375c200857026acbbabf862264e695887
Author: Samuel Mehrbrodt 
AuthorDate: Mon Jan 18 15:51:47 2021 +0100
Commit: Thorsten Behrens 
CommitDate: Thu Jan 28 12:44:39 2021 +0100

"Update all" should do a full reformatting

Change-Id: I05b06e4b345c2125f4fd5272fc6a3354396a29ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109554
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 4ecabed3ac5aff26bee6d195136ca819cbeb995c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109603
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 

diff --git a/sw/source/uibase/shells/basesh.cxx 
b/sw/source/uibase/shells/basesh.cxx
index 629424523126..545e9c78a89d 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -748,7 +748,7 @@ void SwBaseShell::Execute(SfxRequest )
 rDis.Execute( FN_UPDATE_FIELDS );
 rDis.Execute( FN_UPDATE_TOX );
 rDis.Execute( FN_UPDATE_CHARTS );
-rSh.CalcLayout();
+rSh.Reformat();
 }
 break;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-4' - sw/source

2021-01-28 Thread Samuel Mehrbrodt (via logerrit)
 sw/source/uibase/uno/unotxdoc.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit af1918a987be3578affa85b06cd2220c59108a27
Author: Samuel Mehrbrodt 
AuthorDate: Mon Jan 18 12:07:16 2021 +0100
Commit: Thorsten Behrens 
CommitDate: Thu Jan 28 12:44:19 2021 +0100

XTextDocument::refresh should do a full reformatting

Change-Id: Ia92e10e43cb8254b6dd35db03462b87d0fe93f45
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109538
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit cbbfed893616f804cb6557185ddda26c0cef2ed6)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109531
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 

diff --git a/sw/source/uibase/uno/unotxdoc.cxx 
b/sw/source/uibase/uno/unotxdoc.cxx
index e3d80b664deb..e5ce030ddaac 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -2232,7 +2232,7 @@ void SwXTextDocument::refresh()
 SwViewShell *pViewShell = pDocShell->GetWrtShell();
 NotifyRefreshListeners();
 if(pViewShell)
-pViewShell->CalcLayout();
+pViewShell->Reformat();
 }
 
 void SAL_CALL SwXTextDocument::addRefreshListener(
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-4' - officecfg/registry sw/source

2021-01-28 Thread Samuel Mehrbrodt (via logerrit)
 officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu |2 +-
 sw/source/uibase/uiview/view2.cxx   |1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 4697b9f7a4bab4357837d1212fbc57ba6e7c50b9
Author: Samuel Mehrbrodt 
AuthorDate: Tue Jan 12 13:22:37 2021 +0100
Commit: Thorsten Behrens 
CommitDate: Thu Jan 28 12:44:05 2021 +0100

Make uno:RefreshView redo the whole document layout

This is useful when encountering layout problems, to refresh
the doc layout from an extension.

Change-Id: Ie2472f061ebea203a9d876782b3bb953477de7c9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109169
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 51ef3a3af573287b03262e96bf8298bdbe06c44d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109506
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 

diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
index a41666bef3a6..1e3c642bea13 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
@@ -2528,7 +2528,7 @@
   
   
 
-  Restore View
+  Refresh document layout
 
   
   
diff --git a/sw/source/uibase/uiview/view2.cxx 
b/sw/source/uibase/uiview/view2.cxx
index be7a42416eae..ca91ba80828e 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -567,6 +567,7 @@ void SwView::Execute(SfxRequest )
 break;
 case FN_REFRESH_VIEW:
 GetEditWin().Invalidate();
+m_pWrtShell->Reformat();
 break;
 case FN_PAGEUP:
 case FN_PAGEUP_SEL:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-1' - sw/source

2021-01-20 Thread Samuel Mehrbrodt (via logerrit)
 sw/source/uibase/uno/unotxdoc.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b510f403f9fb9e429ffe9faccf78808d64c5f8b5
Author: Samuel Mehrbrodt 
AuthorDate: Mon Jan 18 12:07:16 2021 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Thu Jan 21 08:54:10 2021 +0100

XTextDocument::refresh should do a full reformatting

Change-Id: Ia92e10e43cb8254b6dd35db03462b87d0fe93f45
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109538
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit cbbfed893616f804cb6557185ddda26c0cef2ed6)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109572
Tested-by: Samuel Mehrbrodt 

diff --git a/sw/source/uibase/uno/unotxdoc.cxx 
b/sw/source/uibase/uno/unotxdoc.cxx
index 1db55d3c5831..1bbf2fc5a972 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -2246,7 +2246,7 @@ void SwXTextDocument::refresh()
 SwViewShell *pViewShell = pDocShell->GetWrtShell();
 NotifyRefreshListeners();
 if(pViewShell)
-pViewShell->CalcLayout();
+pViewShell->Reformat();
 }
 
 void SAL_CALL SwXTextDocument::addRefreshListener(
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-1' - sw/source

2021-01-20 Thread Samuel Mehrbrodt (via logerrit)
 sw/source/uibase/shells/basesh.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit aaa3358969cafe3edc2904599b69f7f3c6aee545
Author: Samuel Mehrbrodt 
AuthorDate: Mon Jan 18 15:51:47 2021 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Thu Jan 21 08:53:41 2021 +0100

"Update all" should do a full reformatting

Change-Id: I05b06e4b345c2125f4fd5272fc6a3354396a29ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109554
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 4ecabed3ac5aff26bee6d195136ca819cbeb995c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109604
Tested-by: Samuel Mehrbrodt 

diff --git a/sw/source/uibase/shells/basesh.cxx 
b/sw/source/uibase/shells/basesh.cxx
index 9bd0e475b43f..37018af937e0 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -676,7 +676,7 @@ void SwBaseShell::Execute(SfxRequest )
 rDis.Execute( FN_UPDATE_FIELDS );
 rDis.Execute( FN_UPDATE_TOX );
 rDis.Execute( FN_UPDATE_CHARTS );
-rSh.CalcLayout();
+rSh.Reformat();
 }
 break;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-1' - include/svx officecfg/registry sc/sdi sc/source svx/sdi sw/inc sw/sdi sw/source

2021-01-20 Thread Samuel Mehrbrodt (via logerrit)
 include/svx/svxids.hrc   |1 
 officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu |5 ++
 officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu  |5 --
 sc/sdi/docsh.sdi |2 +
 sc/source/ui/docshell/docsh3.cxx |5 ++
 sc/source/ui/docshell/docsh4.cxx |5 ++
 sc/source/ui/inc/docsh.hxx   |1 
 svx/sdi/svx.sdi  |   16 
+
 sw/inc/cmdid.h   |4 --
 sw/sdi/_viewsh.sdi   |2 -
 sw/sdi/swriter.sdi   |   17 
--
 sw/sdi/viewsh.sdi|2 -
 sw/source/uibase/uiview/pview.cxx|2 -
 sw/source/uibase/uiview/view2.cxx|2 -
 14 files changed, 40 insertions(+), 29 deletions(-)

New commits:
commit b524e70db6f01ed8bfe5dddb0401f8d1622c2d24
Author: Samuel Mehrbrodt 
AuthorDate: Wed Jan 13 13:50:39 2021 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Thu Jan 21 08:53:20 2021 +0100

Bring uno:RefreshView to Calc

Allow refreshing the document layout via UNO slot

Change-Id: I956bb884b1fb4231b1f617c4aa5a80ff9a45ec92
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109269
Tested-by: Samuel Mehrbrodt 
Reviewed-by: Samuel Mehrbrodt 

diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index 6c5ae5c13117..e9abb5be0672 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -652,6 +652,7 @@ class SfxStringItem;
 #define SID_FM_SHOW_DATANAVIGATOR   ( SID_SVX_START + 773 )
 #define SID_FM_DATANAVIGATOR_CONTROL( SID_SVX_START + 774 )
 #define SID_FM_REFRESH_FORM_CONTROL ( SID_SVX_START + 775 )
+#define SID_REFRESH_VIEW( SID_SVX_START + 776 )
 
 // CAUTION! Range <855 .. 855> used by EditEngine (!)
 
diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
index 4143da531483..f0fa6e973d3e 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
@@ -5712,6 +5712,11 @@
   1
 
   
+  
+
+  Refresh document layout
+
+  
   
 
   Find Record...
diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
index 286f44343fa9..dc37904c7c89 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
@@ -2373,11 +2373,6 @@
   1
 
   
-  
-
-  Restore View
-
-  
   
 
   Directly to Document End
diff --git a/sc/sdi/docsh.sdi b/sc/sdi/docsh.sdi
index fdb22acf3e0c..0ec807cf6d73 100644
--- a/sc/sdi/docsh.sdi
+++ b/sc/sdi/docsh.sdi
@@ -75,6 +75,8 @@ interface TableDocument
 SID_SHARE_DOC   [ ExecMethod = Execute; StateMethod = GetState; ]
 SID_NOTEBOOKBAR [ ExecMethod = Execute; StateMethod = GetState; ]
 SID_LANGUAGE_STATUS [ ExecMethod = Execute; StateMethod = GetState; ]
+
+SID_REFRESH_VIEW[ ExecMethod = Execute; StateMethod = GetState; ]
 }
 
 
diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx
index 028e24dc9bf8..303cefe1ee43 100644
--- a/sc/source/ui/docshell/docsh3.cxx
+++ b/sc/source/ui/docshell/docsh3.cxx
@@ -177,6 +177,11 @@ void ScDocShell::PostPaint( const ScRangeList& rRanges, 
PaintPartFlags nPart, sa
 }
 }
 
+void ScDocShell::PostPaintAll()
+{
+PostPaint(0, 0, 0, MAXCOL, MAXROW, MAXTAB, PaintPartFlags::All);
+}
+
 void ScDocShell::PostPaintGridAll()
 {
 PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PaintPartFlags::Grid );
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 853de4150c5b..52a44126539d 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -1252,6 +1252,11 @@ void ScDocShell::Execute( SfxRequest& rReq )
 }
 }
 break;
+case SID_REFRESH_VIEW:
+{
+PostPaintGridAll();
+}
+break;
 default:
 {
 // small (?) hack -> forwarding of the slots to TabViewShell
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index 5b990f24e6a6..c81e40fcaf11 100644
--- a/sc/source/ui/inc/docsh.hxx
+

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

2021-01-18 Thread Samuel Mehrbrodt (via logerrit)
 sw/source/uibase/shells/basesh.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4ecabed3ac5aff26bee6d195136ca819cbeb995c
Author: Samuel Mehrbrodt 
AuthorDate: Mon Jan 18 15:51:47 2021 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Tue Jan 19 07:42:47 2021 +0100

"Update all" should do a full reformatting

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

diff --git a/sw/source/uibase/shells/basesh.cxx 
b/sw/source/uibase/shells/basesh.cxx
index ed92f2c35ee5..3732a1de05c1 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -733,7 +733,7 @@ void SwBaseShell::Execute(SfxRequest )
 rDis.Execute( FN_UPDATE_FIELDS );
 rDis.Execute( FN_UPDATE_TOX );
 rDis.Execute( FN_UPDATE_CHARTS );
-rSh.CalcLayout();
+rSh.Reformat();
 }
 break;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-01-18 Thread Samuel Mehrbrodt (via logerrit)
 sw/source/uibase/uno/unotxdoc.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit cbbfed893616f804cb6557185ddda26c0cef2ed6
Author: Samuel Mehrbrodt 
AuthorDate: Mon Jan 18 12:07:16 2021 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Mon Jan 18 15:52:12 2021 +0100

XTextDocument::refresh should do a full reformatting

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

diff --git a/sw/source/uibase/uno/unotxdoc.cxx 
b/sw/source/uibase/uno/unotxdoc.cxx
index 7fa248a90e65..1a0615b0f09f 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -2225,7 +2225,7 @@ void SwXTextDocument::refresh()
 SwViewShell *pViewShell = m_pDocShell->GetWrtShell();
 NotifyRefreshListeners();
 if(pViewShell)
-pViewShell->CalcLayout();
+pViewShell->Reformat();
 }
 
 void SAL_CALL SwXTextDocument::addRefreshListener(
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-01-18 Thread Samuel Mehrbrodt (via logerrit)
 include/sfx2/objsh.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1a1aef10821bb9f20d01d413d45c63b1ab15f782
Author: Samuel Mehrbrodt 
AuthorDate: Mon Jan 18 08:46:20 2021 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Mon Jan 18 10:02:05 2021 +0100

Fix typo

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

diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index a4aaaed93382..b21f7bf4bb69 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -341,7 +341,7 @@ public:
 css::uno::Reference const& xInsertPosition);
 boolExportTo( SfxMedium  );
 
-/** Returns to if preparing was successful, else false. */
+/** Returns true if preparing was successful, else false. */
 bool PrepareForSigning(weld::Window* pDialogParent);
 bool CheckIsReadonly(bool bSignScriptingContent);
 void RecheckSignature(bool bAlsoRecheckScriptingSignature);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-1' - sw/inc sw/source

2021-01-17 Thread Samuel Mehrbrodt (via logerrit)
 sw/inc/viewsh.hxx |4 ++--
 sw/source/uibase/uiview/view2.cxx |1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit b5dff6131058d3e98307c24bb5796d7dd2b589f8
Author: Samuel Mehrbrodt 
AuthorDate: Tue Jan 12 16:02:34 2021 +0100
Commit: Thorsten Behrens 
CommitDate: Mon Jan 18 03:54:19 2021 +0100

Make uno:RefreshView redo the whole document layout

This is useful when encountering layout problems, to refresh
the doc layout from an extension.

Change-Id: Ie2472f061ebea203a9d876782b3bb953477de7c9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109218
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 

diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index 0bc777f2dce8..06d45add7cbb 100644
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -152,8 +152,6 @@ class SW_DLLPUBLIC SwViewShell : public 
sw::Ring
 
 inline void ResetInvalidRect();
 
-void Reformat();  // Invalidates complete Layout (ApplyViewOption).
-
 SAL_DLLPRIVATE void PaintDesktop(vcl::RenderContext& rRenderContext, const 
SwRect&);  // Collect values for painting of desktop
 // and calling.
 // PaintDesktop split. This pars is also used by PreviewPage.
@@ -216,6 +214,8 @@ public:
 
 void InvalidateWindows( const SwRect  );
 
+void Reformat();  // Invalidates complete Layout (ApplyViewOption).
+
 // #i72754# set of Pre/PostPaints with lock counter and initial target 
OutDev
 protected:
 std::stack mPrePostPaintRegions; // acts also as a lock 
counter (empty == not locked)
diff --git a/sw/source/uibase/uiview/view2.cxx 
b/sw/source/uibase/uiview/view2.cxx
index 4a76ca612eef..8ab119113225 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -532,6 +532,7 @@ void SwView::Execute(SfxRequest )
 break;
 case FN_REFRESH_VIEW:
 GetEditWin().Invalidate();
+m_pWrtShell->Reformat();
 break;
 case FN_PAGEUP:
 case FN_PAGEUP_SEL:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-01-13 Thread Samuel Mehrbrodt (via logerrit)
 officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu |2 +-
 sw/source/uibase/uiview/view2.cxx   |1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 51ef3a3af573287b03262e96bf8298bdbe06c44d
Author: Samuel Mehrbrodt 
AuthorDate: Tue Jan 12 13:22:37 2021 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Wed Jan 13 14:46:49 2021 +0100

Make uno:RefreshView redo the whole document layout

This is useful when encountering layout problems, to refresh
the doc layout from an extension.

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

diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
index 1f6ed2730309..76f453d7d816 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
@@ -2597,7 +2597,7 @@
   
   
 
-  Restore View
+  Refresh document layout
 
   
   
diff --git a/sw/source/uibase/uiview/view2.cxx 
b/sw/source/uibase/uiview/view2.cxx
index 799b8feaf98e..adeb5ed16e6a 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -563,6 +563,7 @@ void SwView::Execute(SfxRequest )
 break;
 case FN_REFRESH_VIEW:
 GetEditWin().Invalidate();
+m_pWrtShell->Reformat();
 break;
 case FN_PAGEUP:
 case FN_PAGEUP_SEL:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - officecfg/registry sfx2/source

2020-12-22 Thread Samuel Mehrbrodt (via logerrit)
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |6 ++
 sfx2/source/doc/objstor.cxx|4 +++-
 2 files changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 5dd2945ee2ea533de229a43790ece651775a
Author: Samuel Mehrbrodt 
AuthorDate: Tue Feb 4 10:36:09 2020 +0100
Commit: Thorsten Behrens 
CommitDate: Tue Dec 22 09:17:24 2020 +0100

Allow opt-out from document events check

Commit b3edf85e0fe6ca03dc26e1bf531be82193bc9627 added a warning on load
when a document binds events to a macro.

This adds an option to restore the old behavior, so that the warning only
appears when a document actually has Macros.

Change-Id: I5ad398d3d503a0954a746f4cba150f68630b820c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108141
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 

diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index 3e9590a22977..2df062a36c62 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -2664,6 +2664,12 @@
   
   false
 
+
+  
+Warn on load when a document binds an event to a macro
+  
+  true
+
 
   
 List with trusted authors.
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 0b4b933318ad..43d61cf247bc 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -3569,7 +3569,9 @@ void SfxObjectShell::SetMacroCallsSeenWhileLoading()
 
 bool SfxObjectShell::GetMacroCallsSeenWhileLoading() const
 {
-return pImpl->m_bMacroCallsSeenWhileLoading;
+if 
(officecfg::Office::Common::Security::Scripting::CheckDocumentEvents::get())
+return pImpl->m_bMacroCallsSeenWhileLoading;
+return false;
 }
 
 bool SfxObjectShell::QuerySaveSizeExceededModules_Impl( const uno::Reference< 
task::XInteractionHandler >& xHandler )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-4' - sfx2/source

2020-12-11 Thread Samuel Mehrbrodt (via logerrit)
 sfx2/source/appl/appserv.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit c103dfb9923e2ddb0bd85e21f2f31d5267a93a66
Author: Samuel Mehrbrodt 
AuthorDate: Thu Dec 10 17:24:53 2020 +0100
Commit: Vasily Melenchuk 
CommitDate: Fri Dec 11 09:16:46 2020 +0100

Fix Linux build

Change-Id: Ic6ba805b8920316f0a549678e10f7fe71bf46d04
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107567
Tested-by: Vasily Melenchuk 
Reviewed-by: Vasily Melenchuk 

diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 9577fc4d4d6f..f15e39282682 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -61,6 +61,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-11 Thread Samuel Mehrbrodt (via logerrit)
 vcl/source/window/printdlg.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 71e285e6cab8427af04758325ed43624ad0ab792
Author: Samuel Mehrbrodt 
AuthorDate: Thu Dec 10 17:25:10 2020 +0100
Commit: Vasily Melenchuk 
CommitDate: Fri Dec 11 09:16:23 2020 +0100

Fix "single print jobs" function in print dlg

Did not work at all

Change-Id: I388ce579691a1e7ad2eff8420c2f8b6b3e939ef0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107568
Tested-by: Vasily Melenchuk 
Reviewed-by: Vasily Melenchuk 

diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 1515b8b74264..6442654c9860 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -82,7 +82,8 @@ IMPL_LINK (MoreOptionsDialog, ClickHdl, weld::Button&, 
rButton, void)
 {
 if ( == mxOKButton.get())
 {
-mpParent->mbSingleJobs = mxSingleJobsBox->get_active();
+bool bChecked = mxSingleJobsBox->get_active();
+mpParent->maPController->setValue("SinglePrintJobs", 
makeAny(bChecked));
 m_xDialog->response(RET_OK);
 }
 else if ( == mxCancelButton.get())
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-10 Thread Samuel Mehrbrodt (via logerrit)
 officecfg/registry/schema/org/openoffice/Office/Writer.xcs |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ac14ed9f26582701032a28cb424f2b6bf35ca7fd
Author: Samuel Mehrbrodt 
AuthorDate: Wed Dec 9 09:11:24 2020 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Thu Dec 10 16:50:42 2020 +0100

Don't show HiddenParagraphs by default

Showing them means that the layout is different from what is printed.
This probably shouldn't be the default.

The similiar HiddenCharacter is also false by default.

Change-Id: Id68408463ccbceab18b73ac78f24d1b4b4cbeaeb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107385
Tested-by: Jenkins
Reviewed-by: Oliver Brinzing 
Reviewed-by: Samuel Mehrbrodt 

diff --git a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
index 84125017318f..c99841d3cbde 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
@@ -1203,7 +1203,7 @@
 Specifies whether hidden paragraphs are displayed on the 
screen.
 Hidden paragraphs
   
-  true
+  false
 
 
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-10 Thread Samuel Mehrbrodt (via logerrit)
 sal/osl/w32/socket.cxx |   40 
 1 file changed, 8 insertions(+), 32 deletions(-)

New commits:
commit afc41a467fdfabb2cd0879be3e4f1879a1d1dc91
Author: Samuel Mehrbrodt 
AuthorDate: Thu Dec 10 09:31:29 2020 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Thu Dec 10 14:21:15 2020 +0100

Do not call GetAddrInfoW if we just want the hostname

Calling 'gethostname' already gives us the current host name on Windows.
For some reason, if that name does not contain a dot, GetAddrInfoW is
called, which "provides protocol-independent translation from a Unicode
host name to an address".

So all this function does, is returning an address for a hostname,
while we still only need the hostname and not the address.

This causes a lag when creating the lockfile on opening a document
if the network is flaky/disabled.
See tdf#97931 and tdf#47179 for some problems caused by this.

Change-Id: I0c543ea12c23506b2daa50da40bae1a471f6fe16
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107513
Tested-by: Samuel Mehrbrodt 
Reviewed-by: Samuel Mehrbrodt 

diff --git a/sal/osl/w32/socket.cxx b/sal/osl/w32/socket.cxx
index f1c46e8f2568..ba96cc5ed838 100644
--- a/sal/osl/w32/socket.cxx
+++ b/sal/osl/w32/socket.cxx
@@ -613,39 +613,15 @@ oslSocketResult SAL_CALL osl_getLocalHostname 
(rtl_uString **strLocalHostname)
 char Host[256]= "";
 if (gethostname(Host, sizeof(Host)) == 0)
 {
-/* check if we have an FQDN; if not, try to determine it via 
dns first: */
-if (strchr(Host, '.') == nullptr)
+OUString u;
+if (rtl_convertStringToUString(
+, Host, strlen(Host), 
osl_getThreadTextEncoding(),
+(RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_ERROR
+| RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_ERROR
+| RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR))
+&& o3tl::make_unsigned(u.getLength()) < 
SAL_N_ELEMENTS(LocalHostname))
 {
-oslHostAddr pAddr;
-rtl_uString *hostName= nullptr;
-
-rtl_string2UString(
-, Host, strlen(Host),
-RTL_TEXTENCODING_UTF8, OUSTRING_TO_OSTRING_CVTFLAGS);
-OSL_ASSERT(hostName != nullptr);
-
-pAddr = osl_createHostAddrByName(hostName);
-rtl_uString_release (hostName);
-
-if (pAddr && pAddr->pHostName)
-memcpy(LocalHostname, pAddr->pHostName->buffer, 
sizeof(sal_Unicode)*(rtl_ustr_getLength(pAddr->pHostName->buffer)+1));
-else
-memset(LocalHostname, 0, sizeof(LocalHostname));
-
-osl_destroyHostAddr (pAddr);
-}
-if (LocalHostname[0] == u'\0')
-{
-OUString u;
-if (rtl_convertStringToUString(
-, Host, strlen(Host), 
osl_getThreadTextEncoding(),
-(RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_ERROR
- | RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_ERROR
- | RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR))
-&& o3tl::make_unsigned(u.getLength()) < 
SAL_N_ELEMENTS(LocalHostname))
-{
-memcpy(LocalHostname, u.getStr(), (u.getLength() + 1) 
* sizeof (sal_Unicode));
-}
+memcpy(LocalHostname, u.getStr(), (u.getLength() + 1) * 
sizeof (sal_Unicode));
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: offapi/com

2020-12-09 Thread Samuel Mehrbrodt (via logerrit)
 offapi/com/sun/star/drawing/XShapeGrouper.idl |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 16976c40821f9d5a8c98ea801e749e5198640e29
Author: Samuel Mehrbrodt 
AuthorDate: Wed Dec 9 11:35:23 2020 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Wed Dec 9 14:38:45 2020 +0100

Move dot into its place

Appeared on a separate paragraph before.

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

diff --git a/offapi/com/sun/star/drawing/XShapeGrouper.idl 
b/offapi/com/sun/star/drawing/XShapeGrouper.idl
index 2716377ecfa6..1fe63b1c5c42 100644
--- a/offapi/com/sun/star/drawing/XShapeGrouper.idl
+++ b/offapi/com/sun/star/drawing/XShapeGrouper.idl
@@ -39,8 +39,8 @@ published interface XShapeGrouper: 
com::sun::star::uno::XInterface
 
 Grouping of objects in text documents works only if none
 of the objects has an anchor of type
-com::sun::star::text::TextContentAnchorType::AS_CHARACTER
-.
+com::sun::star::text::TextContentAnchorType::AS_CHARACTER .
+
 
 @param xShapes
 the Shapes that will be grouped. They
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - 2 commits - include/vcl vcl/source

2020-12-07 Thread Samuel Mehrbrodt (via logerrit)
 include/vcl/tabpage.hxx   |2 --
 vcl/source/window/tabpage.cxx |   11 ---
 2 files changed, 4 insertions(+), 9 deletions(-)

New commits:
commit e2737d875079a5106e5645063fbdfb0ed7ea1d18
Author: Samuel Mehrbrodt 
AuthorDate: Tue Nov 24 08:59:11 2020 +0100
Commit: Thorsten Behrens 
CommitDate: Mon Dec 7 13:34:39 2020 +0100

Remove unused ScrollBarBox from tabpage

This displays an empty rectangle at the upper left of the tabpage.

Change-Id: I8424a3f8ec4896814b135aa2c86012f0b33ee1be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106479
Tested-by: Michael Weghorn 
Reviewed-by: Michael Weghorn 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107139
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 

diff --git a/include/vcl/tabpage.hxx b/include/vcl/tabpage.hxx
index 7a57ad17d4bd..f65ba389245d 100644
--- a/include/vcl/tabpage.hxx
+++ b/include/vcl/tabpage.hxx
@@ -27,7 +27,6 @@
 #include 
 
 class ScrollBar;
-class ScrollBarBox;
 
 class VCL_DLLPUBLIC TabPage
 : public vcl::Window
@@ -43,7 +42,6 @@ private:
 
 VclPtrm_pVScroll;
 VclPtrm_pHScroll;
-VclPtr m_aScrollBarBox;
 Size maScrollArea;
 bool mbHasHoriBar;
 bool mbHasVertBar;
diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx
index 335e2fd69d23..659aa15da39f 100644
--- a/vcl/source/window/tabpage.cxx
+++ b/vcl/source/window/tabpage.cxx
@@ -62,10 +62,6 @@ void TabPage::ImplInit( vcl::Window* pParent, WinBits nStyle 
)
 
 if ( mbHasHoriBar || mbHasVertBar )
 {
-m_aScrollBarBox.set(
-VclPtr::Create(this,
- ((nStyle & (WB_VSCROLL|WB_HSCROLL)) ? 
WB_HIDE : 0)));
-m_aScrollBarBox->Show();
 SetStyle( GetStyle() | WB_CLIPCHILDREN );
 }
 
@@ -130,7 +126,6 @@ void TabPage::dispose()
 disposeBuilder();
 m_pVScroll.disposeAndClear();
 m_pHScroll.disposeAndClear();
-m_aScrollBarBox.disposeAndClear();
 vcl::Window::dispose();
 }
 
commit cbdc3ee3b1616101bf692799105307690271617d
Author: Thorsten Behrens 
AuthorDate: Fri Nov 20 14:38:08 2020 +0100
Commit: Thorsten Behrens 
CommitDate: Mon Dec 7 13:34:20 2020 +0100

Fix tdf#138373 scrollbars can now actually be nullptr

Change-Id: I224969de51a1d7e0176facb503a5b27cd8da530c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106263
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107138

diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx
index d5f220a7b1b6..335e2fd69d23 100644
--- a/vcl/source/window/tabpage.cxx
+++ b/vcl/source/window/tabpage.cxx
@@ -284,7 +284,8 @@ void TabPage::SetScrollTop( long nTop )
 {
 Point aOld = mnScrollPos;
 lcl_Scroll( mnScrollPos.X() , mnScrollPos.Y() - nTop );
-m_pHScroll->SetThumbPos( 0 );
+if( m_pHScroll )
+m_pHScroll->SetThumbPos( 0 );
 // new pos is 0,0
 mnScrollPos = aOld;
 }
@@ -292,7 +293,8 @@ void TabPage::SetScrollLeft( long nLeft )
 {
 Point aOld = mnScrollPos;
 lcl_Scroll( mnScrollPos.X() - nLeft , mnScrollPos.Y() );
-m_pVScroll->SetThumbPos( 0 );
+if( m_pVScroll )
+m_pVScroll->SetThumbPos( 0 );
 // new pos is 0,0
 mnScrollPos = aOld;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sfx2/sdi sfx2/source

2020-12-02 Thread Samuel Mehrbrodt (via logerrit)
 sfx2/sdi/sfx.sdi |2 +-
 sfx2/source/view/viewprn.cxx |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 9b0824e2b4d2228325d17190c63d8d1641e12798
Author: Samuel Mehrbrodt 
AuthorDate: Wed Nov 25 23:09:18 2020 +0100
Commit: Thorsten Behrens 
CommitDate: Thu Dec 3 02:45:17 2020 +0100

uno:Printersetup: Allow preselecting a printer

When calling "uno:Printersetup" from a macro, allow preselecting a
printer in the printer setup dialog by passing the printer name
as an argument "PrinterName"

Change-Id: I6b435f52a4123dc7fd49f6d771052ff1b8e743c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106634
Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit ccb0b825305a158d9142e1a5316c6ff7905f6ecb)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106678
Reviewed-by: Thorsten Behrens 

diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi
index a0de55dbfddb..6cdad85a8d53 100644
--- a/sfx2/sdi/sfx.sdi
+++ b/sfx2/sdi/sfx.sdi
@@ -3238,7 +3238,7 @@ SfxStringItem Printer SID_PRINTER_NAME
 
 
 SfxVoidItem PrinterSetup SID_SETUPPRINTER
-()
+(SfxStringItem PrinterName SID_PRINTER_NAME)
 [
 AutoUpdate = FALSE,
 FastCall = FALSE,
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 45341cd1892a..796a505ed8d4 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -820,8 +820,8 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest  )
 return;
 }
 
-// if no arguments are given, retrieve them from a dialog
-if ( !bIsAPI )
+// Open Printer Setup dialog
+if ( nId == SID_SETUPPRINTER )
 {
 // PrinterDialog needs a temporary printer
 VclPtr pDlgPrinter = pPrinter->Clone();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - include/vcl offapi/com sfx2/source vcl/osx vcl/source vcl/unx

2020-12-02 Thread Samuel Mehrbrodt (via logerrit)
 include/vcl/print.hxx |3 +++
 offapi/com/sun/star/view/PrintOptions.idl |4 
 sfx2/source/doc/printhelper.cxx   |9 +
 vcl/osx/salprn.cxx|7 +--
 vcl/source/gdi/print3.cxx |   16 
 vcl/unx/generic/print/genprnpsp.cxx   |8 +---
 6 files changed, 26 insertions(+), 21 deletions(-)

New commits:
commit 7ed3ab4fd497ffa20359cdc73201e18508fcad54
Author: Samuel Mehrbrodt 
AuthorDate: Wed Nov 25 16:22:11 2020 +0100
Commit: Thorsten Behrens 
CommitDate: Thu Dec 3 02:44:59 2020 +0100

Add 'SinglePrintJobs' to PrintOptions

So that this option can be set via UNO API

Change-Id: I0b69162661a4327d59aaed82d5eff98cb50d852c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106593
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 2e2c162b7a816d990415fca434e6d3d5600b2858)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106677
Reviewed-by: Thorsten Behrens 

diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx
index 6d3adf0e00d7..631b2f5b83fe 100644
--- a/include/vcl/print.hxx
+++ b/include/vcl/print.hxx
@@ -168,6 +168,7 @@ private:
 boolmbPrintFile;
 boolmbInPrintPage;
 boolmbNewJobSetup;
+boolmbSinglePrintJobs;
 
 VCL_DLLPRIVATE void ImplInitData();
 VCL_DLLPRIVATE void ImplInit( SalPrinterQueueInfo* pInfo );
@@ -316,6 +317,8 @@ public:
 voidSetCopyCount( sal_uInt16 nCopy, bool bCollate 
);
 sal_uInt16  GetCopyCount() const { return mnCopyCount; }
 boolIsCollateCopy() const { return mbCollateCopy; }
+voidSetSinglePrintJobs(bool bSinglePrintJobs) { 
mbSinglePrintJobs = bSinglePrintJobs; }
+boolIsSinglePrintJobs() const { return 
mbSinglePrintJobs; }
 
 boolIsPrinting() const { return mbPrinting; }
 
diff --git a/offapi/com/sun/star/view/PrintOptions.idl 
b/offapi/com/sun/star/view/PrintOptions.idl
index eea96f98937e..4ed8b23baaf0 100644
--- a/offapi/com/sun/star/view/PrintOptions.idl
+++ b/offapi/com/sun/star/view/PrintOptions.idl
@@ -76,6 +76,10 @@ published service PrintOptions
 /** if set, specifies name of the printer to use.
  */
 [optional, property] string PrinterName;
+
+/** advises the printer to create a single print job for each copy.
+ */
+[optional, property] boolean SinglePrintJobs;
 };
 
 
diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx
index e0c2cc75ad77..e2ce74172288 100644
--- a/sfx2/source/doc/printhelper.cxx
+++ b/sfx2/source/doc/printhelper.cxx
@@ -696,6 +696,15 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< 
beans::PropertyValue >&
 aCheckedArgs[nProps++].Value <<= bTemp;
 }
 
+else if ( rProp.Name == "SinglePrintJobs" )
+{
+bool bTemp;
+if ( !(rProp.Value >>= bTemp) )
+throw css::lang::IllegalArgumentException();
+aCheckedArgs[nProps].Name = "SinglePrintJobs";
+aCheckedArgs[nProps++].Value <<= bTemp;
+}
+
 // Pages-Property
 else if ( rProp.Name == "Pages" )
 {
diff --git a/vcl/osx/salprn.cxx b/vcl/osx/salprn.cxx
index 0f2f38fa530a..a066f881164b 100644
--- a/vcl/osx/salprn.cxx
+++ b/vcl/osx/salprn.cxx
@@ -381,12 +381,7 @@ bool AquaSalInfoPrinter::StartJob( const OUString* 
i_pFileName,
 bShowProgressPanel = false;
 
 // possibly create one job for collated output
-bool bSinglePrintJobs = false;
-beans::PropertyValue* pSingleValue = i_rController.getValue( OUString( 
"PrintCollateAsSingleJobs" ) );
-if( pSingleValue )
-{
-pSingleValue->Value >>= bSinglePrintJobs;
-}
+bool bSinglePrintJobs = i_rController.getPrinter()->IsSinglePrintJobs();
 
 // FIXME: jobStarted() should be done after the print dialog has ended (if 
there is one)
 // how do I know when that might be ?
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index 04ac1f5a92e6..1cc0ce8c1c93 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -509,8 +509,7 @@ bool 
Printer::PreparePrintJob(std::shared_ptr xController,
 }
 else if (aDlg.isSingleJobs())
 {
-xController->setValue( "PrintCollateAsSingleJobs",
-css::uno::makeAny( true ) );
+xController->getPrinter()->SetSinglePrintJobs(true);
 }
 }
 catch (const std::bad_alloc&)
@@ -585,12 +584,7 @@ bool Printer::StartJob( const OUString& i_rJobName, 
std::

[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-1' - vcl/source

2020-11-30 Thread Samuel Mehrbrodt (via logerrit)
 vcl/source/window/printdlg.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit fdf45b56b0b4402c66ea885b7fe3a8a9bbdfac82
Author: Samuel Mehrbrodt 
AuthorDate: Thu Nov 26 10:52:04 2020 +0100
Commit: Thorsten Behrens 
CommitDate: Mon Nov 30 09:33:08 2020 +0100

Fix "single print jobs" function in print dlg

Did not work at all

Change-Id: I388ce579691a1e7ad2eff8420c2f8b6b3e939ef0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/10
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 

diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index b59bfc17dfe3..f025918e0b16 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -1672,6 +1672,12 @@ IMPL_LINK( PrintDialog, ClickHdl, Button*, pButton, void 
)
  makeAny( bChecked ) );
 preparePreview( true, true );
 }
+else if( pButton == maOptionsPage.mpCollateSingleJobsBox )
+{
+bool bChecked = maOptionsPage.mpCollateSingleJobsBox->IsChecked();
+maPController->setValue( "SinglePrintJobs",
+ makeAny( bChecked ) );
+}
 else if( pButton == maNUpPage.mpBrochureBtn )
 {
 PropertyValue* pVal = getValueForWindow( pButton );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-1' - sfx2/sdi sfx2/source

2020-11-30 Thread Samuel Mehrbrodt (via logerrit)
 sfx2/sdi/sfx.sdi |2 +-
 sfx2/source/view/viewprn.cxx |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit a94d3829792414d5decb64474f7178eb27076e5c
Author: Samuel Mehrbrodt 
AuthorDate: Wed Nov 25 23:09:18 2020 +0100
Commit: Thorsten Behrens 
CommitDate: Mon Nov 30 09:32:46 2020 +0100

uno:Printersetup: Allow preselecting a printer

When calling "uno:Printersetup" from a macro, allow preselecting a
printer in the printer setup dialog by passing the printer name
as an argument "PrinterName"

Change-Id: I6b435f52a4123dc7fd49f6d771052ff1b8e743c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106656
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 

diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi
index 235544588174..1b0222e45b60 100644
--- a/sfx2/sdi/sfx.sdi
+++ b/sfx2/sdi/sfx.sdi
@@ -3205,7 +3205,7 @@ SfxStringItem Printer SID_PRINTER_NAME
 
 
 SfxVoidItem PrinterSetup SID_SETUPPRINTER
-()
+(SfxStringItem PrinterName SID_PRINTER_NAME)
 [
 AutoUpdate = FALSE,
 FastCall = FALSE,
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 19534cb129e1..7d72f08213bf 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -814,8 +814,8 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest  )
 return;
 }
 
-// if no arguments are given, retrieve them from a dialog
-if ( !bIsAPI )
+// Open Printer Setup dialog
+if ( nId == SID_SETUPPRINTER )
 {
 // PrinterDialog needs a temporary printer
 VclPtr pDlgPrinter = pPrinter->Clone();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-1' - include/vcl offapi/com sfx2/source vcl/osx vcl/source vcl/unx

2020-11-30 Thread Samuel Mehrbrodt (via logerrit)
 include/vcl/print.hxx |3 +++
 offapi/com/sun/star/view/PrintOptions.idl |4 
 sfx2/source/doc/printhelper.cxx   |9 +
 vcl/osx/salprn.cxx|7 +--
 vcl/source/gdi/print3.cxx |   16 
 vcl/unx/generic/print/genprnpsp.cxx   |8 +---
 6 files changed, 26 insertions(+), 21 deletions(-)

New commits:
commit c906412f74b719050a2a3ea412c394587e7c73f2
Author: Samuel Mehrbrodt 
AuthorDate: Wed Nov 25 16:22:11 2020 +0100
Commit: Thorsten Behrens 
CommitDate: Mon Nov 30 09:32:10 2020 +0100

Add 'SinglePrintJobs' to PrintOptions

So that this option can be set via UNO API

Change-Id: I0b69162661a4327d59aaed82d5eff98cb50d852c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106655
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 

diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx
index c80b514b05df..0a76612230ee 100644
--- a/include/vcl/print.hxx
+++ b/include/vcl/print.hxx
@@ -205,6 +205,7 @@ private:
 boolmbPrintFile;
 boolmbInPrintPage;
 boolmbNewJobSetup;
+boolmbSinglePrintJobs;
 
 SAL_DLLPRIVATE void ImplInitData();
 SAL_DLLPRIVATE void ImplInit( SalPrinterQueueInfo* pInfo );
@@ -340,6 +341,8 @@ public:
 voidSetCopyCount( sal_uInt16 nCopy, bool bCollate 
);
 sal_uInt16  GetCopyCount() const { return mnCopyCount; }
 boolIsCollateCopy() const { return mbCollateCopy; }
+voidSetSinglePrintJobs(bool bSinglePrintJobs) { 
mbSinglePrintJobs = bSinglePrintJobs; }
+boolIsSinglePrintJobs() const { return 
mbSinglePrintJobs; }
 
 boolIsPrinting() const { return mbPrinting; }
 
diff --git a/offapi/com/sun/star/view/PrintOptions.idl 
b/offapi/com/sun/star/view/PrintOptions.idl
index eea96f98937e..4ed8b23baaf0 100644
--- a/offapi/com/sun/star/view/PrintOptions.idl
+++ b/offapi/com/sun/star/view/PrintOptions.idl
@@ -76,6 +76,10 @@ published service PrintOptions
 /** if set, specifies name of the printer to use.
  */
 [optional, property] string PrinterName;
+
+/** advises the printer to create a single print job for each copy.
+ */
+[optional, property] boolean SinglePrintJobs;
 };
 
 
diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx
index 41c2f547c99b..d917ff4d0955 100644
--- a/sfx2/source/doc/printhelper.cxx
+++ b/sfx2/source/doc/printhelper.cxx
@@ -710,6 +710,15 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< 
beans::PropertyValue >&
 aCheckedArgs[nProps++].Value <<= bTemp;
 }
 
+else if ( rProp.Name == "SinglePrintJobs" )
+{
+bool bTemp;
+if ( !(rProp.Value >>= bTemp) )
+throw css::lang::IllegalArgumentException();
+aCheckedArgs[nProps].Name = "SinglePrintJobs";
+aCheckedArgs[nProps++].Value <<= bTemp;
+}
+
 // Pages-Property
 else if ( rProp.Name == "Pages" )
 {
diff --git a/vcl/osx/salprn.cxx b/vcl/osx/salprn.cxx
index baeb6c6d71d9..8fde77891ad9 100644
--- a/vcl/osx/salprn.cxx
+++ b/vcl/osx/salprn.cxx
@@ -379,12 +379,7 @@ bool AquaSalInfoPrinter::StartJob( const OUString* 
i_pFileName,
 bShowProgressPanel = false;
 
 // possibly create one job for collated output
-bool bSinglePrintJobs = false;
-beans::PropertyValue* pSingleValue = i_rController.getValue( OUString( 
"PrintCollateAsSingleJobs" ) );
-if( pSingleValue )
-{
-pSingleValue->Value >>= bSinglePrintJobs;
-}
+bool bSinglePrintJobs = i_rController.getPrinter()->IsSinglePrintJobs();
 
 // FIXME: jobStarted() should be done after the print dialog has ended (if 
there is one)
 // how do I know when that might be ?
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index 544e07ce02d4..404458218930 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -493,8 +493,7 @@ bool 
Printer::PreparePrintJob(std::shared_ptr xController,
 }
 else if( aDlg->isSingleJobs() )
 {
-xController->setValue( "PrintCollateAsSingleJobs",
-   css::uno::makeAny( true ) );
+xController->getPrinter()->SetSinglePrintJobs(true);
 }
 }
 catch (const std::bad_alloc&)
@@ -569,12 +568,7 @@ bool Printer::StartJob( const OUString& i_rJobName, 
std::shared_ptrgetValue(OUString("PrintCollateAsSingleJobs"));
-if( pSingleValue )
-{
-pSingleValue->Value >>= bSinglePrintJobs;
-

[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/inc vcl/source

2020-11-26 Thread Samuel Mehrbrodt (via logerrit)
 vcl/inc/printdlg.hxx   |3 +--
 vcl/source/window/printdlg.cxx |   24 
 2 files changed, 17 insertions(+), 10 deletions(-)

New commits:
commit bb9fdc02569a0016ba5dd623479b8e8b0d1aa84e
Author: Samuel Mehrbrodt 
AuthorDate: Thu Nov 26 10:52:04 2020 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Thu Nov 26 14:36:30 2020 +0100

Fix "single print jobs" function in print dlg

Did not work at all

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

diff --git a/vcl/inc/printdlg.hxx b/vcl/inc/printdlg.hxx
index 1832e6da35b5..60839b07382f 100644
--- a/vcl/inc/printdlg.hxx
+++ b/vcl/inc/printdlg.hxx
@@ -99,7 +99,7 @@ namespace vcl
 
 bool isPrintToFile() const;
 bool isCollate() const;
-bool isSingleJobs() const { return mbSingleJobs; };
+bool isSingleJobs() const;
 bool hasPreview() const;
 
 void setPaperSizes();
@@ -204,7 +204,6 @@ namespace vcl
 SizemaFirstPageSize;
 
 boolmbShowLayoutFrame;
-boolmbSingleJobs;
 
 Paper   mePaper;
 
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index d9a7504bae76..6ea1182f2b7e 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -549,7 +549,6 @@ PrintDialog::PrintDialog(weld::Window* i_pWindow, const 
std::shared_ptrconnect_toggled( LINK( this, PrintDialog, ToggleHdl ) );
 mxCollateBox->connect_toggled( LINK( this, PrintDialog, ToggleHdl ) );
+mxSingleJobsBox->connect_toggled( LINK( this, PrintDialog, ToggleHdl ) );
 mxPagesBtn->connect_toggled( LINK( this, PrintDialog, ToggleHdl ) );
 
 // setup select hdl
@@ -739,8 +739,8 @@ void PrintDialog::storeToSettings()
 
 pItem->setValue( "PrintDialog",
  "CollateSingleJobs",
- mbSingleJobs ? OUString("true") :
-OUString("false") );
+ mxSingleJobsBox->get_active() ? OUString("true") :
+ OUString("false") );
 
 pItem->setValue( "PrintDialog",
  "HasPreview",
@@ -794,10 +794,7 @@ void PrintDialog::readFromSettings()
 // collate single jobs
 aValue = pItem->getValue( "PrintDialog",
   "CollateSingleJobs" );
-if ( aValue.equalsIgnoreAsciiCase("true") )
-mbSingleJobs = true;
-else
-mbSingleJobs = false;
+mxSingleJobsBox->set_active(aValue.equalsIgnoreAsciiCase("true"));
 
 // preview box
 aValue = pItem->getValue( "PrintDialog",
@@ -1009,9 +1006,15 @@ void PrintDialog::setPaperOrientation( Orientation 
eOrientation )
 void PrintDialog::checkControlDependencies()
 {
 if (mxCopyCountField->get_value() > 1)
+{
 mxCollateBox->set_sensitive( !mbCollateAlwaysOff );
+mxSingleJobsBox->set_sensitive( mxCollateBox->get_active() );
+}
 else
+{
 mxCollateBox->set_sensitive( false );
+mxSingleJobsBox->set_sensitive( false );
+}
 
 OUString aImg(mxCollateBox->get_active() ? OUString(SV_PRINT_COLLATE_BMP) 
: OUString(SV_PRINT_NOCOLLATE_BMP));
 
@@ -1746,6 +1749,11 @@ bool PrintDialog::isCollate() const
 return mxCopyCountField->get_value() > 1 && mxCollateBox->get_active();
 }
 
+bool PrintDialog::isSingleJobs() const
+{
+return mxSingleJobsBox->get_active();
+}
+
 bool PrintDialog::hasPreview() const
 {
 return mxPreviewBox->get_active();
@@ -1846,7 +1854,7 @@ IMPL_LINK(PrintDialog, ClickHdl, weld::Button&, rButton, 
void)
 }
 else if(  == mxSingleJobsBox.get() )
 {
-maPController->setValue( "SingleJob",
+maPController->setValue( "SinglePrintJobs",
  makeAny( isSingleJobs() ) );
 checkControlDependencies();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-11-26 Thread Samuel Mehrbrodt (via logerrit)
 vcl/inc/printdlg.hxx   |3 +--
 vcl/source/window/printdlg.cxx |   24 
 2 files changed, 17 insertions(+), 10 deletions(-)

New commits:
commit 0504e7d9ff618d7e1aab3ad8b250d8c2483bf17d
Author: Samuel Mehrbrodt 
AuthorDate: Thu Nov 26 10:52:04 2020 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Thu Nov 26 13:25:05 2020 +0100

Fix "single print jobs" function in print dlg

Did not work at all

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

diff --git a/vcl/inc/printdlg.hxx b/vcl/inc/printdlg.hxx
index 1832e6da35b5..60839b07382f 100644
--- a/vcl/inc/printdlg.hxx
+++ b/vcl/inc/printdlg.hxx
@@ -99,7 +99,7 @@ namespace vcl
 
 bool isPrintToFile() const;
 bool isCollate() const;
-bool isSingleJobs() const { return mbSingleJobs; };
+bool isSingleJobs() const;
 bool hasPreview() const;
 
 void setPaperSizes();
@@ -204,7 +204,6 @@ namespace vcl
 SizemaFirstPageSize;
 
 boolmbShowLayoutFrame;
-boolmbSingleJobs;
 
 Paper   mePaper;
 
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index d9a7504bae76..6ea1182f2b7e 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -549,7 +549,6 @@ PrintDialog::PrintDialog(weld::Window* i_pWindow, const 
std::shared_ptrconnect_toggled( LINK( this, PrintDialog, ToggleHdl ) );
 mxCollateBox->connect_toggled( LINK( this, PrintDialog, ToggleHdl ) );
+mxSingleJobsBox->connect_toggled( LINK( this, PrintDialog, ToggleHdl ) );
 mxPagesBtn->connect_toggled( LINK( this, PrintDialog, ToggleHdl ) );
 
 // setup select hdl
@@ -739,8 +739,8 @@ void PrintDialog::storeToSettings()
 
 pItem->setValue( "PrintDialog",
  "CollateSingleJobs",
- mbSingleJobs ? OUString("true") :
-OUString("false") );
+ mxSingleJobsBox->get_active() ? OUString("true") :
+ OUString("false") );
 
 pItem->setValue( "PrintDialog",
  "HasPreview",
@@ -794,10 +794,7 @@ void PrintDialog::readFromSettings()
 // collate single jobs
 aValue = pItem->getValue( "PrintDialog",
   "CollateSingleJobs" );
-if ( aValue.equalsIgnoreAsciiCase("true") )
-mbSingleJobs = true;
-else
-mbSingleJobs = false;
+mxSingleJobsBox->set_active(aValue.equalsIgnoreAsciiCase("true"));
 
 // preview box
 aValue = pItem->getValue( "PrintDialog",
@@ -1009,9 +1006,15 @@ void PrintDialog::setPaperOrientation( Orientation 
eOrientation )
 void PrintDialog::checkControlDependencies()
 {
 if (mxCopyCountField->get_value() > 1)
+{
 mxCollateBox->set_sensitive( !mbCollateAlwaysOff );
+mxSingleJobsBox->set_sensitive( mxCollateBox->get_active() );
+}
 else
+{
 mxCollateBox->set_sensitive( false );
+mxSingleJobsBox->set_sensitive( false );
+}
 
 OUString aImg(mxCollateBox->get_active() ? OUString(SV_PRINT_COLLATE_BMP) 
: OUString(SV_PRINT_NOCOLLATE_BMP));
 
@@ -1746,6 +1749,11 @@ bool PrintDialog::isCollate() const
 return mxCopyCountField->get_value() > 1 && mxCollateBox->get_active();
 }
 
+bool PrintDialog::isSingleJobs() const
+{
+return mxSingleJobsBox->get_active();
+}
+
 bool PrintDialog::hasPreview() const
 {
 return mxPreviewBox->get_active();
@@ -1846,7 +1854,7 @@ IMPL_LINK(PrintDialog, ClickHdl, weld::Button&, rButton, 
void)
 }
 else if(  == mxSingleJobsBox.get() )
 {
-maPController->setValue( "SingleJob",
+maPController->setValue( "SinglePrintJobs",
  makeAny( isSingleJobs() ) );
 checkControlDependencies();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sfx2/sdi

2020-11-26 Thread Samuel Mehrbrodt (via logerrit)
 sfx2/sdi/sfx.sdi |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3f4d96767fb510f07577ba4f28e60f05a370a5b2
Author: Samuel Mehrbrodt 
AuthorDate: Thu Nov 26 08:16:59 2020 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Thu Nov 26 09:41:36 2020 +0100

Make "uno:Printer" actually work

Needs to handle the "PrinterName" argument.
This can be used in macros to change the default printer.

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

diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi
index 6cdad85a8d53..5d71e6e5de3d 100644
--- a/sfx2/sdi/sfx.sdi
+++ b/sfx2/sdi/sfx.sdi
@@ -3218,7 +3218,7 @@ SfxVoidItem PrintDefault SID_PRINTDOCDIRECT
 
 
 SfxStringItem Printer SID_PRINTER_NAME
-
+(SfxStringItem PrinterName SID_PRINTER_NAME)
 [
 AutoUpdate = FALSE,
 FastCall = FALSE,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-11-26 Thread Samuel Mehrbrodt (via logerrit)
 sfx2/source/view/viewprn.cxx |  130 +++
 1 file changed, 70 insertions(+), 60 deletions(-)

New commits:
commit 75ec00583e03c3c09a64836da43f9f48d4fb3990
Author: Samuel Mehrbrodt 
AuthorDate: Thu Nov 26 08:32:50 2020 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Thu Nov 26 09:32:45 2020 +0100

Separate uno:Printer and uno:PrinterSetup handling

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

diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 796a505ed8d4..a01be90a0395 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -757,8 +757,31 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest  )
 break;
 }
 
-case SID_SETUPPRINTER : // display the printer settings dialogue : 
File > Printer Settings...
-case SID_PRINTER_NAME : // only for recorded macros
+case SID_PRINTER_NAME: // for recorded macros
+{
+// get printer and printer settings from the document
+SfxPrinter* pDocPrinter = GetPrinter(true);
+const SfxStringItem* pPrinterItem = 
rReq.GetArg(SID_PRINTER_NAME);
+if (!pPrinterItem)
+{
+rReq.Ignore();
+break;
+}
+// use PrinterName parameter to create a printer
+pPrinter = 
VclPtr::Create(pDocPrinter->GetOptions().Clone(),
+  pPrinterItem->GetValue());
+
+if (!pPrinter->IsKnown())
+{
+pPrinter.disposeAndClear();
+rReq.Ignore();
+break;
+}
+SetPrinter(pPrinter, SfxPrinterChangeFlags::PRINTER);
+rReq.Done();
+break;
+}
+case SID_SETUPPRINTER : // display the printer settings dialog : File 
> Printer Settings...
 {
 // get printer and printer settings from the document
 SfxPrinter *pDocPrinter = GetPrinter(true);
@@ -775,14 +798,6 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest  )
 pPrinter.disposeAndClear();
 }
 
-if ( SID_PRINTER_NAME == nId )
-{
-// just set a recorded printer name
-if ( pPrinter )
-SetPrinter( pPrinter, SfxPrinterChangeFlags::PRINTER  );
-return;
-}
-
 // no PrinterName parameter in ItemSet or the PrinterName points 
to an unknown printer
 if ( !pPrinter )
 // use default printer from document
@@ -820,68 +835,63 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest  )
 return;
 }
 
-// Open Printer Setup dialog
-if ( nId == SID_SETUPPRINTER )
+// Open Printer Setup dialog (needs a temporary printer)
+VclPtr pDlgPrinter = pPrinter->Clone();
+PrinterSetupDialog aPrintSetupDlg(GetFrameWeld());
+std::unique_ptr pExecutor;
+
+if (pImpl->m_bHasPrintOptions && HasPrintOptionsPage())
 {
-// PrinterDialog needs a temporary printer
-VclPtr pDlgPrinter = pPrinter->Clone();
+// additional controls for dialog
+pExecutor.reset(new SfxDialogExecutor_Impl(this, 
aPrintSetupDlg));
+if (bPrintOnHelp)
+pExecutor->DisableHelp();
+aPrintSetupDlg.SetOptionsHdl(pExecutor->GetLink());
+}
 
-// execute PrinterSetupDialog
-PrinterSetupDialog aPrintSetupDlg(GetFrameWeld());
-std::unique_ptr pExecutor;
+aPrintSetupDlg.SetPrinter(pDlgPrinter);
+nDialogRet = aPrintSetupDlg.run();
 
-if (pImpl->m_bHasPrintOptions && HasPrintOptionsPage())
+if (pExecutor && pExecutor->GetOptions())
+{
+if (nDialogRet == RET_OK)
+// remark: have to be recorded if possible!
+pDlgPrinter->SetOptions(*pExecutor->GetOptions());
+else
 {
-// additional controls for dialog
-pExecutor.reset( new SfxDialogExecutor_Impl( this, 
aPrintSetupDlg ) );
-if ( bPrintOnHelp )
-pExecutor->DisableHelp();
-aPrintSetupDlg.SetOptionsHdl( pExecutor->GetLink() );
+pPrinter->SetOptions(*pExecutor->GetOptions());
+SetPrinter(pPrinter, SfxPrinterChangeFlags::OPTIONS);
 }
+}
 
-aPrintSetupDlg.SetPrinter( pDlgPrinter );
-nDialogRet = aPrintSetupDlg.run()

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

2020-11-26 Thread Samuel Mehrbrodt (via logerrit)
 sfx2/sdi/sfx.sdi |2 +-
 sfx2/source/view/viewprn.cxx |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit a49600eb41bf28213e3adb0a911dae9edb56513e
Author: Samuel Mehrbrodt 
AuthorDate: Wed Nov 25 23:09:18 2020 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Thu Nov 26 09:12:18 2020 +0100

uno:Printersetup: Allow preselecting a printer

When calling "uno:Printersetup" from a macro, allow preselecting a
printer in the printer setup dialog by passing the printer name
as an argument "PrinterName"

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

diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi
index a0de55dbfddb..6cdad85a8d53 100644
--- a/sfx2/sdi/sfx.sdi
+++ b/sfx2/sdi/sfx.sdi
@@ -3238,7 +3238,7 @@ SfxStringItem Printer SID_PRINTER_NAME
 
 
 SfxVoidItem PrinterSetup SID_SETUPPRINTER
-()
+(SfxStringItem PrinterName SID_PRINTER_NAME)
 [
 AutoUpdate = FALSE,
 FastCall = FALSE,
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 45341cd1892a..796a505ed8d4 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -820,8 +820,8 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest  )
 return;
 }
 
-// if no arguments are given, retrieve them from a dialog
-if ( !bIsAPI )
+// Open Printer Setup dialog
+if ( nId == SID_SETUPPRINTER )
 {
 // PrinterDialog needs a temporary printer
 VclPtr pDlgPrinter = pPrinter->Clone();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/vcl offapi/com sfx2/source vcl/osx vcl/source vcl/unx

2020-11-25 Thread Samuel Mehrbrodt (via logerrit)
 include/vcl/print.hxx |3 +++
 offapi/com/sun/star/view/PrintOptions.idl |4 
 sfx2/source/doc/printhelper.cxx   |9 +
 vcl/osx/salprn.cxx|7 +--
 vcl/source/gdi/print3.cxx |   16 
 vcl/unx/generic/print/genprnpsp.cxx   |8 +---
 6 files changed, 26 insertions(+), 21 deletions(-)

New commits:
commit 2e2c162b7a816d990415fca434e6d3d5600b2858
Author: Samuel Mehrbrodt 
AuthorDate: Wed Nov 25 16:22:11 2020 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Thu Nov 26 08:51:57 2020 +0100

Add 'SinglePrintJobs' to PrintOptions

So that this option can be set via UNO API

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

diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx
index 6d3adf0e00d7..631b2f5b83fe 100644
--- a/include/vcl/print.hxx
+++ b/include/vcl/print.hxx
@@ -168,6 +168,7 @@ private:
 boolmbPrintFile;
 boolmbInPrintPage;
 boolmbNewJobSetup;
+boolmbSinglePrintJobs;
 
 VCL_DLLPRIVATE void ImplInitData();
 VCL_DLLPRIVATE void ImplInit( SalPrinterQueueInfo* pInfo );
@@ -316,6 +317,8 @@ public:
 voidSetCopyCount( sal_uInt16 nCopy, bool bCollate 
);
 sal_uInt16  GetCopyCount() const { return mnCopyCount; }
 boolIsCollateCopy() const { return mbCollateCopy; }
+voidSetSinglePrintJobs(bool bSinglePrintJobs) { 
mbSinglePrintJobs = bSinglePrintJobs; }
+boolIsSinglePrintJobs() const { return 
mbSinglePrintJobs; }
 
 boolIsPrinting() const { return mbPrinting; }
 
diff --git a/offapi/com/sun/star/view/PrintOptions.idl 
b/offapi/com/sun/star/view/PrintOptions.idl
index eea96f98937e..4ed8b23baaf0 100644
--- a/offapi/com/sun/star/view/PrintOptions.idl
+++ b/offapi/com/sun/star/view/PrintOptions.idl
@@ -76,6 +76,10 @@ published service PrintOptions
 /** if set, specifies name of the printer to use.
  */
 [optional, property] string PrinterName;
+
+/** advises the printer to create a single print job for each copy.
+ */
+[optional, property] boolean SinglePrintJobs;
 };
 
 
diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx
index e0c2cc75ad77..e2ce74172288 100644
--- a/sfx2/source/doc/printhelper.cxx
+++ b/sfx2/source/doc/printhelper.cxx
@@ -696,6 +696,15 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< 
beans::PropertyValue >&
 aCheckedArgs[nProps++].Value <<= bTemp;
 }
 
+else if ( rProp.Name == "SinglePrintJobs" )
+{
+bool bTemp;
+if ( !(rProp.Value >>= bTemp) )
+throw css::lang::IllegalArgumentException();
+aCheckedArgs[nProps].Name = "SinglePrintJobs";
+aCheckedArgs[nProps++].Value <<= bTemp;
+}
+
 // Pages-Property
 else if ( rProp.Name == "Pages" )
 {
diff --git a/vcl/osx/salprn.cxx b/vcl/osx/salprn.cxx
index 6fd92fd4c5d6..bec30a35b562 100644
--- a/vcl/osx/salprn.cxx
+++ b/vcl/osx/salprn.cxx
@@ -380,12 +380,7 @@ bool AquaSalInfoPrinter::StartJob( const OUString* 
i_pFileName,
 bShowProgressPanel = false;
 
 // possibly create one job for collated output
-bool bSinglePrintJobs = false;
-beans::PropertyValue* pSingleValue = i_rController.getValue( OUString( 
"PrintCollateAsSingleJobs" ) );
-if( pSingleValue )
-{
-pSingleValue->Value >>= bSinglePrintJobs;
-}
+bool bSinglePrintJobs = i_rController.getPrinter()->IsSinglePrintJobs();
 
 // FIXME: jobStarted() should be done after the print dialog has ended (if 
there is one)
 // how do I know when that might be ?
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index 04ac1f5a92e6..1cc0ce8c1c93 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -509,8 +509,7 @@ bool 
Printer::PreparePrintJob(std::shared_ptr xController,
 }
 else if (aDlg.isSingleJobs())
 {
-xController->setValue( "PrintCollateAsSingleJobs",
-css::uno::makeAny( true ) );
+xController->getPrinter()->SetSinglePrintJobs(true);
 }
 }
 catch (const std::bad_alloc&)
@@ -585,12 +584,7 @@ bool Printer::StartJob( const OUString& i_rJobName, 
std::shared_ptrgetValue("PrintCollateAsSingleJobs");
-if( pSingleValue )
-{
-pSingleValue->Value >>= bSinglePrintJobs;
-}
+bool bSinglePrintJo

[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - include/vcl vcl/source

2020-11-24 Thread Samuel Mehrbrodt (via logerrit)
 include/vcl/tabpage.hxx   |2 --
 vcl/source/window/tabpage.cxx |5 -
 2 files changed, 7 deletions(-)

New commits:
commit bc5b764c7c77e992d4d3df045c008f8cabc6a237
Author: Samuel Mehrbrodt 
AuthorDate: Tue Nov 24 08:59:11 2020 +0100
Commit: Thorsten Behrens 
CommitDate: Tue Nov 24 21:17:48 2020 +0100

Remove unused ScrollBarBox from tabpage

This displays an empty rectangle at the upper left of the tabpage.

Change-Id: I8424a3f8ec4896814b135aa2c86012f0b33ee1be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106480
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 6df0e538ff05b98e1123c5ad1d77f554007bff12)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106440
Reviewed-by: Thorsten Behrens 

diff --git a/include/vcl/tabpage.hxx b/include/vcl/tabpage.hxx
index 1a66bab9eabd..45d1c1220d60 100644
--- a/include/vcl/tabpage.hxx
+++ b/include/vcl/tabpage.hxx
@@ -25,7 +25,6 @@
 #include 
 
 class ScrollBar;
-class ScrollBarBox;
 
 class VCL_DLLPUBLIC TabPage
 : public vcl::Window
@@ -40,7 +39,6 @@ private:
 
 VclPtrm_pVScroll;
 VclPtrm_pHScroll;
-VclPtr m_aScrollBarBox;
 Size maScrollArea;
 bool mbHasHoriBar;
 bool mbHasVertBar;
diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx
index 0ee256425709..f3acc5998ec3 100644
--- a/vcl/source/window/tabpage.cxx
+++ b/vcl/source/window/tabpage.cxx
@@ -57,10 +57,6 @@ void TabPage::ImplInit( vcl::Window* pParent, WinBits nStyle 
)
 
 if ( mbHasHoriBar || mbHasVertBar )
 {
-m_aScrollBarBox.set(
-VclPtr::Create(this,
- ((nStyle & (WB_VSCROLL|WB_HSCROLL)) ? 
WB_HIDE : 0)));
-m_aScrollBarBox->Show();
 SetStyle( GetStyle() | WB_CLIPCHILDREN );
 }
 
@@ -113,7 +109,6 @@ void TabPage::dispose()
 {
 m_pVScroll.disposeAndClear();
 m_pHScroll.disposeAndClear();
-m_aScrollBarBox.disposeAndClear();
 vcl::Window::dispose();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - include/vcl vcl/source

2020-11-24 Thread Samuel Mehrbrodt (via logerrit)
 include/vcl/tabpage.hxx   |2 --
 vcl/source/window/tabpage.cxx |5 -
 2 files changed, 7 deletions(-)

New commits:
commit cd8bf886ac66511b06686886a301fbd8bfa6c87a
Author: Samuel Mehrbrodt 
AuthorDate: Tue Nov 24 08:59:11 2020 +0100
Commit: Michael Weghorn 
CommitDate: Tue Nov 24 10:45:43 2020 +0100

Remove unused ScrollBarBox from tabpage

This displays an empty rectangle at the upper left of the tabpage.

Change-Id: I8424a3f8ec4896814b135aa2c86012f0b33ee1be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106479
Tested-by: Michael Weghorn 
Reviewed-by: Michael Weghorn 

diff --git a/include/vcl/tabpage.hxx b/include/vcl/tabpage.hxx
index e69c45585b74..857929df3296 100644
--- a/include/vcl/tabpage.hxx
+++ b/include/vcl/tabpage.hxx
@@ -26,7 +26,6 @@
 #include 
 
 class ScrollBar;
-class ScrollBarBox;
 
 class VCL_DLLPUBLIC TabPage
 : public vcl::Window
@@ -42,7 +41,6 @@ private:
 
 VclPtrm_pVScroll;
 VclPtrm_pHScroll;
-VclPtr m_aScrollBarBox;
 Size maScrollArea;
 bool mbHasHoriBar;
 bool mbHasVertBar;
diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx
index 2f475bf700bd..0f37af8369b0 100644
--- a/vcl/source/window/tabpage.cxx
+++ b/vcl/source/window/tabpage.cxx
@@ -57,10 +57,6 @@ void TabPage::ImplInit( vcl::Window* pParent, WinBits nStyle 
)
 
 if ( mbHasHoriBar || mbHasVertBar )
 {
-m_aScrollBarBox.set(
-VclPtr::Create(this,
- ((nStyle & (WB_VSCROLL|WB_HSCROLL)) ? 
WB_HIDE : 0)));
-m_aScrollBarBox->Show();
 SetStyle( GetStyle() | WB_CLIPCHILDREN );
 }
 
@@ -125,7 +121,6 @@ void TabPage::dispose()
 disposeBuilder();
 m_pVScroll.disposeAndClear();
 m_pHScroll.disposeAndClear();
-m_aScrollBarBox.disposeAndClear();
 vcl::Window::dispose();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-11-24 Thread Samuel Mehrbrodt (via logerrit)
 include/vcl/tabpage.hxx   |2 --
 vcl/source/window/tabpage.cxx |5 -
 2 files changed, 7 deletions(-)

New commits:
commit 6df0e538ff05b98e1123c5ad1d77f554007bff12
Author: Samuel Mehrbrodt 
AuthorDate: Tue Nov 24 08:59:11 2020 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Tue Nov 24 10:04:18 2020 +0100

Remove unused ScrollBarBox from tabpage

This displays an empty rectangle at the upper left of the tabpage.

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

diff --git a/include/vcl/tabpage.hxx b/include/vcl/tabpage.hxx
index 1a66bab9eabd..45d1c1220d60 100644
--- a/include/vcl/tabpage.hxx
+++ b/include/vcl/tabpage.hxx
@@ -25,7 +25,6 @@
 #include 
 
 class ScrollBar;
-class ScrollBarBox;
 
 class VCL_DLLPUBLIC TabPage
 : public vcl::Window
@@ -40,7 +39,6 @@ private:
 
 VclPtrm_pVScroll;
 VclPtrm_pHScroll;
-VclPtr m_aScrollBarBox;
 Size maScrollArea;
 bool mbHasHoriBar;
 bool mbHasVertBar;
diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx
index 0ee256425709..f3acc5998ec3 100644
--- a/vcl/source/window/tabpage.cxx
+++ b/vcl/source/window/tabpage.cxx
@@ -57,10 +57,6 @@ void TabPage::ImplInit( vcl::Window* pParent, WinBits nStyle 
)
 
 if ( mbHasHoriBar || mbHasVertBar )
 {
-m_aScrollBarBox.set(
-VclPtr::Create(this,
- ((nStyle & (WB_VSCROLL|WB_HSCROLL)) ? 
WB_HIDE : 0)));
-m_aScrollBarBox->Show();
 SetStyle( GetStyle() | WB_CLIPCHILDREN );
 }
 
@@ -113,7 +109,6 @@ void TabPage::dispose()
 {
 m_pVScroll.disposeAndClear();
 m_pHScroll.disposeAndClear();
-m_aScrollBarBox.disposeAndClear();
 vcl::Window::dispose();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/cib_contract57d' - 3 commits - configure.ac cui/source editeng/inc editeng/source include/editeng sw/qa

2020-11-03 Thread Samuel Mehrbrodt (via logerrit)
 configure.ac|2 -
 cui/source/dialogs/SpellDialog.cxx  |   37 +++-
 editeng/inc/editdoc.hxx |3 ++
 editeng/source/editeng/editdoc.cxx  |   12 ++-
 editeng/source/editeng/editeng.cxx  |4 +++
 include/editeng/editeng.hxx |5 
 sw/qa/extras/uiwriter/uiwriter2.cxx |4 +--
 7 files changed, 46 insertions(+), 21 deletions(-)

New commits:
commit 1af995b8413f80f03df63068a5682985c2291af0
Author: Samuel Mehrbrodt 
AuthorDate: Tue Nov 3 15:35:12 2020 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Tue Nov 3 15:35:12 2020 +0100

Release 6.3.6.8

Change-Id: Ia98028acc4fb1929910606c567b4b77985f43189

diff --git a/configure.ac b/configure.ac
index 8b9786155e77..d94bd198ac25 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for 
the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no 
idea.
 
-AC_INIT([LibreOffice],[6.3.6.7],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[6.3.6.8],[],[],[http://documentfoundation.org/])
 
 dnl libnumbertext needs autoconf 2.68, but that can pick up autoconf268 just 
fine if it is installed
 dnl whereas aclocal (as run by autogen.sh) insists on using autoconf and fails 
hard
commit 851c8f56cca10dfd2b936379b67d67ce090f6851
Author: Samuel Mehrbrodt 
AuthorDate: Tue Nov 3 15:34:31 2020 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Tue Nov 3 15:34:31 2020 +0100

Fix uiwriter2 unit test

was obiviously a mismerge

Change-Id: I6fd9810f58588b9f9d984a4ff295caae05968361

diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx 
b/sw/qa/extras/uiwriter/uiwriter2.cxx
index e54a2b60307d..b359ef7df607 100644
--- a/sw/qa/extras/uiwriter/uiwriter2.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter2.cxx
@@ -266,9 +266,9 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, 
testRedlineSplitContentNode)
 pWrtShell->ApplyViewOptions(aViewOptions);
 
 // enable redlining
-dispatchCommand(mxComponent, ".uno:TrackChanges", {});
+lcl_dispatchCommand(mxComponent, ".uno:TrackChanges", {});
 // hide
-dispatchCommand(mxComponent, ".uno:ShowTrackedChanges", {});
+lcl_dispatchCommand(mxComponent, ".uno:ShowTrackedChanges", {});
 
 SwDocShell* const pDocShell = pTextDoc->GetDocShell();
 SwDoc* const pDoc = pDocShell->GetDoc();
commit dfa6004433884cd0c1f951f4ee0339483e834d24
Author: Caolán McNamara 
AuthorDate: Fri Apr 24 16:38:26 2020 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Tue Nov 3 14:35:42 2020 +0100

Resolves: tdf#132288 don't merge adjacent properties for spell checking

spell checking relies on each attribute chunk being unmerged with identical
adjacent chunks

squash includes...

nStartPosition and nEndPosition are always the same

and

tdf#132288 preservation of footnote depends on reverse iteration

like TextCharAttribList::FindAttrib does which spell checking
used before

commit 243b5b392906042ab03800e0b5765e6f3513372c
Author: Caolán McNamara 
Date:   Fri Jun 14 21:56:44 2019 +0100

weld SpellDialog

converted to use an EditEngine instead of a TextEngine in order to
be able to host it in a native widget

Change-Id: Ia835fa054cad0dee4304f16724b9eb0c29b46102
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92772
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 994526fadb3faeb57c47cf1060a2ad7d53bd4f94)

diff --git a/cui/source/dialogs/SpellDialog.cxx 
b/cui/source/dialogs/SpellDialog.cxx
index 128ee804fe97..7366c15d62fc 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -1142,6 +1142,8 @@ void 
SentenceEditWindow_Impl::SetDrawingArea(weld::DrawingArea* pDrawingArea)
pDrawingArea->get_text_height() * 6);
 pDrawingArea->set_size_request(aSize.Width(), aSize.Height());
 WeldEditView::SetDrawingArea(pDrawingArea);
+// tdf#132288 don't merge equal adjacent attributes
+m_xEditEngine->DisableAttributeExpanding();
 }
 
 SentenceEditWindow_Impl::~SentenceEditWindow_Impl()
@@ -1150,13 +1152,14 @@ SentenceEditWindow_Impl::~SentenceEditWindow_Impl()
 
 namespace
 {
-const EECharAttrib* FindCharAttrib(int nStartPosition, int nEndPosition, 
sal_uInt16 nWhich, std::vector& rAttribList)
+const EECharAttrib* FindCharAttrib(int nPosition, sal_uInt16 nWhich, 
std::vector& rAttribList)
 {
-for (const auto& rTextAtr : rAttribList)
+for (auto it = rAttribList.rbegin(); it != rAttribList.rend(); ++it)
 {
+const auto& rTextAtr = *it;
 if (rTextAtr.pAttr->Which() != nWhich)
 continue;
-if (rTextAtr.nStart <= nS

[Libreoffice-commits] core.git: Branch 'feature/cib_contract891c' - 7 commits - configure.ac l10ntools/inc l10ntools/source sal/osl sal/qa

2020-10-29 Thread Samuel Mehrbrodt (via logerrit)
 configure.ac |2 +-
 l10ntools/inc/tokens.h   |2 +-
 l10ntools/source/export.cxx  |2 +-
 l10ntools/source/srclex.l|4 ++--
 sal/osl/all/log.cxx  |   27 +++
 sal/qa/osl/file/osl_File.cxx |2 +-
 6 files changed, 21 insertions(+), 18 deletions(-)

New commits:
commit 100c2a51604a1bde45062426fb4a05c0502142d5
Author: Samuel Mehrbrodt 
AuthorDate: Thu Oct 29 21:18:37 2020 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Thu Oct 29 21:20:09 2020 +0100

Release 5.4.13

Change-Id: Ib459674dc1970636ab0050401bda915b7b3c0e4c

diff --git a/configure.ac b/configure.ac
index 9f2d8bb17402..83ac32bdd8b6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for 
the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no 
idea.
 
-AC_INIT([LibreOffice],[5.4.12.0],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[5.4.13.0],[],[],[http://documentfoundation.org/])
 
 AC_PREREQ([2.59])
 
commit 28cca6737cdc83e50023181aa8328e225e46e886
Author: Samuel Mehrbrodt 
AuthorDate: Thu Oct 29 21:19:24 2020 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Thu Oct 29 21:20:09 2020 +0100

Fix build with recent WIN SDK

TEXT was already defined somewhere

Change-Id: If78ed6fd2c7d7d75a977ca531b8fbb399ec0b5dd

diff --git a/l10ntools/inc/tokens.h b/l10ntools/inc/tokens.h
index 95370cf70a7e..6d0d15d72e5e 100644
--- a/l10ntools/inc/tokens.h
+++ b/l10ntools/inc/tokens.h
@@ -42,7 +42,7 @@
 #define SMALRESOURCE505 /* PageItem {   */
 #define TEXTLINE506 /* TEXT = "hhh" */
 #define LONGTEXTLINE507 /* TEXT = "hhh" TEST "HHH" ...  */
-#define TEXT508 /* "Something like this"*/
+#define _TEXT508 /* "Something like this"*/
 #define LEVELUP 509 /* {*/
 #define LEVELDOWN   510 /* };   */
 #define APPFONTMAPPING  511 /* MAP_APPFONT(10,10)   */
diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx
index b4995ca04fb5..8c6a21b8a8b9 100644
--- a/l10ntools/source/export.cxx
+++ b/l10ntools/source/export.cxx
@@ -557,7 +557,7 @@ void Export::Execute( int nToken, const char * pToken )
 }
 }
 break;
-case TEXT:
+case _TEXT:
 case LISTTEXT_:
 case LISTTEXT: {
 // this is an entry for a List
diff --git a/l10ntools/source/srclex.l b/l10ntools/source/srclex.l
index 8fbb58361319..894807271e66 100644
--- a/l10ntools/source/srclex.l
+++ b/l10ntools/source/srclex.l
@@ -135,8 +135,8 @@ void YYWarning();
 }
 
 \".*\" {
-/* TEXT // "A Text" */
-   WorkOnTokenSet( TEXT, yytext );
+/* _TEXT // "A Text" */
+   WorkOnTokenSet( _TEXT, yytext );
 }
 
 "{"[ \t]*\\?   {
commit a3e9cd54b3ee4658cc0429c8858beea86035616a
Author:     Thorsten Behrens 
AuthorDate: Tue Jun 5 14:23:08 2018 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Thu Oct 29 20:33:36 2020 +0100

sal: WNT -> _WIN32

Still some holdouts from that bad old habit it seems.

Reviewed-on: https://gerrit.libreoffice.org/55331
Tested-by: Jenkins 
Reviewed-by: Thorsten Behrens 
(cherry picked from commit 92ed91610d30246e671226da081da748f6b16aae)

Change-Id: Ib0fe2c7eb006649b121668c549ff8e0bb060e120

diff --git a/sal/osl/all/log.cxx b/sal/osl/all/log.cxx
index 0fa1a75cd54e..b9d54fb200f2 100644
--- a/sal/osl/all/log.cxx
+++ b/sal/osl/all/log.cxx
@@ -31,7 +31,7 @@
 
 #if defined ANDROID
 #include 
-#elif defined WNT
+#elif defined _WIN32
 #include 
 #include 
 #define OSL_DETAIL_GETPID _getpid()
@@ -100,7 +100,7 @@ char const * getEnvironmentVariable(const char* env) {
 return p2;
 }
 
-#ifdef WNT
+#ifdef _WIN32
 # define INI_STRINGBUF_SIZE 1024
 
 bool getValueFromLoggingIniFile(const char* key, char* value) {
@@ -143,7 +143,7 @@ char const * getLogLevel() {
 if (env != nullptr)
 return env;
 
-#ifdef WNT
+#ifdef _WIN32
 static char logLevel[INI_STRINGBUF_SIZE];
 if (getValueFromLoggingIniFile("LogLevel", logLevel))
 return logLevel;
@@ -158,7 +158,7 @@ std::ofstream * getLogFile() {
 
 if (!logFile)
 {
-#ifdef WNT
+#ifdef _WIN32
 static char logFilePath[INI_STRINGBUF_SIZE];
 if (getValueFromLoggingIniFile("LogFilePath", logFilePath))
 logFile = logFilePath;
diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx
index 4e635a1d559f..d62ae760ea12 100644
--- a/sal/qa/osl/file/osl_File.cxx
+++ b/sal/qa/osl/file/osl_File.cxx
@@ -5085,7 +5085,7 @@ namesp

[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - drawinglayer/source

2020-10-29 Thread Samuel Mehrbrodt (via logerrit)
 drawinglayer/source/primitive2d/textlayoutdevice.cxx |   14 ++
 1 file changed, 14 insertions(+)

New commits:
commit d578bd6582131e52c1752f16f21ba2164ccdc970
Author: Samuel Mehrbrodt 
AuthorDate: Wed Oct 28 14:22:45 2020 +0100
Commit: Caolán McNamara 
CommitDate: Thu Oct 29 10:10:54 2020 +0100

Revert "tdf#127471 Remove font width scaling hack"

This reverts commit d935040e8f586ccb9dcf7fef30d72715a9f0ac98.

Reason for revert: Causes regressions like tdf#136891

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

diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx 
b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
index de2f76cb74f6..e3e57b2b5997 100644
--- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx
+++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
@@ -401,6 +401,20 @@ namespace drawinglayer::primitive2d
 aRetval.SetPitch(rFontAttribute.getMonospaced() ? PITCH_FIXED : 
PITCH_VARIABLE);
 aRetval.SetLanguage(LanguageTag::convertToLanguageType( rLocale, 
false));
 
+#ifdef _WIN32
+// for WIN32 systems, correct the FontWidth if FontScaling is used
+if(bFontIsScaled && nHeight > 0)
+{
+const FontMetric 
aUnscaledFontMetric(Application::GetDefaultDevice()->GetFontMetric(aRetval));
+
+if(aUnscaledFontMetric.GetAverageFontWidth() > 0)
+{
+const double fScaleFactor(static_cast(nWidth) / 
static_cast(nHeight));
+const sal_uInt32 
nScaledWidth(basegfx::fround(static_cast(aUnscaledFontMetric.GetAverageFontWidth())
 * fScaleFactor));
+aRetval.SetAverageFontWidth(nScaledWidth);
+}
+}
+#endif
 // handle FontRotation (if defined)
 if(!basegfx::fTools::equalZero(fFontRotation))
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/cib_contract891c' - 3 commits - configure.ac sal/osl

2020-10-27 Thread Samuel Mehrbrodt (via logerrit)
 configure.ac|2 -
 sal/osl/all/log.cxx |   96 +++-
 2 files changed, 81 insertions(+), 17 deletions(-)

New commits:
commit 10ed63ccdc87cd38f8e964aa3e3c257946e0ae57
Author: Samuel Mehrbrodt 
AuthorDate: Tue Oct 27 08:24:50 2020 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Tue Oct 27 08:24:50 2020 +0100

Release 5.4.12

Change-Id: Ie50de9dc5c4e1baa96098dfc5f2f7ebf2d44ef26

diff --git a/configure.ac b/configure.ac
index af7fc01b8195..9f2d8bb17402 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for 
the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no 
idea.
 
-AC_INIT([LibreOffice],[5.4.11.0],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[5.4.12.0],[],[],[http://documentfoundation.org/])
 
 AC_PREREQ([2.59])
 
commit 40ab562d98035fed5f85b892530a6e836ec39306
Author: Thorsten Behrens 
AuthorDate: Wed Jan 17 21:13:16 2018 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Tue Oct 27 08:21:26 2020 +0100

sal: use snprintf for sal log

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

diff --git a/sal/osl/all/log.cxx b/sal/osl/all/log.cxx
index 82b48475200c..a21d3d7b0833 100644
--- a/sal/osl/all/log.cxx
+++ b/sal/osl/all/log.cxx
@@ -101,6 +101,8 @@ char const * getEnvironmentVariable(const char* env) {
 }
 
 #ifdef WNT
+# define INI_STRINGBUF_SIZE 1024
+
 bool getValueFromLoggingIniFile(const char* key, char* value) {
 char buffer[MAX_PATH];
 GetModuleFileName(NULL, buffer, MAX_PATH);
@@ -126,7 +128,7 @@ bool getValueFromLoggingIniFile(const char* key, char* 
value) {
 if (aKey != sWantedKey)
 continue;
 aValue = sLine.substr(n+1, sLine.length());
-sprintf(value, "%s", aValue.c_str());
+snprintf(value, INI_STRINGBUF_SIZE, "%s", aValue.c_str());
 return true;
 }
 }
@@ -142,7 +144,7 @@ char const * getLogLevel() {
 return env;
 
 #ifdef WNT
-static char logLevel[1024];
+static char logLevel[INI_STRINGBUF_SIZE];
 if (getValueFromLoggingIniFile("LogLevel", logLevel))
 return logLevel;
 #endif
@@ -157,7 +159,7 @@ std::ofstream * getLogFile() {
 return nullptr;
 
 #ifdef WNT
-static char logFilePath[1024];
+static char logFilePath[INI_STRINGBUF_SIZE];
 if (getValueFromLoggingIniFile("LogFilePath", logFilePath))
 logFile = logFilePath;
 else
@@ -196,7 +198,7 @@ void maybeOutputTimestamp(std::ostringstream ) {
 tm.tm_year = dateTime.Year - 1900;
 strftime(ts, sizeof(ts), "%Y-%m-%d:%H:%M:%S", );
 char milliSecs[11];
-sprintf(milliSecs, "%03u", 
static_cast(dateTime.NanoSeconds/100));
+snprintf(milliSecs, sizeof(milliSecs), "%03u", 
static_cast(dateTime.NanoSeconds/100));
 s << ts << '.' << milliSecs << ':';
 }
 if (outputRelativeTimer) {
@@ -217,7 +219,7 @@ void maybeOutputTimestamp(std::ostringstream ) {
 else
 milliSeconds = (now.Nanosec-first.Nanosec)/100;
 char relativeTimestamp[100];
-sprintf(relativeTimestamp, "%d.%03d", seconds, milliSeconds);
+snprintf(relativeTimestamp, sizeof(relativeTimestamp), 
"%d.%03d", seconds, milliSeconds);
 s << relativeTimestamp << ':';
 }
 return;
commit fbe195ff4ef045b17d99ded1c34510d871f4a7a3
Author: Samuel Mehrbrodt 
AuthorDate: Wed Dec 21 21:15:49 2016 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Tue Oct 27 08:20:56 2020 +0100

WNT: allow to set log level/path from file

Expects a file logging.ini in the program/ directory
with the keys LogFilePath and LogLevel, e.g.:

LogFilePath=C:\log.txt
LogLevel=info

Note: This is Windows-only for now.

En passant remove extraneous newlines from syslog
and android log calls.

Change-Id: I35c730469e4079139da908aa287b989dc98e0f9d

diff --git a/sal/osl/all/log.cxx b/sal/osl/all/log.cxx
index 446108b3c042..82b48475200c 100644
--- a/sal/osl/all/log.cxx
+++ b/sal/osl/all/log.cxx
@@ -33,6 +33,7 @@
 #include 
 #elif defined WNT
 #include 
+#include 
 #define OSL_DETAIL_GETPID _getpid()
 #else
 #include 
@@ -81,13 +82,13 @@ char const * toString(sal_detail_LogLevel level) {
 // the process is running":
 #if defined ANDROID
 
-char const * getEnvironmentVariable() {
+char const * getLogLevel() {
 return std::getenv("SAL_LOG");
 }
 
 #else
 
-char const * getEnviron

[Libreoffice-commits] core.git: Branch 'feature/cib_contract57d' - 7 commits - configure.ac download.lst external/nss include/sfx2 include/vcl vcl/Library_vcl.mk vcl/qa vcl/source xmlsecurity/Library_

2020-10-19 Thread Samuel Mehrbrodt (via logerrit)
Rebased ref, commits from common ancestor:
commit f9f820e2400a8aa4d27169bd9a7b5b95ca3a9791
Author: Samuel Mehrbrodt 
AuthorDate: Mon Oct 19 10:20:20 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Mon Oct 19 10:20:20 2020 +0200

Release 6.3.6.7

Change-Id: Iea58b785d62006d0f1ee2e21c110acc402d499f7

diff --git a/configure.ac b/configure.ac
index f84c7b3fcbd2..8b9786155e77 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for 
the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no 
idea.
 
-AC_INIT([LibreOffice],[6.3.6.6],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[6.3.6.7],[],[],[http://documentfoundation.org/])
 
 dnl libnumbertext needs autoconf 2.68, but that can pick up autoconf268 just 
fine if it is installed
 dnl whereas aclocal (as run by autogen.sh) insists on using autoconf and fails 
hard
commit 91cb51348d186ed3e5b5443a6bf49fd3e1af54bc
Author: Michael Stahl 
AuthorDate: Fri Aug 7 18:57:00 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Mon Oct 19 10:03:11 2020 +0200

nss: upgrade to release 3.55.0

Fixes CVE-2020-6829, CVE-2020-12400 CVE-2020-12401 CVE-2020-12403.
(also CVE-2020-12402 CVE-2020-12399 in older releases since 3.47)

* external/nss/nss.nspr-parallel-win-debug_build.patch:
  remove, merged upstream

Change-Id: I8b48e25ce68a2327cde1420abdaea8f9e51a7888
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100345
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 495a5944a3d442cfe748a3bb0dcef76f6a961d30)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100420
Reviewed-by: Xisco Fauli 
(cherry picked from commit 227d30a3a17f2fffb1a166cdc3e2a796bb335214)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100590
Reviewed-by: Caolán McNamara 
(cherry picked from commit 94cecbfdf3cf01fe3d5658c7edf78696da2a249f)

diff --git a/download.lst b/download.lst
index 378213dc851b..00f73f95375b 100644
--- a/download.lst
+++ b/download.lst
@@ -181,8 +181,8 @@ export MYTHES_SHA256SUM := 
1e81f395d8c851c3e4e75b568e20fa2fa549354e75ab397f9de4b
 export MYTHES_TARBALL := a8c2c5b8f09e7ede322d5c602ff6a4b6-mythes-1.2.4.tar.gz
 export NEON_SHA256SUM := 
db0bd8cdec329b48f53a6f00199c92d5ba40b0f015b153718d1b15d3d967fbca
 export NEON_TARBALL := neon-0.30.2.tar.gz
-export NSS_SHA256SUM := 
861a4510b7c21516f49a4cfa5b871aa796e4e1ef2dfe949091970e56f9d60cdf
-export NSS_TARBALL := nss-3.53-with-nspr-4.25.tar.gz
+export NSS_SHA256SUM := 
ec6032d78663c6ef90b4b83eb552dedf721d2bce208cec3bf527b8f637db7e45
+export NSS_TARBALL := nss-3.55-with-nspr-4.27.tar.gz
 export ODFGEN_SHA256SUM := 
2c7b21892f84a4c67546f84611eccdad6259875c971e98ddb027da66ea0ac9c2
 export ODFGEN_VERSION_MICRO := 6
 export ODFGEN_TARBALL := libodfgen-0.1.$(ODFGEN_VERSION_MICRO).tar.bz2
diff --git a/external/nss/UnpackedTarball_nss.mk 
b/external/nss/UnpackedTarball_nss.mk
index 8801c7cdad63..1cad5852fa89 100644
--- a/external/nss/UnpackedTarball_nss.mk
+++ b/external/nss/UnpackedTarball_nss.mk
@@ -23,7 +23,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,nss,\
 external/nss/nss.vs2015.pdb.patch \
 external/nss/nss.bzmozilla1238154.patch \
 external/nss/macos-dlopen.patch.0 \
-external/nss/nss.nspr-parallel-win-debug_build.patch \
 $(if $(filter iOS,$(OS)), \
 external/nss/nss-ios.patch) \
 $(if $(filter ANDROID,$(OS)), \
diff --git a/external/nss/macos-dlopen.patch.0 
b/external/nss/macos-dlopen.patch.0
index 8c484e4c6841..1889b8df7cd3 100644
--- a/external/nss/macos-dlopen.patch.0
+++ b/external/nss/macos-dlopen.patch.0
@@ -1,14 +1,14 @@
 --- nspr/pr/src/linking/prlink.c
 +++ nspr/pr/src/linking/prlink.c
-@@ -793,7 +793,7 @@
- /* ensure the file exists if it contains a slash character i.e. path 
*/
- /* DARWIN's dlopen ignores the provided path and checks for the */
- /* plain filename in DYLD_LIBRARY_PATH */
--if (strchr(name, PR_DIRECTORY_SEPARATOR) == NULL ||
-+if (strchr(name, PR_DIRECTORY_SEPARATOR) == NULL || strncmp(name, 
"@loader_path/", 13) == 0 ||
- PR_Access(name, PR_ACCESS_EXISTS) == PR_SUCCESS) {
- h = dlopen(name, dl_flags);
- }
+@@ -799,7 +799,7 @@
+  * The reason is that DARWIN's dlopen ignores the provided path
+  * and checks for the plain filename in DYLD_LIBRARY_PATH,
+  * which could load an unexpected version of a library. */
+-if (strchr(name, PR_DIRECTORY_SEPARATOR) == NULL) {
++if (strchr(name, PR_DIRECTORY_SEPARATOR) == NULL || strncmp(name, 
"@loader_path/", 13) == 0) {
+   /* no slash, allow to load from any location */
+   okToLoad = PR_TRUE;
+ } else {
 --- nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpcertstore.c
 +++ nss/lib/libpki

[Libreoffice-commits] core.git: Branch 'feature/cib_contract891' - 3 commits - download.lst external/nss

2020-10-08 Thread Samuel Mehrbrodt (via logerrit)
 download.lst |4 
 external/nss/UnpackedTarball_nss.mk  |6 
 external/nss/nss-no-c99.patch| 2503 ---
 external/nss/nss.patch   |  118 -
 external/nss/nss.windowbuild.patch.0 |   55 
 5 files changed, 165 insertions(+), 2521 deletions(-)

New commits:
commit b42df7c74147d72025a1cdc4b903360dfd4ccbab
Author: Samuel Mehrbrodt 
AuthorDate: Thu Oct 8 16:16:19 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Thu Oct 8 16:16:19 2020 +0200

Revert "nss: upgrade to 3.38"

This reverts commit c4481da197fc1faa536acd4e847954b0b2aab64a.

diff --git a/download.lst b/download.lst
index 6e1f0adbc6e1..40688ae15f6c 100644
--- a/download.lst
+++ b/download.lst
@@ -34,8 +34,8 @@ LIBEOT_MD5SUM := aa24f5dd2a2992f4a116aa72af817548
 export LIBEOT_TARBALL := libeot-0.01.tar.bz2
 LANGTAGREG_MD5SUM := 504af523f5d1a5590bbeb6a4b55e8a97
 export LANGTAGREG_TARBALL := language-subtag-registry-2014-03-27.tar.bz2
-NSS_MD5SUM := cd649be8ee61fe15d64d7bef361b37ba
-export NSS_TARBALL := nss-3.38-with-nspr-4.19.tar.gz
+NSS_MD5SUM := e55ee06b22687df68fafc6a30c0554b2
+export NSS_TARBALL := nss-3.29.5-with-nspr-4.13.1.tar.gz
 PYTHON_MD5SUM := 803a75927f8f241ca78633890c798021
 export PYTHON_TARBALL := Python-3.3.5.tgz
 OPENSSL_MD5SUM := 44279b8557c3247cbe324e2322ecd114
diff --git a/external/nss/UnpackedTarball_nss.mk 
b/external/nss/UnpackedTarball_nss.mk
index cf7ad65803a1..59b6147a5142 100644
--- a/external/nss/UnpackedTarball_nss.mk
+++ b/external/nss/UnpackedTarball_nss.mk
@@ -13,13 +13,15 @@ $(eval $(call 
gb_UnpackedTarball_set_tarball,nss,$(NSS_TARBALL)))
 
 $(eval $(call gb_UnpackedTarball_add_patches,nss,\
external/nss/nss.patch \
+   external/nss/nss.aix.patch \
external/nss/nss-3.13.5-zlib-werror.patch \
-   $(if $(filter WNTMSC,$(OS)$(COM)),nss/nss.windows.patch) \
+   $(if $(filter WNTMSC,$(OS)$(COM)),external/nss/nss.windows.patch) \
+external/nss/nss.windowbuild.patch.0 \
$(if $(filter MSC-INTEL,$(COM)-$(CPUNAME)), \
external/nss/nss.cygwin64.in32bit.patch) \
 $(if $(findstring 120_70,$(VCVER)_$(WINDOWS_SDK_VERSION)), \
 external/nss/nss-winXP-sdk.patch.1) \
-   $(if $(filter WNTMSC,$(OS)$(COM)),external/nss/nss-no-c99.patch) \
+   external/nss/nss-no-c99.patch \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/nss/nss-no-c99.patch b/external/nss/nss-no-c99.patch
index b695683f6d0e..eb686145e4e9 100644
--- a/external/nss/nss-no-c99.patch
+++ b/external/nss/nss-no-c99.patch
@@ -1475,9 +1475,34 @@
  64,
  }
  };
+--- a/nss/nss/lib/freebl/ecl/curve25519_64.c   2017-04-06 16:14:46.0 
+0200
 b/nss/nss/lib/freebl/ecl/curve25519_64.c   2018-05-22 19:18:07.482457400 
+0200
+@@ -38,17 +38,17 @@
+ const int64_t *in = (const int64_t *)iin;
+ int64_t *out = (int64_t *)ioutput;
+ 
++// An arithmetic shift right of 63 places turns a positive number to 0 
and a
++// negative number to all 1's. This gives us a bitmask that lets us avoid
++// side-channel prone branches.
++int64_t t;
++
+ out[0] = in[0] - out[0];
+ out[1] = in[1] - out[1];
+ out[2] = in[2] - out[2];
+ out[3] = in[3] - out[3];
+ out[4] = in[4] - out[4];
+ 
+-// An arithmetic shift right of 63 places turns a positive number to 0 
and a
+-// negative number to all 1's. This gives us a bitmask that lets us avoid
+-// side-channel prone branches.
+-int64_t t;
+-
+ #define NEGCHAIN(a, b)\
+ t = out[a] >> 63; \
+ out[a] += twotothe51 & t; \
 --- a/nss/nss/lib/softoken/pkcs11c.c   2017-04-06 16:14:46.0 +0200
 +++ b/nss/nss/lib/softoken/pkcs11c.c   2018-05-22 19:43:15.154079800 +0200
-@@ -5125,10 +5125,11 @@
+@@ -5105,10 +5105,11 @@
  crv = sftk_AddAttributeType(publicKey, CKA_EC_POINT,
  
sftk_item_expand(>publicValue));
  } else {
@@ -1492,2493 +1517,22 @@
  if (!pubValue) {
  crv = CKR_ARGUMENTS_BAD;
  goto ecgn_done;
-diff -ur nss/nss/cmd/lib/secutil.c nss_new/nss/cmd/lib/secutil.c
 a/nss/nss/cmd/lib/secutil.c2018-06-21 11:24:45.0 +0200
-+++ b/nss/nss/cmd/lib/secutil.c2018-09-19 13:53:21.922607000 +0200
-@@ -217,6 +217,7 @@
- secuPWData *pwdata = (secuPWData *)arg;
- secuPWData pwnull = { PW_NONE, 0 };
- secuPWData pwxtrn = { PW_EXTERNAL, "external" };
-+char *pw;
- 
- if (pwdata == NULL)
- pwdata = 
-@@ -240,7 +241,7 @@
- sprintf(prompt,
- "Press Enter, then enter PIN for \"%s\" on external 
device.\n",
- PK11_GetTokenName(slot));
--char *pw = SECU_GetPasswordString(NULL, prompt);
-+pw = SECU_GetPasswordString(NULL, prompt);
- PORT_Free(pw);
- /* Fall Through 

[Libreoffice-commits] core.git: Branch 'feature/cib_contract891' - 6 commits - download.lst external/nss

2020-10-08 Thread Samuel Mehrbrodt (via logerrit)
 download.lst  |4 -
 external/nss/ExternalProject_nss.mk   |6 -
 external/nss/UnpackedTarball_nss.mk   |1 
 external/nss/nsinstall.py |7 --
 external/nss/nss-3.13.5-zlib-werror.patch |7 --
 external/nss/nss-win32-make.patch.1   |   20 --
 external/nss/nss.aix.patch|2 
 external/nss/nss.oldglibc.patch.1 |   97 --
 external/nss/nss.patch|   27 ++--
 external/nss/nss.windows.patch|4 -
 10 files changed, 32 insertions(+), 143 deletions(-)

New commits:
commit e13ab2fa16d19c5aec4f846e388d91d2bd6fc01e
Author: Samuel Mehrbrodt 
AuthorDate: Thu Oct 8 15:08:26 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Thu Oct 8 15:08:26 2020 +0200

Revert "nss: upgrade to release 3.45"

This reverts commit 92850a3628402abe36c1240b2835f1840bcff211.

diff --git a/download.lst b/download.lst
index 7400d11fe72d..6e1f0adbc6e1 100644
--- a/download.lst
+++ b/download.lst
@@ -34,8 +34,8 @@ LIBEOT_MD5SUM := aa24f5dd2a2992f4a116aa72af817548
 export LIBEOT_TARBALL := libeot-0.01.tar.bz2
 LANGTAGREG_MD5SUM := 504af523f5d1a5590bbeb6a4b55e8a97
 export LANGTAGREG_TARBALL := language-subtag-registry-2014-03-27.tar.bz2
-NSS_MD5SUM := 2f7dab8f5b85b1494f6bec2cc32a1f5c
-export NSS_TARBALL := nss-3.45-with-nspr-4.21.tar.gz
+NSS_MD5SUM := cd649be8ee61fe15d64d7bef361b37ba
+export NSS_TARBALL := nss-3.38-with-nspr-4.19.tar.gz
 PYTHON_MD5SUM := 803a75927f8f241ca78633890c798021
 export PYTHON_TARBALL := Python-3.3.5.tgz
 OPENSSL_MD5SUM := 44279b8557c3247cbe324e2322ecd114
diff --git a/external/nss/nss.patch b/external/nss/nss.patch
index 8121658dbdd4..18985e680e92 100644
--- a/external/nss/nss.patch
+++ b/external/nss/nss.patch
@@ -153,3 +153,16 @@
  #! gmake
  #
  # This Source Code Form is subject to the terms of the Mozilla Public
+@@ -89,10 +91,10 @@
+ NSPR_CONFIGURE_ENV = CC=gcc CXX=g++
+ endif
+ ifdef CC
+-NSPR_CONFIGURE_ENV = CC=$(CC)
++NSPR_CONFIGURE_ENV = CC="$(CC) "
+ endif
+ ifdef CCC
+-NSPR_CONFIGURE_ENV += CXX=$(CCC)
++NSPR_CONFIGURE_ENV += CXX="$(CCC) "
+ endif
+ # Remove -arch definitions. NSPR can't handle that.
+ NSPR_CONFIGURE_ENV := $(filter-out -arch x86_64,$(NSPR_CONFIGURE_ENV))
commit 3d6d8a333885b27b4367a38b7d2dfe38803ceb51
Author: Samuel Mehrbrodt 
AuthorDate: Thu Oct 8 15:08:18 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Thu Oct 8 15:08:18 2020 +0200

Revert "NSS fix lcc support patch"

This reverts commit caa3d02a20ec369e887c828a3a37df8ed6fd7311.

diff --git a/external/nss/UnpackedTarball_nss.mk 
b/external/nss/UnpackedTarball_nss.mk
index 4ea30b339b06..cf7ad65803a1 100644
--- a/external/nss/UnpackedTarball_nss.mk
+++ b/external/nss/UnpackedTarball_nss.mk
@@ -15,7 +15,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,nss,\
external/nss/nss.patch \
external/nss/nss-3.13.5-zlib-werror.patch \
$(if $(filter WNTMSC,$(OS)$(COM)),nss/nss.windows.patch) \
-external/nss/nss.fix-freebl-add-lcc-support.patch.1 \
$(if $(filter MSC-INTEL,$(COM)-$(CPUNAME)), \
external/nss/nss.cygwin64.in32bit.patch) \
 $(if $(findstring 120_70,$(VCVER)_$(WINDOWS_SDK_VERSION)), \
diff --git a/external/nss/nss.fix-freebl-add-lcc-support.patch.1 
b/external/nss/nss.fix-freebl-add-lcc-support.patch.1
deleted file mode 100644
index 3e3c06327dde..
--- a/external/nss/nss.fix-freebl-add-lcc-support.patch.1
+++ /dev/null
@@ -1,11 +0,0 @@
 b/nss/lib/freebl/Makefile
-+++ a/nss/lib/freebl/Makefile
-@@ -495,7 +495,7 @@
- ifdef USE_64
- # no __int128 at least up to lcc 1.23 (pretending to be gcc5)
- # NB: CC_NAME is not defined here
--ifneq ($(shell $(CC) -? 2>&1 >/dev/null | sed -e 's/:.*//;1q'),lcc)
-+ifneq ($(shell $(CC) -? 2>&1 >/dev/null 
AuthorDate: Thu Oct 8 15:08:05 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Thu Oct 8 15:08:05 2020 +0200

Revert "nss: upgrade to release 3.47.1"

This reverts commit 0fa883069c269308482d960de5897707f22561e8.

diff --git a/download.lst b/download.lst
index b1ff3b0d9015..7400d11fe72d 100644
--- a/download.lst
+++ b/download.lst
@@ -34,8 +34,8 @@ LIBEOT_MD5SUM := aa24f5dd2a2992f4a116aa72af817548
 export LIBEOT_TARBALL := libeot-0.01.tar.bz2
 LANGTAGREG_MD5SUM := 504af523f5d1a5590bbeb6a4b55e8a97
 export LANGTAGREG_TARBALL := language-subtag-registry-2014-03-27.tar.bz2
-NSS_MD5SUM := 9bc54feb6f1e39c60932f668d3caab5e
-export NSS_TARBALL := nss-3.47.1-with-nspr-4.23.tar.gz
+NSS_MD5SUM := 2f7dab8f5b85b1494f6bec2cc32a1f5c
+export NSS_TARBALL := nss-3.45-with-nspr-4.21.tar.gz
 PYTHON_MD5SUM := 803a75927f8f241ca78633890c798021
 export PYTHON_TARBALL := Python-3.3.5.tgz
 OPENSSL_MD5SUM := 44279b8557c3247cbe324e2322ecd114
diff --git a/external/nss/UnpackedTarball_nss.mk 
b/external/nss/UnpackedTarball_nss.mk
index cf7ad65803a1..4ea30b339b06 100644
--- a/externa

[Libreoffice-commits] core.git: Branch 'feature/cib_contract891' - external/nss

2020-10-08 Thread Samuel Mehrbrodt (via logerrit)
Rebased ref, commits from common ancestor:
commit 2c4e4dbc6a2cfecd19d683d445cb163da09bf290
Author: Samuel Mehrbrodt 
AuthorDate: Wed Oct 7 16:17:06 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Thu Oct 8 08:40:26 2020 +0200

Fix nss build on centos 5 baseline

glic too old

Change-Id: I7050d87f8c84780feb154ec3ff5fc5535247cd9e

diff --git a/external/nss/UnpackedTarball_nss.mk 
b/external/nss/UnpackedTarball_nss.mk
index cf7ad65803a1..047ee11c8377 100644
--- a/external/nss/UnpackedTarball_nss.mk
+++ b/external/nss/UnpackedTarball_nss.mk
@@ -20,6 +20,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,nss,\
 $(if $(findstring 120_70,$(VCVER)_$(WINDOWS_SDK_VERSION)), \
 external/nss/nss-winXP-sdk.patch.1) \
$(if $(filter WNTMSC,$(OS)$(COM)),external/nss/nss-no-c99.patch) \
+   external/nss/nss.oldglibc.patch.1 \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/nss/nss.oldglibc.patch.1 
b/external/nss/nss.oldglibc.patch.1
new file mode 100644
index ..7c78f6356dc1
--- /dev/null
+++ b/external/nss/nss.oldglibc.patch.1
@@ -0,0 +1,97 @@
+diff -ur 
nss.org/nss/lib/freebl/verified/kremlin/include/kremlin/lowstar_endianness.h 
nss/nss/lib/freebl/verified/kremlin/include/kremlin/lowstar_endianness.h
+--- 
nss.org/nss/lib/freebl/verified/kremlin/include/kremlin/lowstar_endianness.h
   2020-10-08 08:38:04.319549594 +0200
 nss/nss/lib/freebl/verified/kremlin/include/kremlin/lowstar_endianness.h   
2020-10-08 08:38:56.872385737 +0200
+@@ -198,6 +198,93 @@
+ memcpy(b, , 8);
+ }
+ 
++
++#if !defined(__bswap_constant_64)
++
++static __inline __uint16_t
++__uint16_identity (__uint16_t __x)
++{
++  return __x;
++}
++
++static __inline __uint32_t
++__uint32_identity (__uint32_t __x)
++{
++  return __x;
++}
++
++static __inline __uint64_t
++__uint64_identity (__uint64_t __x)
++{
++  return __x;
++}
++
++/* Swap bytes in 16-bit value.  */
++#define __bswap_constant_16(x)\
++  ((__uint16_t) x) >> 8) & 0xff) | (((x) & 0xff) << 8)))
++
++static __inline __uint16_t
++__bswap_16 (__uint16_t __bsx)
++{
++#if __GNUC_PREREQ (4, 8)
++  return __builtin_bswap16 (__bsx);
++#else
++  return __bswap_constant_16 (__bsx);
++#endif
++}
++
++/* Swap bytes in 32-bit value.  */
++#define __bswap_constant_32(x)\
++  x) & 0xff00u) >> 24) | (((x) & 0x00ffu) >> 8)   \
++   | (((x) & 0xff00u) << 8) | (((x) & 0x00ffu) << 24))
++
++static __inline __uint32_t
++__bswap_32 (__uint32_t __bsx)
++{
++#if __GNUC_PREREQ (4, 3)
++  return __builtin_bswap32 (__bsx);
++#else
++  return __bswap_constant_32 (__bsx);
++#endif
++}
++
++/* Swap bytes in 64-bit value.  */
++#define __bswap_constant_64(x)\
++  x) & 0xff00ull) >> 56)  \
++   | (((x) & 0x00ffull) >> 40)\
++   | (((x) & 0xff00ull) >> 24)\
++   | (((x) & 0x00ffull) >> 8) \
++   | (((x) & 0xff00ull) << 8) \
++   | (((x) & 0x00ffull) << 24)\
++   | (((x) & 0xff00ull) << 40)\
++   | (((x) & 0x00ffull) << 56))
++
++__extension__ static __inline __uint64_t
++__bswap_64 (__uint64_t __bsx)
++{
++#if __GNUC_PREREQ (4, 3)
++  return __builtin_bswap64 (__bsx);
++#else
++  return __bswap_constant_64 (__bsx);
++#endif
++}
++#  define htobe16(x) __bswap_16 (x)
++#  define htole16(x) __uint16_identity (x)
++#  define be16toh(x) __bswap_16 (x)
++#  define le16toh(x) __uint16_identity (x)
++
++#  define htobe32(x) __bswap_32 (x)
++#  define htole32(x) __uint32_identity (x)
++#  define be32toh(x) __bswap_32 (x)
++#  define le32toh(x) __uint32_identity (x)
++
++#  define htobe64(x) __bswap_64 (x)
++#  define htole64(x) __uint64_identity (x)
++#  define be64toh(x) __bswap_64 (x)
++#  define le64toh(x) __uint64_identity (x)
++
++#endif // !defined(__bswap_constant_64)
++
+ /* Legacy accessors so that this header can serve as an implementation of
+  * C.Endianness */
+ #define load16_le(b) (le16toh(load16(b)))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/cib_contract57d' - 3 commits - configure.ac vcl/inc vcl/source

2020-10-08 Thread Samuel Mehrbrodt (via logerrit)
 configure.ac   |2 -
 vcl/inc/printdlg.hxx   |6 +++
 vcl/source/window/printdlg.cxx |   70 +
 3 files changed, 57 insertions(+), 21 deletions(-)

New commits:
commit fb9ee6f4f7c55154fea5106ac098d3b2d2fa191f
Author: Samuel Mehrbrodt 
AuthorDate: Thu Oct 8 08:11:34 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Thu Oct 8 08:11:34 2020 +0200

Release 6.3.6.6

Change-Id: I6f7a969a030114fc8de2155587f26552b901666a

diff --git a/configure.ac b/configure.ac
index b262c53d55ae..f84c7b3fcbd2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for 
the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no 
idea.
 
-AC_INIT([LibreOffice],[6.3.6.5],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[6.3.6.6],[],[],[http://documentfoundation.org/])
 
 dnl libnumbertext needs autoconf 2.68, but that can pick up autoconf268 just 
fine if it is installed
 dnl whereas aclocal (as run by autogen.sh) insists on using autoconf and fails 
hard
commit 2fcfff9810ecfbe8735173ef317548583a7f985d
Author: Juergen Funk 
AuthorDate: Fri Sep 4 10:53:44 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Wed Oct 7 15:18:36 2020 +0200

tdf#127932 fix wrong page number in print progress

- in ctor, reset start pages to non-inflated value after size
  calculation
- update label, _then_ progress in setProgress()

Change-Id: I66576e339de814922512b68167e6c0a9b1025378
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102031
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 
(cherry picked from commit 63bf8f042abe3c0f6989f6763d13f5389182b816)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102281
Tested-by: Jenkins

diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 5df5961951de..dd88c9b1a9a6 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -2153,6 +2153,15 @@ void PrintDialog::previewBackward()
 mpPageEdit->Down();
 }
 
+
+static OUString getNewLabel(const OUString& aLabel, int i_nCurr, int i_nMax)
+{
+OUString aNewText( aLabel.replaceFirst( "%p", OUString::number( i_nCurr ) 
) );
+aNewText = aNewText.replaceFirst( "%n", OUString::number( i_nMax ) );
+
+return aNewText;
+}
+
 // PrintProgressDialog
 PrintProgressDialog::PrintProgressDialog(weld::Window* i_pParent, int i_nMax)
 : GenericDialogController(i_pParent, "vcl/ui/printprogressdialog.ui", 
"PrintProgressDialog")
@@ -2170,15 +2179,17 @@ PrintProgressDialog::PrintProgressDialog(weld::Window* 
i_pParent, int i_nMax)
 
 //just multiply largest value by 10 and take the width of that string as
 //the max size we will want
-OUString aNewText( maStr.replaceFirst( "%p", OUString::number( mnMax * 10 
) ) );
-aNewText = aNewText.replaceFirst( "%n", OUString::number( mnMax * 10 ) );
-mxText->set_label( aNewText );
+mxText->set_label(getNewLabel(maStr, mnMax * 10, mnMax * 10));
 mxText->set_size_request(mxText->get_preferred_size().Width(), -1);
 
 //Pick a useful max width
 mxProgress->set_size_request(mxProgress->get_approximate_digit_width() * 
25, -1);
 
 mxButton->connect_clicked( LINK( this, PrintProgressDialog, ClickHdl ) );
+
+// after this patch f7157f04fab298423e2c4f6a7e5f8e361164b15f, we have seen 
the calc Max string (sometimes) look above
+// now init to the right start vaules
+mxText->set_label(getNewLabel(maStr, mnCur, mnMax));
 }
 
 PrintProgressDialog::~PrintProgressDialog()
@@ -2197,11 +2208,10 @@ void PrintProgressDialog::setProgress( int i_nCurrent )
 if( mnMax < 1 )
 mnMax = 1;
 
-mxProgress->set_percentage(mnCur*100/mnMax);
+mxText->set_label(getNewLabel(maStr, mnCur, mnMax));
 
-OUString aNewText( maStr.replaceFirst( "%p", OUString::number( mnCur ) ) );
-aNewText = aNewText.replaceFirst( "%n", OUString::number( mnMax ) );
-mxText->set_label( aNewText );
+// here view the dialog, with the right label
+mxProgress->set_percentage(mnCur*100/mnMax);
 }
 
 void PrintProgressDialog::tick()
commit 8f46d8eb881264228ca385b7a3730e002b807e3e
Author: Samuel Mehrbrodt 
AuthorDate: Mon Oct 5 11:09:20 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Wed Oct 7 15:17:13 2020 +0200

Use idle to update preview in print dlg

Otherwise UI blocks while the preview is being updated

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

diff --git a/vcl/inc/printdlg.hxx b/vcl/inc/printdlg.hxx
index 0fbfcb62bcc1..b6926074e0be

[Libreoffice-commits] core.git: Branch 'feature/cib_contract891' - external/nss

2020-10-07 Thread Samuel Mehrbrodt (via logerrit)
 external/nss/UnpackedTarball_nss.mk |1 
 external/nss/nss.oldglibc.patch.1   |   47 
 2 files changed, 48 insertions(+)

New commits:
commit 6626202319a56521d0d583c7b0296f8b07bdf77d
Author: Samuel Mehrbrodt 
AuthorDate: Wed Oct 7 16:17:06 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Wed Oct 7 16:17:20 2020 +0200

Fix nss build on centos 5 baseline

glic too old

Change-Id: I7050d87f8c84780feb154ec3ff5fc5535247cd9e

diff --git a/external/nss/UnpackedTarball_nss.mk 
b/external/nss/UnpackedTarball_nss.mk
index cf7ad65803a1..047ee11c8377 100644
--- a/external/nss/UnpackedTarball_nss.mk
+++ b/external/nss/UnpackedTarball_nss.mk
@@ -20,6 +20,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,nss,\
 $(if $(findstring 120_70,$(VCVER)_$(WINDOWS_SDK_VERSION)), \
 external/nss/nss-winXP-sdk.patch.1) \
$(if $(filter WNTMSC,$(OS)$(COM)),external/nss/nss-no-c99.patch) \
+   external/nss/nss.oldglibc.patch.1 \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/nss/nss.oldglibc.patch.1 
b/external/nss/nss.oldglibc.patch.1
new file mode 100644
index ..8cc5ed1de232
--- /dev/null
+++ b/external/nss/nss.oldglibc.patch.1
@@ -0,0 +1,47 @@
+diff -ur 
nss.org/nss/lib/freebl/verified/kremlin/include/kremlin/lowstar_endianness.h 
nss/nss/lib/freebl/verified/kremlin/include/kremlin/lowstar_endianness.h
+--- 
nss.org/nss/lib/freebl/verified/kremlin/include/kremlin/lowstar_endianness.h
   2020-10-07 16:00:10.454610384 +0200
 nss/nss/lib/freebl/verified/kremlin/include/kremlin/lowstar_endianness.h   
2020-10-07 16:03:18.185698074 +0200
+@@ -198,6 +198,43 @@
+ memcpy(b, , 8);
+ }
+
++
++#if !defined(__bswap_constant_64)
++
++static __inline __uint64_t
++__uint64_identity (__uint64_t __x)
++{
++  return __x;
++}
++
++/* Swap bytes in 64-bit value.  */
++#define __bswap_constant_64(x)\
++  x) & 0xff00ull) >> 56)  \
++   | (((x) & 0x00ffull) >> 40)\
++   | (((x) & 0xff00ull) >> 24)\
++   | (((x) & 0x00ffull) >> 8) \
++   | (((x) & 0xff00ull) << 8) \
++   | (((x) & 0x00ffull) << 24)\
++   | (((x) & 0xff00ull) << 40)\
++   | (((x) & 0x00ffull) << 56))
++
++__extension__ static __inline __uint64_t
++__bswap_64 (__uint64_t __bsx)
++{
++#if __GNUC_PREREQ (4, 3)
++  return __builtin_bswap64 (__bsx);
++#else
++  return __bswap_constant_64 (__bsx);
++#endif
++}
++
++#  define htobe64(x) __bswap_64 (x)
++#  define htole64(x) __uint64_identity (x)
++#  define be64toh(x) __bswap_64 (x)
++#  define le64toh(x) __uint64_identity (x)
++
++#endif // glib version
++
+ /* Legacy accessors so that this header can serve as an implementation of
+  * C.Endianness */
+ #define load16_le(b) (le16toh(load16(b)))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/cib_contract891' - download.lst

2020-10-06 Thread Samuel Mehrbrodt (via logerrit)
 download.lst |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 09421f477e1277c2f16633276859f9aa95ba50fc
Author: Samuel Mehrbrodt 
AuthorDate: Tue Oct 6 09:37:35 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Tue Oct 6 09:37:35 2020 +0200

Use repacked libxml2 to work with older tar version

Change-Id: Iaef042e651a84557b62d9de07f9d5f2fff693251

diff --git a/download.lst b/download.lst
index 82a49260fb41..3bb30b3e52f5 100644
--- a/download.lst
+++ b/download.lst
@@ -96,9 +96,9 @@ export LIBXMLSEC_TARBALL := 
1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.
 export LIBXSLT_MD5SUM := db8765c8d076f1b6caafd9f2542a304a
 export LIBXSLT_VERSION_MICRO := 34
 export LIBXSLT_TARBALL := libxslt-1.1.$(LIBXSLT_VERSION_MICRO).tar.gz
-export LIBXML_MD5SUM := 10942a1dc23137a8aa07f0639cbfece5
+export LIBXML_MD5SUM := 52f4a18bcdbb167b0dd33c21c4c2094a
 export LIBXML_VERSION_MICRO := 10
-export LIBXML_TARBALL := libxml2-2.9.$(LIBXML_VERSION_MICRO).tar.gz
+export LIBXML_TARBALL := libxml2-2.9.$(LIBXML_VERSION_MICRO)_repack.tar.gz
 export LPSOLVE_TARBALL := 26b3e95ddf3d9c077c480ea45874b3b8-lp_solve_5.5.tar.gz
 export MARIADB_TARBALL := 
05f84c95b610c21c5fd510d10debcabf-mariadb-native-client-1.0.0.tar.bz2
 export MDDS_TARBALL := a67a46ec9d00d283a7cd8dbdd2906b59-mdds_0.11.0.tar.bz2
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-10-06 Thread Samuel Mehrbrodt (via logerrit)
 vcl/inc/printdlg.hxx   |6 +
 vcl/source/window/printdlg.cxx |   48 +
 2 files changed, 40 insertions(+), 14 deletions(-)

New commits:
commit 93c833e848a4406f36bcb7925928554bb104aa32
Author: Samuel Mehrbrodt 
AuthorDate: Mon Oct 5 11:09:20 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Tue Oct 6 08:01:55 2020 +0200

Use idle to update preview in print dlg

Otherwise UI blocks while the preview is being updated

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

diff --git a/vcl/inc/printdlg.hxx b/vcl/inc/printdlg.hxx
index 7c6c1005fd12..3e337057d042 100644
--- a/vcl/inc/printdlg.hxx
+++ b/vcl/inc/printdlg.hxx
@@ -22,6 +22,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -222,6 +223,11 @@ namespace vcl
 
 Paper   mePaper;
 
+Idle maUpdatePreviewIdle;
+DECL_LINK(updatePreviewIdle, Timer*, void);
+Idle maUpdatePreviewNoCacheIdle;
+DECL_LINK(updatePreviewNoCacheIdle, Timer*, void);
+
 DECL_LINK( ClickHdl, weld::Button&, void );
 DECL_LINK( SelectHdl, weld::ComboBox&, void );
 DECL_LINK( ActivateHdl, weld::Entry&, bool );
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index e9d35f96dd72..d68b4decc335 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -578,6 +578,8 @@ PrintDialog::PrintDialog(weld::Window* i_pWindow, const 
std::shared_ptrget_label();
@@ -651,6 +653,11 @@ PrintDialog::PrintDialog(weld::Window* i_pWindow, const 
std::shared_ptrgetMultipage() );
 
 // setup optional UI options set by application
@@ -895,6 +902,16 @@ void PrintDialog::setPreviewText()
 mxNumPagesText->set_label( aNewText );
 }
 
+IMPL_LINK_NOARG(PrintDialog, updatePreviewIdle, Timer*, void)
+{
+preparePreview(true);
+}
+
+IMPL_LINK_NOARG(PrintDialog, updatePreviewNoCacheIdle, Timer*, void)
+{
+preparePreview(false);
+}
+
 void PrintDialog::preparePreview( bool i_bMayUseCache )
 {
 VclPtr aPrt( maPController->getPrinter() );
@@ -1138,7 +1155,10 @@ void PrintDialog::updateNup( bool i_bMayUseCache )
 
 mxNupOrder->setValues( aMPS.nOrder, nCols, nRows );
 
-preparePreview( i_bMayUseCache );
+if (i_bMayUseCache)
+maUpdatePreviewIdle.Start();
+else
+maUpdatePreviewNoCacheIdle.Start();
 }
 
 void PrintDialog::updateNupFromPages( bool i_bMayUseCache )
@@ -1794,7 +1814,7 @@ IMPL_LINK(PrintDialog, ClickHdl, weld::Button&, rButton, 
void)
 }
 else if (  == mxPreviewBox.get() )
 {
-preparePreview( true );
+maUpdatePreviewIdle.Start();
 }
 else if(  == mxForwardBtn.get() )
 {
@@ -1823,7 +1843,7 @@ IMPL_LINK(PrintDialog, ClickHdl, weld::Button&, rButton, 
void)
 checkOptionalControlDependencies();
 
 // update preview and page settings
-preparePreview(false);
+maUpdatePreviewNoCacheIdle.Start();
 }
 if( mxBrochureBtn->get_active() )
 {
@@ -1854,7 +1874,7 @@ IMPL_LINK(PrintDialog, ClickHdl, weld::Button&, rButton, 
void)
 maPController->setReversePrint( bChecked );
 maPController->setValue( "PrintReverse",
  makeAny( bChecked ) );
-preparePreview( true );
+maUpdatePreviewIdle.Start();
 }
 else if(  == mxBorderCB.get() )
 {
@@ -1894,7 +1914,7 @@ IMPL_LINK(PrintDialog, ClickHdl, weld::Button&, rButton, 
void)
 setupPaperSidesBox();
 
 // tdf#63905 don't use cache: page size may change
-preparePreview(false);
+maUpdatePreviewNoCacheIdle.Start();
 }
 checkControlDependencies();
 }
@@ -1918,7 +1938,7 @@ IMPL_LINK( PrintDialog, SelectHdl, weld::ComboBox&, rBox, 
void )
 mxOKButton->set_label(maPrintText);
 updatePrinterText();
 setPaperSizes();
-preparePreview(true);
+maUpdatePreviewIdle.Start();
 }
 else // print to file
 {
@@ -1929,7 +1949,7 @@ IMPL_LINK( PrintDialog, SelectHdl, weld::ComboBox&, rBox, 
void )
 
 setPaperSizes();
 updateOrientationBox();
-preparePreview( true );
+maUpdatePreviewIdle.Start();
 }
 
 setupPaperSidesBox();
@@ -1973,7 +1993,7 @@ IMPL_LINK( PrintDialog, SelectHdl, weld::ComboBox&, rBox, 
void )
 checkPaperSize( aPaperSize );
 maPController->setPaperSizeFromUser( aPaperSize );
 
-preparePreview(true);
+maUpdatePreviewIdle.Start();
 }
 }
 
@@ -2005,7 +2025,7 @@ IMPL_LINK_NOARG(PrintDialog, ActivateHdl, weld::Entry&, 
bool)
 if (nNewCurPage != mn

[Libreoffice-commits] core.git: Branch 'feature/cib_contract891c' - 7 commits - configure.ac include/tools include/vcl include/xmlsecurity sal/osl sfx2/source tools/source vcl/Library_vcl.mk vcl/qa vc

2020-10-01 Thread Samuel Mehrbrodt (via logerrit)
Rebased ref, commits from common ancestor:
commit e951f98ef5d713a130b8c1ef28bff79de8278f51
Author: Samuel Mehrbrodt 
AuthorDate: Tue Sep 29 09:22:04 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Thu Oct 1 10:53:30 2020 +0200

Release 5.4.11

Change-Id: I94f4cb91b1cf92722ff43d3561ba0cf2405a6a29

diff --git a/configure.ac b/configure.ac
index 83fe089baf59..af7fc01b8195 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for 
the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no 
idea.
 
-AC_INIT([LibreOffice],[5.4.10.0],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[5.4.11.0],[],[],[http://documentfoundation.org/])
 
 AC_PREREQ([2.59])
 
commit f1682f0f324c4298ef1a5d33c3c68b6a8471f3ae
Author: Miklos Vajna 
AuthorDate: Fri Sep 4 17:17:48 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Thu Oct 1 10:53:30 2020 +0200

xmlsecurity: pdf incremental updates that are non-commenting are invalid

I.e. it's OK to add incremental updates for annotation/commenting
purposes and that doesn't invalite existing signatures. Everything else
does.

(cherry picked from commit 61834cd574568613f0b0a2ee099a60fa5a8d9804)

Conflicts:
include/vcl/filter/PDFiumLibrary.hxx
vcl/source/pdf/PDFiumLibrary.cxx

Conflicts:
xmlsecurity/qa/unit/signing/signing.cxx

Change-Id: I4607c242b3c6f6b01517b02407e9e7a095e2e069

diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx
index 0bc3766807fa..608f7f0adde0 100644
--- a/include/tools/stream.hxx
+++ b/include/tools/stream.hxx
@@ -257,6 +257,7 @@ public:
 SvStream&   WriteOString(const OString& rStr)
 { return WriteCharPtr(rStr.getStr()); }
 SvStream&   WriteStream( SvStream& rStream );
+sal_uInt64  WriteStream( SvStream& rStream, sal_uInt64 nSize );
 
 SvStream&   WriteBool( bool b )
 { return WriteUChar(static_cast(b)); }
diff --git a/include/vcl/filter/PDFiumLibrary.hxx 
b/include/vcl/filter/PDFiumLibrary.hxx
index b9bceabb8acf..ffc70874c19b 100644
--- a/include/vcl/filter/PDFiumLibrary.hxx
+++ b/include/vcl/filter/PDFiumLibrary.hxx
@@ -17,11 +17,16 @@
 #include 
 #include 
 #include 
+#include 
+
+#include 
 
 namespace vcl
 {
 namespace pdf
 {
+class PDFiumDocument;
+
 class VCL_DLLPUBLIC PDFium final
 {
 private:
@@ -33,6 +38,49 @@ public:
 ~PDFium();
 };
 
+class VCL_DLLPUBLIC PDFiumPage final
+{
+private:
+FPDF_PAGE mpPage;
+
+private:
+PDFiumPage(const PDFiumPage&) = delete;
+PDFiumPage& operator=(const PDFiumPage&) = delete;
+
+public:
+PDFiumPage(FPDF_PAGE pPage)
+: mpPage(pPage)
+{
+}
+
+~PDFiumPage()
+{
+if (mpPage)
+FPDF_ClosePage(mpPage);
+}
+
+/// Get bitmap checksum of the page, without annotations/commenting.
+BitmapChecksum getChecksum();
+};
+
+class VCL_DLLPUBLIC PDFiumDocument final
+{
+private:
+FPDF_DOCUMENT mpPdfDocument;
+
+private:
+PDFiumDocument(const PDFiumDocument&) = delete;
+PDFiumDocument& operator=(const PDFiumDocument&) = delete;
+
+public:
+PDFiumDocument(FPDF_DOCUMENT pPdfDocument);
+~PDFiumDocument();
+
+int getPageCount();
+
+std::unique_ptr openPage(int nIndex);
+};
+
 struct PDFiumLibrary : public rtl::StaticWithInit, 
PDFiumLibrary>
 {
 std::shared_ptr operator()() { return std::make_shared(); }
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index 488348719892..b83729e35fbf 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -1176,6 +1176,27 @@ SvStream& SvStream::WriteStream( SvStream& rStream )
 return *this;
 }
 
+sal_uInt64 SvStream::WriteStream( SvStream& rStream, sal_uInt64 nSize )
+{
+const sal_uInt32 cBufLen = 0x8000;
+std::unique_ptr pBuf( new char[ cBufLen ] );
+sal_uInt32 nCurBufLen = cBufLen;
+sal_uInt32 nCount;
+sal_uInt64 nWriteSize = nSize;
+
+do {
+if ( nSize >= nCurBufLen )
+nWriteSize -= nCurBufLen;
+else
+nCurBufLen = nWriteSize;
+nCount = rStream.ReadBytes( pBuf.get(), nCurBufLen );
+WriteBytes( pBuf.get(), nCount );
+}
+while( nWriteSize && nCount == nCurBufLen );
+
+return nSize - nWriteSize;
+}
+
 OUString SvStream::ReadUniOrByteString( rtl_TextEncoding eSrcCharSet )
 {
 // read UTF-16 string directly from stream ?
diff --git a/vcl/source/pdf/PDFiumLibrary.cxx b/vcl/source/pdf/PDFiumLibrary.cxx
index 5f487b15f48b..38eb88a99db0 100644
--- a/vcl/source/pdf/PDFiumLibrary.cxx
+++ b/vcl/source/pdf/PDFiumLibrary.cxx
@@ -15,6 +15,10 @@
 #include 
 #include 
 
+#include 
+#include 
+#include 
+
 namespace vcl
 {
 namespace pdf
@@ -

[Libreoffice-commits] core.git: Branch 'feature/cib_contract891c' - 2 commits - configure.ac include/tools include/vcl tools/source vcl/source xmlsecurity/Library_xmlsecurity.mk xmlsecurity/qa xmlsecu

2020-10-01 Thread Samuel Mehrbrodt (via logerrit)
Rebased ref, commits from common ancestor:
commit 3ac43088158476d32701d00e7d517440b128c1a4
Author: Samuel Mehrbrodt 
AuthorDate: Tue Sep 29 09:22:04 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Thu Oct 1 10:45:07 2020 +0200

Release 5.4.11

Change-Id: I94f4cb91b1cf92722ff43d3561ba0cf2405a6a29

diff --git a/configure.ac b/configure.ac
index 83fe089baf59..af7fc01b8195 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for 
the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no 
idea.
 
-AC_INIT([LibreOffice],[5.4.10.0],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[5.4.11.0],[],[],[http://documentfoundation.org/])
 
 AC_PREREQ([2.59])
 
commit fba3e52b85c2d4d4a5e2f7394c4fe6f3a70405b9
Author: Miklos Vajna 
AuthorDate: Fri Sep 4 17:17:48 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Thu Oct 1 10:45:03 2020 +0200

xmlsecurity: pdf incremental updates that are non-commenting are invalid

I.e. it's OK to add incremental updates for annotation/commenting
purposes and that doesn't invalite existing signatures. Everything else
does.

(cherry picked from commit 61834cd574568613f0b0a2ee099a60fa5a8d9804)

Conflicts:
include/vcl/filter/PDFiumLibrary.hxx
vcl/source/pdf/PDFiumLibrary.cxx

Conflicts:
xmlsecurity/qa/unit/signing/signing.cxx

Change-Id: I4607c242b3c6f6b01517b02407e9e7a095e2e069

diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx
index 0bc3766807fa..608f7f0adde0 100644
--- a/include/tools/stream.hxx
+++ b/include/tools/stream.hxx
@@ -257,6 +257,7 @@ public:
 SvStream&   WriteOString(const OString& rStr)
 { return WriteCharPtr(rStr.getStr()); }
 SvStream&   WriteStream( SvStream& rStream );
+sal_uInt64  WriteStream( SvStream& rStream, sal_uInt64 nSize );
 
 SvStream&   WriteBool( bool b )
 { return WriteUChar(static_cast(b)); }
diff --git a/include/vcl/filter/PDFiumLibrary.hxx 
b/include/vcl/filter/PDFiumLibrary.hxx
index b9bceabb8acf..ffc70874c19b 100644
--- a/include/vcl/filter/PDFiumLibrary.hxx
+++ b/include/vcl/filter/PDFiumLibrary.hxx
@@ -17,11 +17,16 @@
 #include 
 #include 
 #include 
+#include 
+
+#include 
 
 namespace vcl
 {
 namespace pdf
 {
+class PDFiumDocument;
+
 class VCL_DLLPUBLIC PDFium final
 {
 private:
@@ -33,6 +38,49 @@ public:
 ~PDFium();
 };
 
+class VCL_DLLPUBLIC PDFiumPage final
+{
+private:
+FPDF_PAGE mpPage;
+
+private:
+PDFiumPage(const PDFiumPage&) = delete;
+PDFiumPage& operator=(const PDFiumPage&) = delete;
+
+public:
+PDFiumPage(FPDF_PAGE pPage)
+: mpPage(pPage)
+{
+}
+
+~PDFiumPage()
+{
+if (mpPage)
+FPDF_ClosePage(mpPage);
+}
+
+/// Get bitmap checksum of the page, without annotations/commenting.
+BitmapChecksum getChecksum();
+};
+
+class VCL_DLLPUBLIC PDFiumDocument final
+{
+private:
+FPDF_DOCUMENT mpPdfDocument;
+
+private:
+PDFiumDocument(const PDFiumDocument&) = delete;
+PDFiumDocument& operator=(const PDFiumDocument&) = delete;
+
+public:
+PDFiumDocument(FPDF_DOCUMENT pPdfDocument);
+~PDFiumDocument();
+
+int getPageCount();
+
+std::unique_ptr openPage(int nIndex);
+};
+
 struct PDFiumLibrary : public rtl::StaticWithInit, 
PDFiumLibrary>
 {
 std::shared_ptr operator()() { return std::make_shared(); }
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index 488348719892..b83729e35fbf 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -1176,6 +1176,27 @@ SvStream& SvStream::WriteStream( SvStream& rStream )
 return *this;
 }
 
+sal_uInt64 SvStream::WriteStream( SvStream& rStream, sal_uInt64 nSize )
+{
+const sal_uInt32 cBufLen = 0x8000;
+std::unique_ptr pBuf( new char[ cBufLen ] );
+sal_uInt32 nCurBufLen = cBufLen;
+sal_uInt32 nCount;
+sal_uInt64 nWriteSize = nSize;
+
+do {
+if ( nSize >= nCurBufLen )
+nWriteSize -= nCurBufLen;
+else
+nCurBufLen = nWriteSize;
+nCount = rStream.ReadBytes( pBuf.get(), nCurBufLen );
+WriteBytes( pBuf.get(), nCount );
+}
+while( nWriteSize && nCount == nCurBufLen );
+
+return nSize - nWriteSize;
+}
+
 OUString SvStream::ReadUniOrByteString( rtl_TextEncoding eSrcCharSet )
 {
 // read UTF-16 string directly from stream ?
diff --git a/vcl/source/pdf/PDFiumLibrary.cxx b/vcl/source/pdf/PDFiumLibrary.cxx
index 5f487b15f48b..38eb88a99db0 100644
--- a/vcl/source/pdf/PDFiumLibrary.cxx
+++ b/vcl/source/pdf/PDFiumLibrary.cxx
@@ -15,6 +15,10 @@
 #include 
 #include 
 
+#include 
+#include 
+#include 
+
 namespace vcl
 {
 namespace pdf
@@ -

[Libreoffice-commits] core.git: Branch 'feature/cib_contract891c' - 14 commits - comphelper/source configure.ac download.lst external/icu external/nss include/tools include/vcl include/xmlsecurity pac

2020-10-01 Thread Samuel Mehrbrodt (via logerrit)
Rebased ref, commits from common ancestor:
commit 1dbc9853fd68d7838eb3908e07e9b72c121ee61a
Author: Samuel Mehrbrodt 
AuthorDate: Tue Sep 29 09:22:04 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Thu Oct 1 08:41:24 2020 +0200

Release 5.4.11

Change-Id: I94f4cb91b1cf92722ff43d3561ba0cf2405a6a29

diff --git a/configure.ac b/configure.ac
index 83fe089baf59..af7fc01b8195 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for 
the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no 
idea.
 
-AC_INIT([LibreOffice],[5.4.10.0],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[5.4.11.0],[],[],[http://documentfoundation.org/])
 
 AC_PREREQ([2.59])
 
commit dbfba365dc9f619e82f6e77e5e85ae4bb0e138d4
Author: Miklos Vajna 
AuthorDate: Fri Sep 4 17:17:48 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Thu Oct 1 08:41:24 2020 +0200

xmlsecurity: pdf incremental updates that are non-commenting are invalid

I.e. it's OK to add incremental updates for annotation/commenting
purposes and that doesn't invalite existing signatures. Everything else
does.

(cherry picked from commit 61834cd574568613f0b0a2ee099a60fa5a8d9804)

Conflicts:
include/vcl/filter/PDFiumLibrary.hxx
vcl/source/pdf/PDFiumLibrary.cxx

Conflicts:
xmlsecurity/qa/unit/signing/signing.cxx

Change-Id: I4607c242b3c6f6b01517b02407e9e7a095e2e069

diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx
index 0bc3766807fa..608f7f0adde0 100644
--- a/include/tools/stream.hxx
+++ b/include/tools/stream.hxx
@@ -257,6 +257,7 @@ public:
 SvStream&   WriteOString(const OString& rStr)
 { return WriteCharPtr(rStr.getStr()); }
 SvStream&   WriteStream( SvStream& rStream );
+sal_uInt64  WriteStream( SvStream& rStream, sal_uInt64 nSize );
 
 SvStream&   WriteBool( bool b )
 { return WriteUChar(static_cast(b)); }
diff --git a/include/vcl/filter/PDFiumLibrary.hxx 
b/include/vcl/filter/PDFiumLibrary.hxx
index b9bceabb8acf..ffc70874c19b 100644
--- a/include/vcl/filter/PDFiumLibrary.hxx
+++ b/include/vcl/filter/PDFiumLibrary.hxx
@@ -17,11 +17,16 @@
 #include 
 #include 
 #include 
+#include 
+
+#include 
 
 namespace vcl
 {
 namespace pdf
 {
+class PDFiumDocument;
+
 class VCL_DLLPUBLIC PDFium final
 {
 private:
@@ -33,6 +38,49 @@ public:
 ~PDFium();
 };
 
+class VCL_DLLPUBLIC PDFiumPage final
+{
+private:
+FPDF_PAGE mpPage;
+
+private:
+PDFiumPage(const PDFiumPage&) = delete;
+PDFiumPage& operator=(const PDFiumPage&) = delete;
+
+public:
+PDFiumPage(FPDF_PAGE pPage)
+: mpPage(pPage)
+{
+}
+
+~PDFiumPage()
+{
+if (mpPage)
+FPDF_ClosePage(mpPage);
+}
+
+/// Get bitmap checksum of the page, without annotations/commenting.
+BitmapChecksum getChecksum();
+};
+
+class VCL_DLLPUBLIC PDFiumDocument final
+{
+private:
+FPDF_DOCUMENT mpPdfDocument;
+
+private:
+PDFiumDocument(const PDFiumDocument&) = delete;
+PDFiumDocument& operator=(const PDFiumDocument&) = delete;
+
+public:
+PDFiumDocument(FPDF_DOCUMENT pPdfDocument);
+~PDFiumDocument();
+
+int getPageCount();
+
+std::unique_ptr openPage(int nIndex);
+};
+
 struct PDFiumLibrary : public rtl::StaticWithInit, 
PDFiumLibrary>
 {
 std::shared_ptr operator()() { return std::make_shared(); }
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index 488348719892..b83729e35fbf 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -1176,6 +1176,27 @@ SvStream& SvStream::WriteStream( SvStream& rStream )
 return *this;
 }
 
+sal_uInt64 SvStream::WriteStream( SvStream& rStream, sal_uInt64 nSize )
+{
+const sal_uInt32 cBufLen = 0x8000;
+std::unique_ptr pBuf( new char[ cBufLen ] );
+sal_uInt32 nCurBufLen = cBufLen;
+sal_uInt32 nCount;
+sal_uInt64 nWriteSize = nSize;
+
+do {
+if ( nSize >= nCurBufLen )
+nWriteSize -= nCurBufLen;
+else
+nCurBufLen = nWriteSize;
+nCount = rStream.ReadBytes( pBuf.get(), nCurBufLen );
+WriteBytes( pBuf.get(), nCount );
+}
+while( nWriteSize && nCount == nCurBufLen );
+
+return nSize - nWriteSize;
+}
+
 OUString SvStream::ReadUniOrByteString( rtl_TextEncoding eSrcCharSet )
 {
 // read UTF-16 string directly from stream ?
diff --git a/vcl/source/pdf/PDFiumLibrary.cxx b/vcl/source/pdf/PDFiumLibrary.cxx
index 5f487b15f48b..02c86622dfaf 100644
--- a/vcl/source/pdf/PDFiumLibrary.cxx
+++ b/vcl/source/pdf/PDFiumLibrary.cxx
@@ -15,6 +15,9 @@
 #include 
 #include 
 
+#include 
+#include 
+
 namespace vcl
 {
 namespace pdf
@@ -

[Libreoffice-commits] core.git: Branch 'feature/cib_contract891' - 8 commits - comphelper/source external/icu forms/source framework/source .gitreview include/o3tl package/source sal/osl sc/source sfx

2020-09-30 Thread Samuel Mehrbrodt (via logerrit)
Rebased ref, commits from common ancestor:
commit 0fba78be1fe75270bb368911318c5816ceae8e2c
Author: Samuel Mehrbrodt 
AuthorDate: Tue Sep 29 11:26:37 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Wed Sep 30 09:55:30 2020 +0200

Update .gitreview

Change-Id: I999d8a5c1ecad30849ac906ec7cdf3b48604e87e

diff --git a/.gitreview b/.gitreview
index 710fd1e8178e..a8e0ea8b49cc 100644
--- a/.gitreview
+++ b/.gitreview
@@ -3,5 +3,5 @@ host=logerrit
 port=29418
 project=core
 defaultremote=logerrit
-defaultbranch=libreoffice-4-2
+defaultbranch=feature/cib_contract891
 
commit 5dcbfd01fd2791a0e60f321fb8d1a71f74eb4340
Author: Mike Kaganski 
AuthorDate: Fri Jan 3 22:40:07 2020 +0300
Commit: Samuel Mehrbrodt 
CommitDate: Wed Sep 30 09:53:39 2020 +0200

tdf#93389: keep encryption information for autorecovered MS formats

The autorecovery data is stored in ODF, regardless of the original
document format. When restoring, type detection generates ODF data,
which is stored in the media descriptor attached to document, even
after real filter was restored (see AutoRecovery::implts_openDocs).
If real filter is not ODF, then at the save time, it doesn't find
necessary information in encryption data, and makes not encrypted
package.

This patch adds both MS binary data, and OOXML data, to existing
ODF data for recovered password-protected documents (regardless of
their real filter).

TODO: only add required information to encryption data: pass real
filter name to DocPasswordHelper::requestAndVerifyDocPassword from
AutoRecovery::implts_openDocs.

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86201
Reviewed-by: Mike Kaganski 
Tested-by: Mike Kaganski 
(cherry picked from commit dd198398b6e5c84ab1255a90ef96e6445b66a64f)

Conflicts:
comphelper/source/misc/docpasswordhelper.cxx

(cherry picked from commit 6017cdff264afc3b98beeba1330d6df28102fe7a)

Change-Id: I4717f067ad3c40167312b99eefef5584a467bfed

diff --git a/comphelper/source/misc/docpasswordhelper.cxx 
b/comphelper/source/misc/docpasswordhelper.cxx
index 3e6a12f7cab1..d36134e602e9 100644
--- a/comphelper/source/misc/docpasswordhelper.cxx
+++ b/comphelper/source/misc/docpasswordhelper.cxx
@@ -19,6 +19,7 @@
 
 
 #include "comphelper/docpasswordhelper.hxx"
+#include 
 #include 
 #include 
 #include 
@@ -352,6 +353,25 @@ Sequence< sal_Int8 > 
DocPasswordHelper::GetXLHashAsSequence(
 OUString aPassword;
 DocPasswordVerifierResult eResult = 
DocPasswordVerifierResult_WRONG_PASSWORD;
 
+sal_Int32 nMediaEncDataCount = rMediaEncData.getLength();
+
+// tdf#93389: if the document is being restored from autorecovery, we need 
to add encryption
+// data also for real document type.
+// TODO: get real filter name here (from CheckPasswd_Impl), to only add 
necessary data
+bool bForSalvage = false;
+if (nMediaEncDataCount)
+{
+for (auto& val : rMediaEncData)
+{
+if (val.Name == "ForSalvage")
+{
+--nMediaEncDataCount; // don't consider this element below
+val.Value >>= bForSalvage;
+break;
+}
+}
+}
+
 // first, try provided default passwords
 if( pbIsDefaultPassword )
 *pbIsDefaultPassword = false;
@@ -376,7 +396,7 @@ Sequence< sal_Int8 > DocPasswordHelper::GetXLHashAsSequence(
 // try media encryption data (skip, if result is OK or ABORT)
 if( eResult == DocPasswordVerifierResult_WRONG_PASSWORD )
 {
-if( rMediaEncData.getLength() > 0 )
+if (nMediaEncDataCount)
 {
 eResult = rVerifier.verifyEncryptionData( rMediaEncData );
 if( eResult == DocPasswordVerifierResult_OK )
@@ -436,6 +456,26 @@ Sequence< sal_Int8 > 
DocPasswordHelper::GetXLHashAsSequence(
 aEncData, 
OStorageHelper::CreatePackageEncryptionData(aPassword));
 }
 }
+
+if (bForSalvage)
+{
+// TODO: add individual methods for different target filter, and 
only call what's needed
+
+// 1. Prepare binary MS formats encryption data
+auto aUniqueID = GenerateRandomByteSequence(16);
+auto aEnc97Key = GenerateStd97Key(aPassword.getStr(), aUniqueID);
+// 2. Add MS binary and OOXML encryption data to result
+uno::Sequence< beans::NamedValue > aContainer(3);
+aContainer[0].Name = "STD97EncryptionKey";
+aContainer[0].Value <<= aEnc97Key;
+aContainer[1].Name = "STD97UniqueID";
+aContainer[1].Value <<= aUniqueID;
+aContainer[2].Name = "OOXPassword";
+aContainer[2].Value <<= aPassword;
+
+aEncData = comphelper::concatSequences(
+aEncData, aContaine

[Libreoffice-commits] core.git: Branch 'feature/cib_contract891' - 5 commits - comphelper/source external/icu framework/source .gitreview include/o3tl package/source sfx2/source

2020-09-29 Thread Samuel Mehrbrodt (via logerrit)
Rebased ref, commits from common ancestor:
commit ca9206fd7a8137b9546ace52c9403b53f4b02a0b
Author: Samuel Mehrbrodt 
AuthorDate: Tue Sep 29 11:26:37 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Tue Sep 29 15:17:41 2020 +0200

Update .gitreview

Change-Id: I999d8a5c1ecad30849ac906ec7cdf3b48604e87e

diff --git a/.gitreview b/.gitreview
index 710fd1e8178e..a8e0ea8b49cc 100644
--- a/.gitreview
+++ b/.gitreview
@@ -3,5 +3,5 @@ host=logerrit
 port=29418
 project=core
 defaultremote=logerrit
-defaultbranch=libreoffice-4-2
+defaultbranch=feature/cib_contract891
 
commit 1d3ebf5d677ece6cd18c3adedcaf2a73827912b3
Author: Mike Kaganski 
AuthorDate: Fri Jan 3 22:40:07 2020 +0300
Commit: Samuel Mehrbrodt 
CommitDate: Tue Sep 29 15:17:41 2020 +0200

tdf#93389: keep encryption information for autorecovered MS formats

The autorecovery data is stored in ODF, regardless of the original
document format. When restoring, type detection generates ODF data,
which is stored in the media descriptor attached to document, even
after real filter was restored (see AutoRecovery::implts_openDocs).
If real filter is not ODF, then at the save time, it doesn't find
necessary information in encryption data, and makes not encrypted
package.

This patch adds both MS binary data, and OOXML data, to existing
ODF data for recovered password-protected documents (regardless of
their real filter).

TODO: only add required information to encryption data: pass real
filter name to DocPasswordHelper::requestAndVerifyDocPassword from
AutoRecovery::implts_openDocs.

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86201
Reviewed-by: Mike Kaganski 
Tested-by: Mike Kaganski 
(cherry picked from commit dd198398b6e5c84ab1255a90ef96e6445b66a64f)

Conflicts:
comphelper/source/misc/docpasswordhelper.cxx

(cherry picked from commit 6017cdff264afc3b98beeba1330d6df28102fe7a)

Change-Id: I4717f067ad3c40167312b99eefef5584a467bfed

diff --git a/comphelper/source/misc/docpasswordhelper.cxx 
b/comphelper/source/misc/docpasswordhelper.cxx
index 2120b4a3e3cc..16405276fdcb 100644
--- a/comphelper/source/misc/docpasswordhelper.cxx
+++ b/comphelper/source/misc/docpasswordhelper.cxx
@@ -19,6 +19,8 @@
 
 
 #include "comphelper/docpasswordhelper.hxx"
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -351,6 +353,25 @@ Sequence< sal_Int8 > 
DocPasswordHelper::GetXLHashAsSequence(
 OUString aPassword;
 DocPasswordVerifierResult eResult = 
DocPasswordVerifierResult_WRONG_PASSWORD;
 
+sal_Int32 nMediaEncDataCount = rMediaEncData.getLength();
+
+// tdf#93389: if the document is being restored from autorecovery, we need 
to add encryption
+// data also for real document type.
+// TODO: get real filter name here (from CheckPasswd_Impl), to only add 
necessary data
+bool bForSalvage = false;
+if (nMediaEncDataCount)
+{
+for (auto& val : rMediaEncData)
+{
+if (val.Name == "ForSalvage")
+{
+--nMediaEncDataCount; // don't consider this element below
+val.Value >>= bForSalvage;
+break;
+}
+}
+}
+
 // first, try provided default passwords
 if( pbIsDefaultPassword )
 *pbIsDefaultPassword = false;
@@ -375,7 +396,7 @@ Sequence< sal_Int8 > DocPasswordHelper::GetXLHashAsSequence(
 // try media encryption data (skip, if result is OK or ABORT)
 if( eResult == DocPasswordVerifierResult_WRONG_PASSWORD )
 {
-if( rMediaEncData.getLength() > 0 )
+if (nMediaEncDataCount)
 {
 eResult = rVerifier.verifyEncryptionData( rMediaEncData );
 if( eResult == DocPasswordVerifierResult_OK )
@@ -434,6 +455,26 @@ Sequence< sal_Int8 > 
DocPasswordHelper::GetXLHashAsSequence(
 aEncData = comphelper::concatSequences(
 aEncData, 
OStorageHelper::CreatePackageEncryptionData(aPassword));
 }
+
+if (bForSalvage)
+{
+// TODO: add individual methods for different target filter, and 
only call what's needed
+
+// 1. Prepare binary MS formats encryption data
+auto aUniqueID = GenerateRandomByteSequence(16);
+auto aEnc97Key = GenerateStd97Key(aPassword.getStr(), aUniqueID);
+// 2. Add MS binary and OOXML encryption data to result
+uno::Sequence< beans::NamedValue > aContainer(3);
+aContainer[0].Name = "STD97EncryptionKey";
+aContainer[0].Value <<= aEnc97Key;
+aContainer[1].Name = "STD97UniqueID";
+aContainer[1].Value <<= aUniqueID;
+aContainer[2].Name = "OOXPassword";
+aContainer[2].Value <<= aPassword;
+
+aEncData = comp

[Libreoffice-commits] core.git: Branch 'feature/cib_contract891' - 8 commits - comphelper/source external/icu forms/source framework/source .gitreview package/source sal/osl sc/source sfx2/source

2020-09-29 Thread Samuel Mehrbrodt (via logerrit)
 .gitreview|2 
 comphelper/source/misc/docpasswordhelper.cxx  |   74 +-
 external/icu/ExternalProject_icu.mk   |5 
 external/icu/UnpackedTarball_icu.mk   |1 
 external/icu/b7d08bc04a4296982fcef8b6b8a354a9e4e7afca.patch.2 |   37 +
 forms/source/xforms/submission.cxx|4 
 forms/source/xforms/submission/submission.hxx |6 
 framework/source/services/autorecovery.cxx|   32 
 package/source/xstor/owriteablestream.cxx |8 -
 package/source/xstor/owriteablestream.hxx |3 
 package/source/xstor/xstorage.cxx |2 
 sal/osl/w32/process.cxx   |6 
 sc/source/core/data/table3.cxx|6 
 sfx2/source/appl/appopen.cxx  |   16 ++
 sfx2/source/dialog/filedlghelper.cxx  |   18 +-
 15 files changed, 196 insertions(+), 24 deletions(-)

New commits:
commit f51d9ff70d9c4c2604271248f6693c464684dc5d
Author: Samuel Mehrbrodt 
AuthorDate: Tue Sep 29 11:26:37 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Tue Sep 29 11:26:37 2020 +0200

Update .gitreview

Change-Id: I999d8a5c1ecad30849ac906ec7cdf3b48604e87e

diff --git a/.gitreview b/.gitreview
index 710fd1e8178e..a8e0ea8b49cc 100644
--- a/.gitreview
+++ b/.gitreview
@@ -3,5 +3,5 @@ host=logerrit
 port=29418
 project=core
 defaultremote=logerrit
-defaultbranch=libreoffice-4-2
+defaultbranch=feature/cib_contract891
 
commit 20fefac2c5209f64de1abcc3f992d3ae46129cdb
Author: Mike Kaganski 
AuthorDate: Fri Jan 3 22:40:07 2020 +0300
Commit: Samuel Mehrbrodt 
CommitDate: Tue Sep 29 10:50:06 2020 +0200

tdf#93389: keep encryption information for autorecovered MS formats

The autorecovery data is stored in ODF, regardless of the original
document format. When restoring, type detection generates ODF data,
which is stored in the media descriptor attached to document, even
after real filter was restored (see AutoRecovery::implts_openDocs).
If real filter is not ODF, then at the save time, it doesn't find
necessary information in encryption data, and makes not encrypted
package.

This patch adds both MS binary data, and OOXML data, to existing
ODF data for recovered password-protected documents (regardless of
their real filter).

TODO: only add required information to encryption data: pass real
filter name to DocPasswordHelper::requestAndVerifyDocPassword from
AutoRecovery::implts_openDocs.

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86201
Reviewed-by: Mike Kaganski 
Tested-by: Mike Kaganski 
(cherry picked from commit dd198398b6e5c84ab1255a90ef96e6445b66a64f)

Conflicts:
comphelper/source/misc/docpasswordhelper.cxx

(cherry picked from commit 6017cdff264afc3b98beeba1330d6df28102fe7a)

Change-Id: I4717f067ad3c40167312b99eefef5584a467bfed

diff --git a/comphelper/source/misc/docpasswordhelper.cxx 
b/comphelper/source/misc/docpasswordhelper.cxx
index 2120b4a3e3cc..16405276fdcb 100644
--- a/comphelper/source/misc/docpasswordhelper.cxx
+++ b/comphelper/source/misc/docpasswordhelper.cxx
@@ -19,6 +19,8 @@
 
 
 #include "comphelper/docpasswordhelper.hxx"
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -351,6 +353,25 @@ Sequence< sal_Int8 > 
DocPasswordHelper::GetXLHashAsSequence(
 OUString aPassword;
 DocPasswordVerifierResult eResult = 
DocPasswordVerifierResult_WRONG_PASSWORD;
 
+sal_Int32 nMediaEncDataCount = rMediaEncData.getLength();
+
+// tdf#93389: if the document is being restored from autorecovery, we need 
to add encryption
+// data also for real document type.
+// TODO: get real filter name here (from CheckPasswd_Impl), to only add 
necessary data
+bool bForSalvage = false;
+if (nMediaEncDataCount)
+{
+for (auto& val : rMediaEncData)
+{
+if (val.Name == "ForSalvage")
+{
+--nMediaEncDataCount; // don't consider this element below
+val.Value >>= bForSalvage;
+break;
+}
+}
+}
+
 // first, try provided default passwords
 if( pbIsDefaultPassword )
 *pbIsDefaultPassword = false;
@@ -375,7 +396,7 @@ Sequence< sal_Int8 > DocPasswordHelper::GetXLHashAsSequence(
 // try media encryption data (skip, if result is OK or ABORT)
 if( eResult == DocPasswordVerifierResult_WRONG_PASSWORD )
 {
-if( rMediaEncData.getLength() > 0 )
+if (nMediaEncDataCount)
 {
 eResult = rVerifier.verifyEncryptionData( rMediaEncData );
 if( eResult == DocPasswordVerifierResult

[Libreoffice-commits] core.git: Branch 'feature/cib_contract891c' - configure.ac

2020-09-29 Thread Samuel Mehrbrodt (via logerrit)
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit bb205bc5676256d797f9667891ea28439620126f
Author: Samuel Mehrbrodt 
AuthorDate: Tue Sep 29 09:22:04 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Tue Sep 29 09:22:04 2020 +0200

Release 5.4.11

Change-Id: I94f4cb91b1cf92722ff43d3561ba0cf2405a6a29

diff --git a/configure.ac b/configure.ac
index 83fe089baf59..af7fc01b8195 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for 
the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no 
idea.
 
-AC_INIT([LibreOffice],[5.4.10.0],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[5.4.11.0],[],[],[http://documentfoundation.org/])
 
 AC_PREREQ([2.59])
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sw/source

2020-09-21 Thread Samuel Mehrbrodt (via logerrit)
 sw/source/core/crsr/crstrvl.cxx  |2 +-
 sw/source/core/txtnode/ndtxt.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit e60e70d544d67237d11943dd4004d6540d8edce6
Author: Samuel Mehrbrodt 
AuthorDate: Thu Aug 20 15:33:49 2020 +0200
Commit: Thorsten Behrens 
CommitDate: Tue Sep 22 01:06:05 2020 +0200

Related tdf#100492 Detect click into empty field

Change-Id: Ic2937d619a8361b9d17b7dfa16698a5005f34ec6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101076
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 2c7bf3543ab798d1c117d9f3258467e4aef9a8db)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103054
Reviewed-by: Thorsten Behrens 

diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index dd0d50c58d2c..4dbb5e7328fa 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -961,7 +961,7 @@ bool SwCursorShell::CursorInsideInputField() const
 {
 for(SwPaM& rCursor : GetCursor()->GetRingContainer())
 {
-if (dynamic_cast(GetTextFieldAtCursor(, false)))
+if (dynamic_cast(GetTextFieldAtCursor(, true)))
 return true;
 }
 return false;
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 0d272486e295..a3667e53e386 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -1780,7 +1780,7 @@ SwTextField* SwTextNode::GetFieldTextAttrAt(
 dynamic_cast( GetTextAttrAt(
 nIndex,
 RES_TXTATR_INPUTFIELD,
-bIncludeInputFieldAtStart ? DEFAULT : PARENT ));
+bIncludeInputFieldAtStart ? DEFAULT : EXPAND ));
 }
 
 return pTextField;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - sw/source

2020-09-21 Thread Samuel Mehrbrodt (via logerrit)
 sw/source/core/crsr/crstrvl.cxx  |2 +-
 sw/source/core/txtnode/ndtxt.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 1d51724adc5719e440ca0b457c80c161d8ca04c8
Author: Samuel Mehrbrodt 
AuthorDate: Thu Aug 20 15:33:49 2020 +0200
Commit: Thorsten Behrens 
CommitDate: Mon Sep 21 20:53:14 2020 +0200

Related tdf#100492 Detect click into empty field

Change-Id: Ic2937d619a8361b9d17b7dfa16698a5005f34ec6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101076
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 2c7bf3543ab798d1c117d9f3258467e4aef9a8db)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103108
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 

diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index 9153b8b34e85..7df0ce6ff323 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -949,7 +949,7 @@ bool SwCursorShell::CursorInsideInputField() const
 {
 for(SwPaM& rCursor : GetCursor()->GetRingContainer())
 {
-if (dynamic_cast(GetTextFieldAtCursor(, false)))
+if (dynamic_cast(GetTextFieldAtCursor(, true)))
 return true;
 }
 return false;
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 3d721ebee00b..28cb96d2c71b 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -1788,7 +1788,7 @@ SwTextField* SwTextNode::GetFieldTextAttrAt(
 dynamic_cast( GetTextAttrAt(
 nIndex,
 RES_TXTATR_INPUTFIELD,
-bIncludeInputFieldAtStart ? DEFAULT : PARENT ));
+bIncludeInputFieldAtStart ? DEFAULT : EXPAND ));
 }
 
 return pTextField;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - sw/source

2020-09-21 Thread Samuel Mehrbrodt (via logerrit)
 sw/source/core/crsr/crstrvl.cxx  |2 +-
 sw/source/core/txtnode/ndtxt.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 4cb7e97ac32cde58a6c8de1301f05306ea326ea8
Author: Samuel Mehrbrodt 
AuthorDate: Thu Aug 20 15:33:49 2020 +0200
Commit: Thorsten Behrens 
CommitDate: Mon Sep 21 17:05:55 2020 +0200

Related tdf#100492 Detect click into empty field

Change-Id: Ic2937d619a8361b9d17b7dfa16698a5005f34ec6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101076
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 2c7bf3543ab798d1c117d9f3258467e4aef9a8db)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103107
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 

diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index 67c6fc7df511..749416c00636 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -898,7 +898,7 @@ bool SwCursorShell::CursorInsideInputField() const
 {
 for(SwPaM& rCursor : GetCursor()->GetRingContainer())
 {
-if (dynamic_cast(GetTextFieldAtCursor(, false)))
+if (dynamic_cast(GetTextFieldAtCursor(, true)))
 return true;
 }
 return false;
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index c90e91bafaf1..5ca09ba95fd4 100755
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -1798,7 +1798,7 @@ SwTextField* SwTextNode::GetFieldTextAttrAt(
 dynamic_cast( GetTextAttrAt(
 nIndex,
 RES_TXTATR_INPUTFIELD,
-bIncludeInputFieldAtStart ? DEFAULT : PARENT ));
+bIncludeInputFieldAtStart ? DEFAULT : EXPAND ));
 }
 
 return pTextField;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-21 Thread Samuel Mehrbrodt (via logerrit)
 sw/source/core/text/frmcrsr.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 22a1f51add198f0b6378dd1cea63e586e652a02b
Author: Samuel Mehrbrodt 
AuthorDate: Mon Sep 21 14:41:18 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Mon Sep 21 16:12:53 2020 +0200

Fix typo

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

diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx
index 50f0034090be..6a823760a189 100644
--- a/sw/source/core/text/frmcrsr.cxx
+++ b/sw/source/core/text/frmcrsr.cxx
@@ -719,7 +719,7 @@ bool SwTextFrame::RightMargin(SwPaM *pPam, bool bAPI) const
 aLine.CharCursorToLine(MapModelToViewPos(*pPam->GetPoint()));
 nRightMargin = aLine.GetStart() + aLine.GetCurr()->GetLen();
 
-// We skip hard line brakes
+// We skip hard line breaks
 if( aLine.GetCurr()->GetLen() &&
 CH_BREAK == aInf.GetText()[sal_Int32(nRightMargin) - 1])
 --nRightMargin;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/cib_contract3753' - .gitreview

2020-09-21 Thread Samuel Mehrbrodt (via logerrit)
 .gitreview |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 6f7215c2581395ddb0d43b31b209b3af1f85a080
Author: Samuel Mehrbrodt 
AuthorDate: Thu Sep 10 09:45:08 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Mon Sep 21 09:17:21 2020 +0200

.gitreview: Update default branch

Change-Id: Ifcbcd3427508b468a9f1872b563c93760854becf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102364
Tested-by: Samuel Mehrbrodt 
Reviewed-by: Samuel Mehrbrodt 

diff --git a/.gitreview b/.gitreview
index 4cd7d22d9a83..2bbb2f4856f3 100644
--- a/.gitreview
+++ b/.gitreview
@@ -3,5 +3,4 @@ host=gerrit.libreoffice.org
 port=29418
 project=core
 defaultremote=logerrit
-defaultbranch=libreoffice-6-4
-
+defaultbranch=feature/cib_contract3753
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/nisz/libreoffice-6-4' - sw/qa sw/source

2020-09-13 Thread Samuel Mehrbrodt (via logerrit)
 sw/qa/extras/layout/data/tdf134472.odt |binary
 sw/qa/extras/layout/layout.cxx |9 +
 sw/source/core/layout/flowfrm.cxx  |5 -
 3 files changed, 13 insertions(+), 1 deletion(-)

New commits:
commit 814dafcb37999d7273d3eb710939c7a15cc99eec
Author: Samuel Mehrbrodt 
AuthorDate: Mon Jul 6 21:24:49 2020 +0200
Commit: Gabor Kelemen 
CommitDate: Sun Sep 13 15:14:13 2020 +0200

tdf#134472 Only add spacing in header when flag is set

Flag was set, but not evaluated in 9b5805d1ef2b9e9c4e8f389c069807bf4489ea95

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98224
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 70f9c3b8f03fb28215985a5b899bd8fae9cb3ac3)

Change-Id: I46f19945be521e886baa0fc9a9a419d88c0915fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102561
Tested-by: Gabor Kelemen 
Reviewed-by: Gabor Kelemen 

diff --git a/sw/qa/extras/layout/data/tdf134472.odt 
b/sw/qa/extras/layout/data/tdf134472.odt
new file mode 100644
index ..a50c99c87622
Binary files /dev/null and b/sw/qa/extras/layout/data/tdf134472.odt differ
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 6b68de9e87e4..0228cae06346 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -470,6 +470,15 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testRedlineFlysInBody)
 }
 }
 
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, TestTdf134272)
+{
+SwDoc* pDoc = createDoc("tdf134472.odt");
+CPPUNIT_ASSERT(pDoc);
+xmlDocPtr pXmlDoc = parseLayoutDump();
+assertXPath(pXmlDoc, "/root/page[1]/header/txt[2]/infos/bounds", "height", 
"843");
+assertXPath(pXmlDoc, "/root/page[1]/header/txt[2]/infos/bounds", "bottom", 
"2819");
+}
+
 CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testRedlineFlysInHeader)
 {
 loadURL("private:factory/swriter", nullptr);
diff --git a/sw/source/core/layout/flowfrm.cxx 
b/sw/source/core/layout/flowfrm.cxx
index 6c1195967c22..0301baade7e2 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -1717,7 +1717,10 @@ SwTwips SwFlowFrame::CalcLowerSpace( const 
SwBorderAttrs* _pAttrs ) const
 }
 
 // tdf#128195 Consider para spacing below last paragraph in header
-if (!m_rThis.IsInFly() && m_rThis.FindFooterOrHeader() && !GetFollow() && 
!m_rThis.GetIndNext())
+bool bHasSpacingBelowPara = 
m_rThis.GetUpper()->GetFormat()->getIDocumentSettingAccess().get(
+DocumentSettingId::HEADER_SPACING_BELOW_LAST_PARA);
+if (bHasSpacingBelowPara && !m_rThis.IsInFly() && 
m_rThis.FindFooterOrHeader() && !GetFollow()
+&& !m_rThis.GetIndNext())
 nLowerSpace += _pAttrs->GetULSpace().GetLower() + 
_pAttrs->CalcLineSpacing();
 
 return nLowerSpace;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/nisz/libreoffice-6-4' - sw/CppunitTest_sw_core_layout.mk sw/inc sw/Module_sw.mk sw/qa sw/source writerfilter/source

2020-09-13 Thread Samuel Mehrbrodt (via logerrit)
 sw/CppunitTest_sw_core_layout.mk  |   73 ++
 sw/Module_sw.mk   |1 
 sw/inc/IDocumentSettingAccess.hxx |1 
 sw/qa/core/layout/data/tdf128195.docx |binary
 sw/qa/core/layout/layout.cxx  |   34 
 sw/source/core/doc/DocumentSettingManager.cxx |   10 +++
 sw/source/core/inc/DocumentSettingManager.hxx |1 
 sw/source/core/layout/flowfrm.cxx |4 +
 sw/source/filter/ww8/ww8par.cxx   |3 +
 sw/source/uibase/uno/SwXDocumentSettings.cxx  |   19 ++
 writerfilter/source/dmapper/DomainMapper.cxx  |2 
 11 files changed, 147 insertions(+), 1 deletion(-)

New commits:
commit 956e9ea5020896bf6137e77740d14bedcca592a6
Author: Samuel Mehrbrodt 
AuthorDate: Wed May 20 08:41:46 2020 +0200
Commit: Gabor Kelemen 
CommitDate: Sun Sep 13 10:40:17 2020 +0200

tdf#128195 Keep spacing below last paragraph in header (docx)

Add a layout compat option to keep the spacing below the last paragraph
in the header in doc/docx files

Change-Id: I259511183a8252e04d9951357dbdd4f4832523ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94577
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 9b5805d1ef2b9e9c4e8f389c069807bf4489ea95)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96337
Reviewed-by: Miklos Vajna 
(cherry picked from commit 21e319ffba1e9357914e343bda793f65b4129155)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102555
Tested-by: Gabor Kelemen 
Reviewed-by: Gabor Kelemen 

diff --git a/sw/CppunitTest_sw_core_layout.mk b/sw/CppunitTest_sw_core_layout.mk
new file mode 100644
index ..19ebdc10df9b
--- /dev/null
+++ b/sw/CppunitTest_sw_core_layout.mk
@@ -0,0 +1,73 @@
+# -*- 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_CppunitTest_CppunitTest,sw_core_layout))
+
+$(eval $(call gb_CppunitTest_use_common_precompiled_header,sw_core_layout))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,sw_core_layout, \
+sw/qa/core/layout/layout \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,sw_core_layout, \
+comphelper \
+cppu \
+cppuhelper \
+sal \
+sfx \
+sw \
+test \
+unotest \
+utl \
+vcl \
+svt \
+tl \
+svl \
+))
+
+$(eval $(call gb_CppunitTest_use_externals,sw_core_layout,\
+boost_headers \
+libxml2 \
+))
+
+$(eval $(call gb_CppunitTest_set_include,sw_core_layout,\
+-I$(SRCDIR)/sw/inc \
+-I$(SRCDIR)/sw/source/core/inc \
+-I$(SRCDIR)/sw/source/uibase/inc \
+-I$(SRCDIR)/sw/qa/inc \
+$$(INCLUDE) \
+))
+
+$(eval $(call gb_CppunitTest_use_api,sw_core_layout,\
+   udkapi \
+   offapi \
+   oovbaapi \
+))
+
+$(eval $(call gb_CppunitTest_use_ure,sw_core_layout))
+$(eval $(call gb_CppunitTest_use_vcl,sw_core_layout))
+
+$(eval $(call gb_CppunitTest_use_rdb,sw_core_layout,services))
+
+$(eval $(call gb_CppunitTest_use_custom_headers,sw_core_layout,\
+officecfg/registry \
+))
+
+$(eval $(call gb_CppunitTest_use_configuration,sw_core_layout))
+
+$(eval $(call gb_CppunitTest_use_uiconfigs,sw_core_layout, \
+modules/swriter \
+))
+
+$(eval $(call gb_CppunitTest_use_more_fonts,sw_core_layout))
+
+# vim: set noet sw=4 ts=4:
+
diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk
index dc4f303d7a3b..ae5459d8bf89 100644
--- a/sw/Module_sw.mk
+++ b/sw/Module_sw.mk
@@ -110,6 +110,7 @@ $(eval $(call gb_Module_add_slowcheck_targets,sw,\
 CppunitTest_sw_core_frmedt \
 CppunitTest_sw_core_txtnode \
 CppunitTest_sw_core_objectpositioning \
+CppunitTest_sw_core_layout \
 ))
 
 ifneq ($(DISABLE_GUI),TRUE)
diff --git a/sw/inc/IDocumentSettingAccess.hxx 
b/sw/inc/IDocumentSettingAccess.hxx
index 56ff3ab04234..f182027ded95 100644
--- a/sw/inc/IDocumentSettingAccess.hxx
+++ b/sw/inc/IDocumentSettingAccess.hxx
@@ -103,6 +103,7 @@ enum class DocumentSettingId
 EMBED_SYSTEM_FONTS,
 APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING,
 CONTINUOUS_ENDNOTES,
+HEADER_SPACING_BELOW_LAST_PARA,
 };
 
  /** Provides access to settings of a document
diff --git a/sw/qa/core/layout/data/tdf128195.docx 
b/sw/qa/core/layout/data/tdf128195.docx
new file mode 100644
index ..16180654ce8d
Binary files /dev/null and b/sw/qa/core/layout/data/tdf128195.docx differ
diff --git a/sw/qa/core/layout/layout.cxx b/sw/qa/core/layout/layout.cxx
new file mode 100644
index ..02a1a70ac04c
--- /dev/null
+++ b/sw/qa/core/layout/layout.cxx

[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-1' - xmlsecurity/source

2020-09-08 Thread Samuel Mehrbrodt (via logerrit)
 xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 497180d86055dd532b66b8b11d2f86e4168182cc
Author: Samuel Mehrbrodt 
AuthorDate: Tue Sep 8 16:48:47 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Tue Sep 8 16:48:47 2020 +0200

Fix build

after 1f7a2f913af1173d22a1bb1c9e2d014226f6c4d5

Change-Id: I19e2385e17c72a5767476a02bed4de9ca1971167

diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx 
b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index 7edf92536e86..5be9bd0d603f 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -626,7 +626,7 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
 
 if ( bSigValid )
 {
-if (maSignatureManager.getStore().is())
+if (maSignatureManager.mxStore.is())
 {
 // XML based.
 bSigValid = 
DocumentSignatureHelper::checkIfAllFilesAreSigned(
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - drawinglayer/source

2020-09-08 Thread Samuel Mehrbrodt (via logerrit)
 drawinglayer/source/primitive2d/textlayoutdevice.cxx |   14 --
 1 file changed, 14 deletions(-)

New commits:
commit 60309df3a1d1643a20c29c6d8ea187894e6c45c0
Author: Samuel Mehrbrodt 
AuthorDate: Wed Aug 19 06:05:46 2020 +0200
Commit: Thorsten Behrens 
CommitDate: Tue Sep 8 10:21:22 2020 +0200

tdf#127471 Remove font width scaling hack

Which causes distorted fonts in certain cases (see bug report).

Fix was suggested by Ilhan Yesil at 
https://bugs.documentfoundation.org/show_bug.cgi?id=127471#c6

Change-Id: Ie644f56f0835ffad9230f981d2927d6b4c17453d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100970
Tested-by: Tomaž Vajngerl 
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit 8891a2fc2a4bf86add68691b7ac167a07a8add84)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101960
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 
(cherry picked from commit b9306c4f721d3833296af144ac07dc2a064d1975)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102129
Tested-by: Thorsten Behrens 

diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx 
b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
index 9d07e1683d2f..1278f794590c 100644
--- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx
+++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
@@ -409,20 +409,6 @@ namespace drawinglayer
 aRetval.SetPitch(rFontAttribute.getMonospaced() ? PITCH_FIXED : 
PITCH_VARIABLE);
 aRetval.SetLanguage(LanguageTag::convertToLanguageType( rLocale, 
false));
 
-#ifdef _WIN32
-// for WIN32 systems, correct the FontWidth if FontScaling is used
-if(bFontIsScaled && nHeight > 0)
-{
-const FontMetric 
aUnscaledFontMetric(Application::GetDefaultDevice()->GetFontMetric(aRetval));
-
-if(aUnscaledFontMetric.GetAverageFontWidth() > 0)
-{
-const double fScaleFactor(static_cast(nWidth) / 
static_cast(nHeight));
-const sal_uInt32 
nScaledWidth(basegfx::fround(static_cast(aUnscaledFontMetric.GetAverageFontWidth())
 * fScaleFactor));
-aRetval.SetAverageFontWidth(nScaledWidth);
-}
-}
-#endif
 // handle FontRotation (if defined)
 if(!basegfx::fTools::equalZero(fFontRotation))
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/cib/libreoffice-6-2' - 2 commits - configure.ac wsd/DocumentBroker.cpp

2020-09-08 Thread Samuel Mehrbrodt (via logerrit)
 configure.ac   |2 +-
 wsd/DocumentBroker.cpp |5 -
 2 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 19d05057fa660d2189a769ae053e0b1aa57af872
Author: Samuel Mehrbrodt 
AuthorDate: Tue Sep 8 08:13:11 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Tue Sep 8 08:42:26 2020 +0200

Release 6.2.12.0

Change-Id: I552114d06222705e77cb9c266887b5ae80583af8

diff --git a/configure.ac b/configure.ac
index ea556501b..092eb9b06 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@
 
 AC_PREREQ([2.63])
 
-AC_INIT([loolwsd], [6.2.11.0], [libreoffice@lists.freedesktop.org])
+AC_INIT([loolwsd], [6.2.12.0], [libreoffice@lists.freedesktop.org])
 LT_INIT([shared, disable-static, dlopen])
 
 AM_INIT_AUTOMAKE([1.10 subdir-objects tar-pax -Wno-portability])
commit ccb6581fbaf7d5b9591598fbd7b1bd15f0a7436f
Author: Samuel Mehrbrodt 
AuthorDate: Tue Sep 8 08:41:31 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Tue Sep 8 08:42:26 2020 +0200

Consider save successful also when doc changed in storage

Ported from master fix 8c602e179e8afe44f2a1fe513bdc7640cd57ed2a

Change-Id: Iaf52e950cc635d625c1415754b9d411d0a009927

diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index 3c3ca28bc..83f942b5d 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -833,7 +833,10 @@ bool DocumentBroker::saveToStorageInternal(const 
std::string& sessionId,
 
 assert(_storage && _tileCache);
 StorageBase::SaveResult storageSaveResult = 
_storage->saveLocalFileToStorage(auth, saveAsPath, saveAsFilename);
-_lastStorageSaveSuccessful = storageSaveResult.getResult() == 
StorageBase::SaveResult::OK;
+// Storage save is considered successful when either storage returns OK or 
the document on the storage
+// was changed and it was used to overwrite local changes
+_lastStorageSaveSuccessful = storageSaveResult.getResult() == 
StorageBase::SaveResult::OK ||
+ storageSaveResult.getResult() == 
StorageBase::SaveResult::DOC_CHANGED;
 if (storageSaveResult.getResult() == StorageBase::SaveResult::OK)
 {
 if (!isSaveAs)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/cib/libreoffice-6-2' - loleaflet/js loleaflet/src

2020-09-08 Thread Samuel Mehrbrodt (via logerrit)
 loleaflet/js/toolbar.js  |3 ++-
 loleaflet/src/layer/marker/Cursor.js |2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit ec165df75aa7c8f3b8fef9cc82cd0db23d4f1a78
Author: Samuel Mehrbrodt 
AuthorDate: Thu Sep 3 16:25:21 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Tue Sep 8 08:09:44 2020 +0200

fix username formatting

Inspired by bc0920178aef2bcb7affe989fa79309fe131aec4

Change-Id: Ie82bccaf371b4c200c906125548eb24008e84c61
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102006
Reviewed-by: Michael Meeks 
Reviewed-by: Samuel Mehrbrodt 
Tested-by: Samuel Mehrbrodt 

diff --git a/loleaflet/js/toolbar.js b/loleaflet/js/toolbar.js
index 6ace95b08..78636e39a 100644
--- a/loleaflet/js/toolbar.js
+++ b/loleaflet/js/toolbar.js
@@ -2303,10 +2303,11 @@ function setupToolbar(e) {
});
 
map.on('removeview', function(e) {
+   var username = this.escapeHtml(e.username);
$('#tb_toolbar-down_item_userlist')
.w2overlay({
class: 'loleaflet-font',
-   html: userLeftPopupMessage.replace('%user', 
e.username),
+   html: userLeftPopupMessage.replace('%user', 
username),
style: 'padding: 5px'
});
clearTimeout(userPopupTimeout);
diff --git a/loleaflet/src/layer/marker/Cursor.js 
b/loleaflet/src/layer/marker/Cursor.js
index 592658dca..6514fc4f2 100644
--- a/loleaflet/src/layer/marker/Cursor.js
+++ b/loleaflet/src/layer/marker/Cursor.js
@@ -81,7 +81,7 @@ L.Cursor = L.Layer.extend({
if (this.options.header) {
this._cursorHeader = L.DomUtil.create('div', 
'leaflet-cursor-header', this._container);
 
-   this._cursorHeader.innerHTML = this.options.headerName;
+   this._cursorHeader.textContent = 
this.options.headerName;
 
clearTimeout(this._blinkTimeout);
this._blinkTimeout = setTimeout(L.bind(function() {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - drawinglayer/source

2020-09-04 Thread Samuel Mehrbrodt (via logerrit)
 drawinglayer/source/primitive2d/textlayoutdevice.cxx |   14 --
 1 file changed, 14 deletions(-)

New commits:
commit b9306c4f721d3833296af144ac07dc2a064d1975
Author: Samuel Mehrbrodt 
AuthorDate: Wed Aug 19 06:05:46 2020 +0200
Commit: Thorsten Behrens 
CommitDate: Fri Sep 4 10:57:05 2020 +0200

tdf#127471 Remove font width scaling hack

Which causes distorted fonts in certain cases (see bug report).

Fix was suggested by Ilhan Yesil at 
https://bugs.documentfoundation.org/show_bug.cgi?id=127471#c6

Change-Id: Ie644f56f0835ffad9230f981d2927d6b4c17453d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100970
Tested-by: Tomaž Vajngerl 
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit 8891a2fc2a4bf86add68691b7ac167a07a8add84)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101960
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx 
b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
index aa8faeaf47a1..299fea5d90a3 100644
--- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx
+++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
@@ -409,20 +409,6 @@ namespace drawinglayer
 aRetval.SetPitch(rFontAttribute.getMonospaced() ? PITCH_FIXED : 
PITCH_VARIABLE);
 aRetval.SetLanguage(LanguageTag::convertToLanguageType( rLocale, 
false));
 
-#ifdef _WIN32
-// for WIN32 systems, correct the FontWidth if FontScaling is used
-if(bFontIsScaled && nHeight > 0)
-{
-const FontMetric 
aUnscaledFontMetric(Application::GetDefaultDevice()->GetFontMetric(aRetval));
-
-if(aUnscaledFontMetric.GetAverageFontWidth() > 0)
-{
-const double fScaleFactor(static_cast(nWidth) / 
static_cast(nHeight));
-const sal_uInt32 
nScaledWidth(basegfx::fround(static_cast(aUnscaledFontMetric.GetAverageFontWidth())
 * fScaleFactor));
-aRetval.SetAverageFontWidth(nScaledWidth);
-}
-}
-#endif
 // handle FontRotation (if defined)
 if(!basegfx::fTools::equalZero(fFontRotation))
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-3' - sw/PythonTest_sw_python.mk sw/qa sw/source

2020-09-03 Thread Samuel Mehrbrodt (via logerrit)
 sw/PythonTest_sw_python.mk |1 
 sw/qa/python/check_drawpage.py |   44 +
 sw/source/core/unocore/unodraw.cxx |2 -
 3 files changed, 46 insertions(+), 1 deletion(-)

New commits:
commit c87f331d2900eab70ac3021cbe530926efa6499f
Author: Samuel Mehrbrodt 
AuthorDate: Tue Sep 1 12:51:09 2020 +0200
Commit: Thorsten Behrens 
CommitDate: Thu Sep 3 14:53:56 2020 +0200

tdf#136423 make SwXDrawPage::group work with a single shape

No reason this should not work (and the implementation in Draw/Impress/Calc
also works this way)

Change-Id: Ic5bc7420e9025b45ed848dccf68b112c0c6c2cd5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101842
Tested-by: Samuel Mehrbrodt 
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 3eb5318ed9ae8cf02804fbdc584a5f4b046db0ae)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101958
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 

diff --git a/sw/PythonTest_sw_python.mk b/sw/PythonTest_sw_python.mk
index 8250da21dc6d..a5b36127b793 100644
--- a/sw/PythonTest_sw_python.mk
+++ b/sw/PythonTest_sw_python.mk
@@ -16,6 +16,7 @@ $(eval $(call gb_PythonTest_set_defs,sw_python,\
 $(eval $(call gb_PythonTest_add_modules,sw_python,$(SRCDIR)/sw/qa/python,\
check_bookmarks \
check_change_color \
+   check_drawpage \
check_index \
check_flies \
check_fields \
diff --git a/sw/qa/python/check_drawpage.py b/sw/qa/python/check_drawpage.py
new file mode 100644
index ..ef28490ce224
--- /dev/null
+++ b/sw/qa/python/check_drawpage.py
@@ -0,0 +1,44 @@
+#! /usr/bin/env python
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-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/.
+#
+import unittest
+from org.libreoffice.unotest import UnoInProcess
+
+from com.sun.star.text.TextContentAnchorType import AT_PARAGRAPH
+
+class CheckDrawPage(unittest.TestCase):
+
+@classmethod
+def setUpClass(cls):
+cls._uno = UnoInProcess()
+cls._uno.setUp()
+
+@classmethod
+def tearDownClass(cls):
+cls._uno.tearDown()
+
+"""
+Test that grouping shapes also works with a single shape.
+"""
+def test_group_single_shape(self):
+xDoc = self.__class__._uno.openEmptyWriterDoc()
+page = xDoc.DrawPage
+collection = 
self.__class__._uno.xContext.ServiceManager.createInstance( 
'com.sun.star.drawing.ShapeCollection' )
+shape = xDoc.createInstance('com.sun.star.drawing.TextShape')
+shape.AnchorType = AT_PARAGRAPH
+page.add(shape)
+collection.add(shape)
+shapegroup = page.group(collection)
+
+self.assertEqual(shapegroup.Count, 1)
+
+xDoc.close(True)
+
+if __name__ == '__main__':
+unittest.main()
diff --git a/sw/source/core/unocore/unodraw.cxx 
b/sw/source/core/unocore/unodraw.cxx
index 77c89b485d95..05f2f55acf84 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -753,7 +753,7 @@ uno::Reference< drawing::XShapeGroup >  
SwXDrawPage::group(const uno::Reference<
 {
 // mark and return MarkList
 const SdrMarkList& rMarkList = pPage->PreGroup(xShapes);
-if ( rMarkList.GetMarkCount() > 1 )
+if ( rMarkList.GetMarkCount() > 0 )
 {
 for (size_t i = 0; i < rMarkList.GetMarkCount(); ++i)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-1' - sw/PythonTest_sw_python.mk sw/qa sw/source

2020-09-03 Thread Samuel Mehrbrodt (via logerrit)
 sw/PythonTest_sw_python.mk |1 
 sw/qa/python/check_drawpage.py |   44 +
 sw/source/core/unocore/unodraw.cxx |2 -
 3 files changed, 46 insertions(+), 1 deletion(-)

New commits:
commit cc9dea9252ec832423ff257734735f753fee12bf
Author: Samuel Mehrbrodt 
AuthorDate: Tue Sep 1 12:51:09 2020 +0200
Commit: Thorsten Behrens 
CommitDate: Thu Sep 3 14:53:39 2020 +0200

tdf#136423 make SwXDrawPage::group work with a single shape

No reason this should not work (and the implementation in Draw/Impress/Calc
also works this way)

Change-Id: Ic5bc7420e9025b45ed848dccf68b112c0c6c2cd5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101842
Tested-by: Samuel Mehrbrodt 
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 3eb5318ed9ae8cf02804fbdc584a5f4b046db0ae)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101957
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 

diff --git a/sw/PythonTest_sw_python.mk b/sw/PythonTest_sw_python.mk
index c47c5cbcbbd3..1a3b0313e8b5 100644
--- a/sw/PythonTest_sw_python.mk
+++ b/sw/PythonTest_sw_python.mk
@@ -16,6 +16,7 @@ $(eval $(call gb_PythonTest_set_defs,sw_python,\
 $(eval $(call gb_PythonTest_add_modules,sw_python,$(SRCDIR)/sw/qa/python,\
check_bookmarks \
check_change_color \
+   check_drawpage \
check_index \
check_flies \
check_fields \
diff --git a/sw/qa/python/check_drawpage.py b/sw/qa/python/check_drawpage.py
new file mode 100644
index ..ef28490ce224
--- /dev/null
+++ b/sw/qa/python/check_drawpage.py
@@ -0,0 +1,44 @@
+#! /usr/bin/env python
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-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/.
+#
+import unittest
+from org.libreoffice.unotest import UnoInProcess
+
+from com.sun.star.text.TextContentAnchorType import AT_PARAGRAPH
+
+class CheckDrawPage(unittest.TestCase):
+
+@classmethod
+def setUpClass(cls):
+cls._uno = UnoInProcess()
+cls._uno.setUp()
+
+@classmethod
+def tearDownClass(cls):
+cls._uno.tearDown()
+
+"""
+Test that grouping shapes also works with a single shape.
+"""
+def test_group_single_shape(self):
+xDoc = self.__class__._uno.openEmptyWriterDoc()
+page = xDoc.DrawPage
+collection = 
self.__class__._uno.xContext.ServiceManager.createInstance( 
'com.sun.star.drawing.ShapeCollection' )
+shape = xDoc.createInstance('com.sun.star.drawing.TextShape')
+shape.AnchorType = AT_PARAGRAPH
+page.add(shape)
+collection.add(shape)
+shapegroup = page.group(collection)
+
+self.assertEqual(shapegroup.Count, 1)
+
+xDoc.close(True)
+
+if __name__ == '__main__':
+unittest.main()
diff --git a/sw/source/core/unocore/unodraw.cxx 
b/sw/source/core/unocore/unodraw.cxx
index 7102805291fe..876cad2231df 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -757,7 +757,7 @@ uno::Reference< drawing::XShapeGroup >  
SwXDrawPage::group(const uno::Reference<
 {
 // mark and return MarkList
 const SdrMarkList& rMarkList = pPage->PreGroup(xShapes);
-if ( rMarkList.GetMarkCount() > 1 )
+if ( rMarkList.GetMarkCount() > 0 )
 {
 bool bFlyInCnt = false;
 for ( size_t i = 0; !bFlyInCnt && i < 
rMarkList.GetMarkCount(); ++i )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - sw/PythonTest_sw_python.mk sw/qa sw/source

2020-09-03 Thread Samuel Mehrbrodt (via logerrit)
 sw/PythonTest_sw_python.mk |1 
 sw/qa/python/check_drawpage.py |   44 +
 sw/source/core/unocore/unodraw.cxx |2 -
 3 files changed, 46 insertions(+), 1 deletion(-)

New commits:
commit a011af93697722f0b2da79eab4facbf96bb2dd9c
Author: Samuel Mehrbrodt 
AuthorDate: Tue Sep 1 12:51:09 2020 +0200
Commit: Thorsten Behrens 
CommitDate: Thu Sep 3 14:52:59 2020 +0200

tdf#136423 make SwXDrawPage::group work with a single shape

No reason this should not work (and the implementation in Draw/Impress/Calc
also works this way)

Change-Id: Ic5bc7420e9025b45ed848dccf68b112c0c6c2cd5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101842
Tested-by: Samuel Mehrbrodt 
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 3eb5318ed9ae8cf02804fbdc584a5f4b046db0ae)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101956
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/sw/PythonTest_sw_python.mk b/sw/PythonTest_sw_python.mk
index 6e699f5caa1d..2aa3fd01ef77 100644
--- a/sw/PythonTest_sw_python.mk
+++ b/sw/PythonTest_sw_python.mk
@@ -16,6 +16,7 @@ $(eval $(call gb_PythonTest_set_defs,sw_python,\
 $(eval $(call gb_PythonTest_add_modules,sw_python,$(SRCDIR)/sw/qa/python,\
check_bookmarks \
check_change_color \
+   check_drawpage \
check_index \
check_flies \
check_fields \
diff --git a/sw/qa/python/check_drawpage.py b/sw/qa/python/check_drawpage.py
new file mode 100644
index ..ef28490ce224
--- /dev/null
+++ b/sw/qa/python/check_drawpage.py
@@ -0,0 +1,44 @@
+#! /usr/bin/env python
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-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/.
+#
+import unittest
+from org.libreoffice.unotest import UnoInProcess
+
+from com.sun.star.text.TextContentAnchorType import AT_PARAGRAPH
+
+class CheckDrawPage(unittest.TestCase):
+
+@classmethod
+def setUpClass(cls):
+cls._uno = UnoInProcess()
+cls._uno.setUp()
+
+@classmethod
+def tearDownClass(cls):
+cls._uno.tearDown()
+
+"""
+Test that grouping shapes also works with a single shape.
+"""
+def test_group_single_shape(self):
+xDoc = self.__class__._uno.openEmptyWriterDoc()
+page = xDoc.DrawPage
+collection = 
self.__class__._uno.xContext.ServiceManager.createInstance( 
'com.sun.star.drawing.ShapeCollection' )
+shape = xDoc.createInstance('com.sun.star.drawing.TextShape')
+shape.AnchorType = AT_PARAGRAPH
+page.add(shape)
+collection.add(shape)
+shapegroup = page.group(collection)
+
+self.assertEqual(shapegroup.Count, 1)
+
+xDoc.close(True)
+
+if __name__ == '__main__':
+unittest.main()
diff --git a/sw/source/core/unocore/unodraw.cxx 
b/sw/source/core/unocore/unodraw.cxx
index c3d6057c0b39..fed0e4a55d6a 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -752,7 +752,7 @@ uno::Reference< drawing::XShapeGroup >  
SwXDrawPage::group(const uno::Reference<
 {
 // mark and return MarkList
 const SdrMarkList& rMarkList = pPage->PreGroup(xShapes);
-if ( rMarkList.GetMarkCount() > 1 )
+if ( rMarkList.GetMarkCount() > 0 )
 {
 for (size_t i = 0; i < rMarkList.GetMarkCount(); ++i)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sw/PythonTest_sw_python.mk sw/qa sw/source

2020-09-03 Thread Samuel Mehrbrodt (via logerrit)
 sw/PythonTest_sw_python.mk |1 
 sw/qa/python/check_drawpage.py |   44 +
 sw/source/core/unocore/unodraw.cxx |2 -
 3 files changed, 46 insertions(+), 1 deletion(-)

New commits:
commit ba86d4e1345276c5fa76a5e4b00e1f04de8cc166
Author: Samuel Mehrbrodt 
AuthorDate: Tue Sep 1 12:51:09 2020 +0200
Commit: Miklos Vajna 
CommitDate: Thu Sep 3 14:47:14 2020 +0200

tdf#136423 make SwXDrawPage::group work with a single shape

No reason this should not work (and the implementation in Draw/Impress/Calc
also works this way)

Change-Id: Ic5bc7420e9025b45ed848dccf68b112c0c6c2cd5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101842
Tested-by: Samuel Mehrbrodt 
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 3eb5318ed9ae8cf02804fbdc584a5f4b046db0ae)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101955
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/sw/PythonTest_sw_python.mk b/sw/PythonTest_sw_python.mk
index b1c96a5c26ab..d64a8b516563 100644
--- a/sw/PythonTest_sw_python.mk
+++ b/sw/PythonTest_sw_python.mk
@@ -16,6 +16,7 @@ $(eval $(call gb_PythonTest_set_defs,sw_python,\
 $(eval $(call gb_PythonTest_add_modules,sw_python,$(SRCDIR)/sw/qa/python,\
check_bookmarks \
check_change_color \
+   check_drawpage \
check_index \
check_flies \
check_fields \
diff --git a/sw/qa/python/check_drawpage.py b/sw/qa/python/check_drawpage.py
new file mode 100644
index ..ef28490ce224
--- /dev/null
+++ b/sw/qa/python/check_drawpage.py
@@ -0,0 +1,44 @@
+#! /usr/bin/env python
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-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/.
+#
+import unittest
+from org.libreoffice.unotest import UnoInProcess
+
+from com.sun.star.text.TextContentAnchorType import AT_PARAGRAPH
+
+class CheckDrawPage(unittest.TestCase):
+
+@classmethod
+def setUpClass(cls):
+cls._uno = UnoInProcess()
+cls._uno.setUp()
+
+@classmethod
+def tearDownClass(cls):
+cls._uno.tearDown()
+
+"""
+Test that grouping shapes also works with a single shape.
+"""
+def test_group_single_shape(self):
+xDoc = self.__class__._uno.openEmptyWriterDoc()
+page = xDoc.DrawPage
+collection = 
self.__class__._uno.xContext.ServiceManager.createInstance( 
'com.sun.star.drawing.ShapeCollection' )
+shape = xDoc.createInstance('com.sun.star.drawing.TextShape')
+shape.AnchorType = AT_PARAGRAPH
+page.add(shape)
+collection.add(shape)
+shapegroup = page.group(collection)
+
+self.assertEqual(shapegroup.Count, 1)
+
+xDoc.close(True)
+
+if __name__ == '__main__':
+unittest.main()
diff --git a/sw/source/core/unocore/unodraw.cxx 
b/sw/source/core/unocore/unodraw.cxx
index ddbdf85769db..3c1949063111 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -752,7 +752,7 @@ uno::Reference< drawing::XShapeGroup >  
SwXDrawPage::group(const uno::Reference<
 {
 // mark and return MarkList
 const SdrMarkList& rMarkList = pPage->PreGroup(xShapes);
-if ( rMarkList.GetMarkCount() > 1 )
+if ( rMarkList.GetMarkCount() > 0 )
 {
 for (size_t i = 0; i < rMarkList.GetMarkCount(); ++i)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Barcode extension published

2020-09-03 Thread Samuel Mehrbrodt

Hi,

I published this Barcode extension: 
https://extensions.libreoffice.org/en/extensions/show/1046


It allows to insert different barcode types in LibreOffice.

This extension is based on 
https://github.com/KAMI911/loec/tree/master/examples/Barcode
Support for Python 3 has been added. Additionally, the extension now 
works not only in Draw, but also in Writer, Calc and Impress.


/Note: Due to a bug in LibreOffice, inserting a barcode in Writer does 
not work correctly (Text is wrongly positioned). See bug 136423 
 for details./
/This will be fixed in (upcoming) LibreOffice 6.4.7 and 7.0.2 (and all 
later versions)./


Code is available here: https://github.com/libreoffice/barcode

Please test, report feedback & send pull requests!

Regards
Samuel

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


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

2020-09-03 Thread Samuel Mehrbrodt (via logerrit)
 sw/PythonTest_sw_python.mk |1 
 sw/qa/python/check_drawpage.py |   44 +
 sw/source/core/unocore/unodraw.cxx |2 -
 3 files changed, 46 insertions(+), 1 deletion(-)

New commits:
commit 3eb5318ed9ae8cf02804fbdc584a5f4b046db0ae
Author: Samuel Mehrbrodt 
AuthorDate: Tue Sep 1 12:51:09 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Thu Sep 3 10:45:25 2020 +0200

tdf#136423 make SwXDrawPage::group work with a single shape

No reason this should not work (and the implementation in Draw/Impress/Calc
also works this way)

Change-Id: Ic5bc7420e9025b45ed848dccf68b112c0c6c2cd5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101842
Tested-by: Samuel Mehrbrodt 
Reviewed-by: Samuel Mehrbrodt 

diff --git a/sw/PythonTest_sw_python.mk b/sw/PythonTest_sw_python.mk
index b1c96a5c26ab..d64a8b516563 100644
--- a/sw/PythonTest_sw_python.mk
+++ b/sw/PythonTest_sw_python.mk
@@ -16,6 +16,7 @@ $(eval $(call gb_PythonTest_set_defs,sw_python,\
 $(eval $(call gb_PythonTest_add_modules,sw_python,$(SRCDIR)/sw/qa/python,\
check_bookmarks \
check_change_color \
+   check_drawpage \
check_index \
check_flies \
check_fields \
diff --git a/sw/qa/python/check_drawpage.py b/sw/qa/python/check_drawpage.py
new file mode 100644
index ..ef28490ce224
--- /dev/null
+++ b/sw/qa/python/check_drawpage.py
@@ -0,0 +1,44 @@
+#! /usr/bin/env python
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-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/.
+#
+import unittest
+from org.libreoffice.unotest import UnoInProcess
+
+from com.sun.star.text.TextContentAnchorType import AT_PARAGRAPH
+
+class CheckDrawPage(unittest.TestCase):
+
+@classmethod
+def setUpClass(cls):
+cls._uno = UnoInProcess()
+cls._uno.setUp()
+
+@classmethod
+def tearDownClass(cls):
+cls._uno.tearDown()
+
+"""
+Test that grouping shapes also works with a single shape.
+"""
+def test_group_single_shape(self):
+xDoc = self.__class__._uno.openEmptyWriterDoc()
+page = xDoc.DrawPage
+collection = 
self.__class__._uno.xContext.ServiceManager.createInstance( 
'com.sun.star.drawing.ShapeCollection' )
+shape = xDoc.createInstance('com.sun.star.drawing.TextShape')
+shape.AnchorType = AT_PARAGRAPH
+page.add(shape)
+collection.add(shape)
+shapegroup = page.group(collection)
+
+self.assertEqual(shapegroup.Count, 1)
+
+xDoc.close(True)
+
+if __name__ == '__main__':
+unittest.main()
diff --git a/sw/source/core/unocore/unodraw.cxx 
b/sw/source/core/unocore/unodraw.cxx
index 7c7f84f4399b..8e280ea7179a 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -753,7 +753,7 @@ uno::Reference< drawing::XShapeGroup >  
SwXDrawPage::group(const uno::Reference<
 {
 // mark and return MarkList
 const SdrMarkList& rMarkList = pPage->PreGroup(xShapes);
-if ( rMarkList.GetMarkCount() > 1 )
+if ( rMarkList.GetMarkCount() > 0 )
 {
 for (size_t i = 0; i < rMarkList.GetMarkCount(); ++i)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-02 Thread Samuel Mehrbrodt (via logerrit)
 sw/source/core/unocore/unodraw.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit f706f8d494e2527dc3f84e1595ea73a20659080c
Author: Samuel Mehrbrodt 
AuthorDate: Tue Sep 1 12:53:13 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Wed Sep 2 09:06:19 2020 +0200

Improve exception when shape with illegal anchor is given

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

diff --git a/sw/source/core/unocore/unodraw.cxx 
b/sw/source/core/unocore/unodraw.cxx
index 9248bfdf098f..7c7f84f4399b 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -72,6 +72,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 using namespace ::com::sun::star;
@@ -760,7 +761,8 @@ uno::Reference< drawing::XShapeGroup >  
SwXDrawPage::group(const uno::Reference<
 if (RndStdIds::FLY_AS_CHAR == 
::FindFrameFormat(const_cast(
 pObj))->GetAnchor().GetAnchorId())
 {
-throw uno::RuntimeException(); // FlyInCnt!
+throw lang::IllegalArgumentException(
+"Shape must not have 'as character' anchor!", 
nullptr, 0);
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: wsd/ClientSession.cpp wsd/DocumentBroker.cpp wsd/DocumentBroker.hpp

2020-08-24 Thread Samuel Mehrbrodt (via logerrit)
 wsd/ClientSession.cpp  |6 ++
 wsd/DocumentBroker.cpp |7 +++
 wsd/DocumentBroker.hpp |5 +
 3 files changed, 18 insertions(+)

New commits:
commit 8c602e179e8afe44f2a1fe513bdc7640cd57ed2a
Author: Samuel Mehrbrodt 
AuthorDate: Mon Aug 17 11:00:38 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Mon Aug 24 14:34:10 2020 +0200

Revert "Revert "Don't update modified status after saving to storage fails""

This reverts commit e83e36bd9b96fe38ac1f53f56d9754e26bd131e0.

Unit test failure was fixed

Change-Id: I2176368278725c1711df3b23eef95de6526c68d5
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100859
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
    Reviewed-by: Samuel Mehrbrodt 

diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp
index 7c4ac6fdb..60733a0c5 100644
--- a/wsd/ClientSession.cpp
+++ b/wsd/ClientSession.cpp
@@ -1317,6 +1317,12 @@ bool ClientSession::handleKitToClientMessage(const char* 
buffer, const int lengt
 StringVector stateTokens(Util::tokenize(tokens[1], '='));
 if (stateTokens.size() == 2 && stateTokens.equals(0, 
".uno:ModifiedStatus"))
 {
+// When the document is saved internally, but saving to storage 
failed,
+// don't update the client's modified status
+// (otherwise client thinks document is unmodified b/c saving was 
successful)
+if (!docBroker->isLastStorageSaveSuccessful())
+return false;
+
 docBroker->setModified(stateTokens.equals(1, "true"));
 }
 else
diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index a5e62fcc4..4218b9fb4 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -176,6 +176,7 @@ DocumentBroker::DocumentBroker(ChildType type,
 _docKey(docKey),
 _docId(Util::encodeId(DocBrokerId++, 3)),
 _documentChangedInStorage(false),
+_lastStorageSaveSuccessful(true),
 _lastSaveTime(std::chrono::steady_clock::now()),
 _lastSaveRequestTime(std::chrono::steady_clock::now() - 
std::chrono::milliseconds(COMMAND_TIMEOUT_MS)),
 _markToDestroy(false),
@@ -1049,6 +1050,11 @@ bool DocumentBroker::saveToStorageInternal(const 
std::string& sessionId, bool su
 assert(_storage && _tileCache);
 const StorageBase::SaveResult storageSaveResult = 
_storage->saveLocalFileToStorage(
 auth, it->second->getCookies(), *_lockCtx, saveAsPath, saveAsFilename, 
isRename);
+// Storage save is considered successful when either storage returns OK or 
the document on the storage
+// was changed and it was used to overwrite local changes
+_lastStorageSaveSuccessful
+= storageSaveResult.getResult() == StorageBase::SaveResult::OK ||
+storageSaveResult.getResult() == StorageBase::SaveResult::DOC_CHANGED;
 if (storageSaveResult.getResult() == StorageBase::SaveResult::OK)
 {
 #if !MOBILEAPP
@@ -2474,6 +2480,7 @@ void DocumentBroker::dumpState(std::ostream& os)
 os << "\n  last saved: " << Util::getSteadyClockAsString(_lastSaveTime);
 os << "\n  last save request: " << 
Util::getSteadyClockAsString(_lastSaveRequestTime);
 os << "\n  last save response: " << 
Util::getSteadyClockAsString(_lastSaveResponseTime);
+os << "\n  last storage save was successful: " << 
isLastStorageSaveSuccessful();
 os << "\n  last modified: " << 
Util::getHttpTime(_documentLastModifiedTime);
 os << "\n  file last modified: " << 
Util::getHttpTime(_lastFileModifiedTime);
 if (_limitLifeSeconds)
diff --git a/wsd/DocumentBroker.hpp b/wsd/DocumentBroker.hpp
index b8e176b3c..e59a2d6b4 100644
--- a/wsd/DocumentBroker.hpp
+++ b/wsd/DocumentBroker.hpp
@@ -175,6 +175,8 @@ public:
 
 bool isDocumentChangedInStorage() { return _documentChangedInStorage; }
 
+bool isLastStorageSaveSuccessful() { return _lastStorageSaveSuccessful; }
+
 /// Save the document to Storage if it needs persisting.
 bool saveToStorage(const std::string& sesionId, bool success, const 
std::string& result = "", bool force = false);
 
@@ -404,6 +406,9 @@ private:
 /// for user's command to act.
 bool _documentChangedInStorage;
 
+/// Indicates whether the last saveToStorage operation was successful.
+bool _lastStorageSaveSuccessful;
+
 /// The last time we tried saving, regardless of whether the
 /// document was modified and saved or not.
 std::chrono::steady_clock::time_point _lastSaveTime;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-08-23 Thread Samuel Mehrbrodt (via logerrit)
 sw/source/core/crsr/crstrvl.cxx  |2 +-
 sw/source/core/txtnode/ndtxt.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 2c7bf3543ab798d1c117d9f3258467e4aef9a8db
Author: Samuel Mehrbrodt 
AuthorDate: Thu Aug 20 15:33:49 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Mon Aug 24 07:34:25 2020 +0200

Related tdf#100492 Detect click into empty field

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

diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index 5bea3f176289..11589b8e4181 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -927,7 +927,7 @@ bool SwCursorShell::CursorInsideInputField() const
 {
 for(SwPaM& rCursor : GetCursor()->GetRingContainer())
 {
-if (dynamic_cast(GetTextFieldAtCursor(, false)))
+if (dynamic_cast(GetTextFieldAtCursor(, true)))
 return true;
 }
 return false;
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 6d6f241e7b2c..1dd213960885 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -1778,7 +1778,7 @@ SwTextField* SwTextNode::GetFieldTextAttrAt(
 dynamic_cast( GetTextAttrAt(
 nIndex,
 RES_TXTATR_INPUTFIELD,
-bIncludeInputFieldAtStart ? DEFAULT : PARENT ));
+bIncludeInputFieldAtStart ? DEFAULT : EXPAND ));
 }
 
 return pTextField;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - drawinglayer/source

2020-08-19 Thread Samuel Mehrbrodt (via logerrit)
 drawinglayer/source/primitive2d/textlayoutdevice.cxx |   14 --
 1 file changed, 14 deletions(-)

New commits:
commit d935040e8f586ccb9dcf7fef30d72715a9f0ac98
Author: Samuel Mehrbrodt 
AuthorDate: Wed Aug 19 06:05:46 2020 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Wed Aug 19 16:21:27 2020 +0200

tdf#127471 Remove font width scaling hack

Which causes distorted fonts in certain cases (see bug report).

Fix was suggested by Ilhan Yesil at 
https://bugs.documentfoundation.org/show_bug.cgi?id=127471#c6

Change-Id: Ie644f56f0835ffad9230f981d2927d6b4c17453d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100970
Tested-by: Tomaž Vajngerl 
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit 8891a2fc2a4bf86add68691b7ac167a07a8add84)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100938
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx 
b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
index e3e57b2b5997..de2f76cb74f6 100644
--- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx
+++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
@@ -401,20 +401,6 @@ namespace drawinglayer::primitive2d
 aRetval.SetPitch(rFontAttribute.getMonospaced() ? PITCH_FIXED : 
PITCH_VARIABLE);
 aRetval.SetLanguage(LanguageTag::convertToLanguageType( rLocale, 
false));
 
-#ifdef _WIN32
-// for WIN32 systems, correct the FontWidth if FontScaling is used
-if(bFontIsScaled && nHeight > 0)
-{
-const FontMetric 
aUnscaledFontMetric(Application::GetDefaultDevice()->GetFontMetric(aRetval));
-
-if(aUnscaledFontMetric.GetAverageFontWidth() > 0)
-{
-const double fScaleFactor(static_cast(nWidth) / 
static_cast(nHeight));
-const sal_uInt32 
nScaledWidth(basegfx::fround(static_cast(aUnscaledFontMetric.GetAverageFontWidth())
 * fScaleFactor));
-aRetval.SetAverageFontWidth(nScaledWidth);
-}
-}
-#endif
 // handle FontRotation (if defined)
 if(!basegfx::fTools::equalZero(fFontRotation))
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-08-19 Thread Samuel Mehrbrodt (via logerrit)
 drawinglayer/source/primitive2d/textlayoutdevice.cxx |   14 --
 1 file changed, 14 deletions(-)

New commits:
commit 8891a2fc2a4bf86add68691b7ac167a07a8add84
Author: Samuel Mehrbrodt 
AuthorDate: Wed Aug 19 06:05:46 2020 +0200
Commit: Tomaž Vajngerl 
CommitDate: Wed Aug 19 10:33:07 2020 +0200

tdf#127471 Remove font width scaling hack

Which causes distorted fonts in certain cases (see bug report).

Fix was suggested by Ilhan Yesil at 
https://bugs.documentfoundation.org/show_bug.cgi?id=127471#c6

Change-Id: Ie644f56f0835ffad9230f981d2927d6b4c17453d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100970
Tested-by: Tomaž Vajngerl 
Reviewed-by: Tomaž Vajngerl 

diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx 
b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
index e3e57b2b5997..de2f76cb74f6 100644
--- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx
+++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
@@ -401,20 +401,6 @@ namespace drawinglayer::primitive2d
 aRetval.SetPitch(rFontAttribute.getMonospaced() ? PITCH_FIXED : 
PITCH_VARIABLE);
 aRetval.SetLanguage(LanguageTag::convertToLanguageType( rLocale, 
false));
 
-#ifdef _WIN32
-// for WIN32 systems, correct the FontWidth if FontScaling is used
-if(bFontIsScaled && nHeight > 0)
-{
-const FontMetric 
aUnscaledFontMetric(Application::GetDefaultDevice()->GetFontMetric(aRetval));
-
-if(aUnscaledFontMetric.GetAverageFontWidth() > 0)
-{
-const double fScaleFactor(static_cast(nWidth) / 
static_cast(nHeight));
-const sal_uInt32 
nScaledWidth(basegfx::fround(static_cast(aUnscaledFontMetric.GetAverageFontWidth())
 * fScaleFactor));
-aRetval.SetAverageFontWidth(nScaledWidth);
-}
-}
-#endif
 // handle FontRotation (if defined)
 if(!basegfx::fTools::equalZero(fFontRotation))
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - comphelper/Library_comphelper.mk comphelper/source include/comphelper unotools/source xmlsecurity/source

2020-08-19 Thread Samuel Mehrbrodt (via logerrit)
 comphelper/Library_comphelper.mk |1 
 comphelper/source/misc/DirectoryHelper.cxx   |  206 ++
 comphelper/source/misc/backupfilehelper.cxx  |  252 ++-
 include/comphelper/DirectoryHelper.hxx   |   34 +++
 unotools/source/ucbhelper/tempfile.cxx   |4 
 xmlsecurity/source/xmlsec/nss/nssinitializer.cxx |   60 -
 6 files changed, 272 insertions(+), 285 deletions(-)

New commits:
commit 8d162eb24d7a442357fee8c61dfbec2f3484c128
Author: Samuel Mehrbrodt 
AuthorDate: Mon Jan 20 15:23:06 2020 +0100
Commit: Tomaž Vajngerl 
CommitDate: Wed Aug 19 09:05:47 2020 +0200

Make TempFile destructor remove temp directory recursively

Change-Id: Idcfa93ffe86112477ad81bcbf74b8e5b858423f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87080
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 4a25fb867f7cc0a0fc21c4079c84fadec6647ad1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100880
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tomaž Vajngerl 

diff --git a/comphelper/Library_comphelper.mk b/comphelper/Library_comphelper.mk
index 6539844d3cf2..7388c88f3be4 100644
--- a/comphelper/Library_comphelper.mk
+++ b/comphelper/Library_comphelper.mk
@@ -102,6 +102,7 @@ $(eval $(call gb_Library_add_exception_objects,comphelper,\
 comphelper/source/misc/componentmodule \
 comphelper/source/misc/configuration \
 comphelper/source/misc/configurationhelper \
+comphelper/source/misc/DirectoryHelper \
 comphelper/source/misc/dispatchcommand \
 comphelper/source/misc/docpasswordhelper \
 comphelper/source/misc/docpasswordrequest \
diff --git a/comphelper/source/misc/DirectoryHelper.cxx 
b/comphelper/source/misc/DirectoryHelper.cxx
new file mode 100644
index ..a659421654b3
--- /dev/null
+++ b/comphelper/source/misc/DirectoryHelper.cxx
@@ -0,0 +1,206 @@
+/* -*- 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 
+
+namespace comphelper
+{
+typedef std::shared_ptr FileSharedPtr;
+
+OUString DirectoryHelper::splitAtLastToken(const OUString& rSrc, sal_Unicode 
aToken,
+   OUString& rRight)
+{
+const sal_Int32 nIndex(rSrc.lastIndexOf(aToken));
+OUString aRetval;
+
+if (-1 == nIndex)
+{
+aRetval = rSrc;
+rRight.clear();
+}
+else if (nIndex > 0)
+{
+aRetval = rSrc.copy(0, nIndex);
+
+if (rSrc.getLength() > nIndex + 1)
+{
+rRight = rSrc.copy(nIndex + 1);
+}
+}
+
+return aRetval;
+}
+
+bool DirectoryHelper::fileExists(const OUString& rBaseURL)
+{
+if (!rBaseURL.isEmpty())
+{
+FileSharedPtr aBaseFile(new osl::File(rBaseURL));
+
+return (osl::File::E_None == aBaseFile->open(osl_File_OpenFlag_Read));
+}
+
+return false;
+}
+
+bool DirectoryHelper::dirExists(const OUString& rDirURL)
+{
+if (!rDirURL.isEmpty())
+{
+osl::Directory aDirectory(rDirURL);
+
+return (osl::FileBase::E_None == aDirectory.open());
+}
+
+return false;
+}
+
+void DirectoryHelper::scanDirsAndFiles(const OUString& rDirURL, 
std::set& rDirs,
+   std::set>& rFiles)
+{
+if (!rDirURL.isEmpty())
+{
+osl::Directory aDirectory(rDirURL);
+
+if (osl::FileBase::E_None == aDirectory.open())
+{
+osl::DirectoryItem aDirectoryItem;
+
+while (osl::FileBase::E_None == 
aDirectory.getNextItem(aDirectoryItem))
+{
+osl::FileStatus aFileStatus(osl_FileStatus_Mask_Type | 
osl_FileStatus_Mask_FileURL
+| osl_FileStatus_Mask_FileName);
+
+if (osl::FileBase::E_None == 
aDirectoryItem.getFileStatus(aFileStatus))
+{
+if (aFileStatus.isDirectory())
+{
+const OUString aFileName(aFileStatus.getFileName());
+
+if (!aFileName.isEmpty())
+{
+rDirs.insert(aFileName);
+}
+}
+else if (aFileStatus.isRegular())
+{
+OUString aFileName(aFileStatus.getFileName());
+OUString aExtension;
+aFileName = splitAtLastToken(aFileName, '.', 
aExtension);
+
+if (!aFileName.isEmpty())
+{
+rFile

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

2020-08-13 Thread Samuel Mehrbrodt (via logerrit)
 sw/source/core/text/xmldump.cxx |1 +
 sw/source/core/txtnode/txatbase.cxx |2 ++
 2 files changed, 3 insertions(+)

New commits:
commit e2c81bdf6f9f0ee3289bec7aa4ddb1f95b95382d
Author: Samuel Mehrbrodt 
AuthorDate: Wed Aug 12 09:29:15 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Thu Aug 13 15:29:45 2020 +0200

Handle input fields in layout/nodes dump

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

diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx
index d3e885597a74..6a982af47944 100644
--- a/sw/source/core/text/xmldump.cxx
+++ b/sw/source/core/text/xmldump.cxx
@@ -67,6 +67,7 @@ class XmlPortionDumper:public SwPortionHandler
 case PortionType::Meta: return "PortionType::Meta";
 case PortionType::FieldMark: return "PortionType::FieldMark";
 case PortionType::FieldFormCheckbox: return 
"PortionType::FieldFormCheckbox";
+case PortionType::InputField: return "PortionType::InputField";
 
 case PortionType::Expand: return "PortionType::Expand";
 case PortionType::Blank: return "PortionType::Blank";
diff --git a/sw/source/core/txtnode/txatbase.cxx 
b/sw/source/core/txtnode/txatbase.cxx
index 4609bd8412e7..7f46fd178f37 100644
--- a/sw/source/core/txtnode/txatbase.cxx
+++ b/sw/source/core/txtnode/txatbase.cxx
@@ -151,9 +151,11 @@ void SwTextAttr::dumpAsXml(xmlTextWriterPtr pWriter) const
 GetAutoFormat().dumpAsXml(pWriter);
 break;
 case RES_TXTATR_FIELD:
+case RES_TXTATR_INPUTFIELD:
 GetFormatField().dumpAsXml(pWriter);
 break;
 default:
+SAL_WARN("sw.core", "Unhandled TXTATR");
 break;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-08-13 Thread Samuel Mehrbrodt (via logerrit)
 desktop/inc/strings.hrc  |1 +
 desktop/source/deployment/gui/dp_gui_dialog2.cxx |   10 ++
 2 files changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 6a32706e7cc9a6bfe8df7748d0252235c90b021c
Author: Samuel Mehrbrodt 
AuthorDate: Wed Aug 5 16:33:16 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Thu Aug 13 09:39:59 2020 +0200

Add "All supported files" filter to extension add dialog

Did you know you can install xcu files directly via extension manager?
Now it should be easier to discover...

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

diff --git a/desktop/inc/strings.hrc b/desktop/inc/strings.hrc
index d6d2c6244210..3953c73ff60b 100644
--- a/desktop/inc/strings.hrc
+++ b/desktop/inc/strings.hrc
@@ -44,6 +44,7 @@
 #define RID_STR_CANNOT_DETERMINE_LIBNAME
NC_("RID_STR_CANNOT_DETERMINE_LIBNAME", "The library name could not be 
determined.")
 
 #define RID_STR_PACKAGE_BUNDLE  
NC_("RID_STR_PACKAGE_BUNDLE", "Extension")
+#define RID_STR_ALL_SUPPORTED   
NC_("RID_STR_PACKAGE_BUNDLE", "All supported files")
 
 #define RID_STR_DYN_COMPONENT   
NC_("RID_STR_DYN_COMPONENT", "UNO Dynamic Library Component")
 #define RID_STR_JAVA_COMPONENT  
NC_("RID_STR_JAVA_COMPONENT", "UNO Java Component")
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx 
b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index b6b698d236e9..91fe52ebed50 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -635,7 +635,7 @@ uno::Sequence< OUString > ExtMgrDialog::raiseAddPicker()
 // collect and set filter list:
 typedef std::map< OUString, OUString > t_string2string;
 t_string2string title2filter;
-OUString sDefaultFilter( StrAllFiles::get() );
+OUStringBuffer supportedFilters;
 
 const uno::Sequence< uno::Reference< deployment::XPackageTypeInfo > > 
packageTypes(
 m_pManager->getExtensionManager()->getSupportedPackageTypes() );
@@ -648,6 +648,9 @@ uno::Sequence< OUString > ExtMgrDialog::raiseAddPicker()
 const OUString title( xPackageType->getShortDescription() );
 const std::pair< t_string2string::iterator, bool > insertion(
 title2filter.emplace( title, filter ) );
+if (!supportedFilters.isEmpty())
+supportedFilters.append(';');
+supportedFilters.append(filter);
 if ( ! insertion.second )
 { // already existing, append extensions:
 OUStringBuffer buf;
@@ -656,13 +659,12 @@ uno::Sequence< OUString > ExtMgrDialog::raiseAddPicker()
 buf.append( filter );
 insertion.first->second = buf.makeStringAndClear();
 }
-if ( xPackageType->getMediaType() == 
"application/vnd.sun.star.package-bundle" )
-sDefaultFilter = title;
 }
 }
 
 // All files at top:
 xFilePicker->appendFilter( StrAllFiles::get(), "*.*" );
+xFilePicker->appendFilter( DpResId(RID_STR_ALL_SUPPORTED), 
supportedFilters.makeStringAndClear() );
 // then supported ones:
 for (auto const& elem : title2filter)
 {
@@ -675,7 +677,7 @@ uno::Sequence< OUString > ExtMgrDialog::raiseAddPicker()
 TOOLS_WARN_EXCEPTION( "desktop", "" );
 }
 }
-xFilePicker->setCurrentFilter( sDefaultFilter );
+xFilePicker->setCurrentFilter( DpResId(RID_STR_ALL_SUPPORTED) );
 
 if ( xFilePicker->execute() != ui::dialogs::ExecutableDialogResults::OK )
 return uno::Sequence(); // cancelled
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: wsd/ClientSession.cpp wsd/DocumentBroker.cpp wsd/DocumentBroker.hpp

2020-08-13 Thread Samuel Mehrbrodt (via logerrit)
 wsd/ClientSession.cpp  |6 ++
 wsd/DocumentBroker.cpp |3 +++
 wsd/DocumentBroker.hpp |5 +
 3 files changed, 14 insertions(+)

New commits:
commit 494a5221f5bb959f2cce19bc3dd662ac22027e0c
Author: Samuel Mehrbrodt 
AuthorDate: Wed Aug 5 12:41:57 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Thu Aug 13 09:39:30 2020 +0200

Don't update modified status after saving to storage fails

Otherwise client gets a notification that document is unmodified.
This should not happen, as the document in the storage has not been updated
and so it should be considered as modified until saving to storage succeeds.

Change-Id: I6918f97d96a546ce086f622854f4cbeed48d54ae
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100162
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp
index a3fa8e078..0ed783f72 100644
--- a/wsd/ClientSession.cpp
+++ b/wsd/ClientSession.cpp
@@ -1317,6 +1317,12 @@ bool ClientSession::handleKitToClientMessage(const char* 
buffer, const int lengt
 StringVector stateTokens(Util::tokenize(tokens[1], '='));
 if (stateTokens.size() == 2 && stateTokens.equals(0, 
".uno:ModifiedStatus"))
 {
+// When the document is saved internally, but saving to storage 
failed,
+// don't update the client's modified status
+// (otherwise client thinks document is unmodified b/c saving was 
successful)
+if (!docBroker->isLastStorageSaveSuccessful())
+return false;
+
 docBroker->setModified(stateTokens.equals(1, "true"));
 }
 else
diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index a5e62fcc4..f89ed6953 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -176,6 +176,7 @@ DocumentBroker::DocumentBroker(ChildType type,
 _docKey(docKey),
 _docId(Util::encodeId(DocBrokerId++, 3)),
 _documentChangedInStorage(false),
+_lastStorageSaveSuccessful(true),
 _lastSaveTime(std::chrono::steady_clock::now()),
 _lastSaveRequestTime(std::chrono::steady_clock::now() - 
std::chrono::milliseconds(COMMAND_TIMEOUT_MS)),
 _markToDestroy(false),
@@ -1049,6 +1050,7 @@ bool DocumentBroker::saveToStorageInternal(const 
std::string& sessionId, bool su
 assert(_storage && _tileCache);
 const StorageBase::SaveResult storageSaveResult = 
_storage->saveLocalFileToStorage(
 auth, it->second->getCookies(), *_lockCtx, saveAsPath, saveAsFilename, 
isRename);
+_lastStorageSaveSuccessful = storageSaveResult.getResult() == 
StorageBase::SaveResult::OK;
 if (storageSaveResult.getResult() == StorageBase::SaveResult::OK)
 {
 #if !MOBILEAPP
@@ -2474,6 +2476,7 @@ void DocumentBroker::dumpState(std::ostream& os)
 os << "\n  last saved: " << Util::getSteadyClockAsString(_lastSaveTime);
 os << "\n  last save request: " << 
Util::getSteadyClockAsString(_lastSaveRequestTime);
 os << "\n  last save response: " << 
Util::getSteadyClockAsString(_lastSaveResponseTime);
+os << "\n  last storage save was successful: " << 
isLastStorageSaveSuccessful();
 os << "\n  last modified: " << 
Util::getHttpTime(_documentLastModifiedTime);
 os << "\n  file last modified: " << 
Util::getHttpTime(_lastFileModifiedTime);
 if (_limitLifeSeconds)
diff --git a/wsd/DocumentBroker.hpp b/wsd/DocumentBroker.hpp
index b8e176b3c..e59a2d6b4 100644
--- a/wsd/DocumentBroker.hpp
+++ b/wsd/DocumentBroker.hpp
@@ -175,6 +175,8 @@ public:
 
 bool isDocumentChangedInStorage() { return _documentChangedInStorage; }
 
+bool isLastStorageSaveSuccessful() { return _lastStorageSaveSuccessful; }
+
 /// Save the document to Storage if it needs persisting.
 bool saveToStorage(const std::string& sesionId, bool success, const 
std::string& result = "", bool force = false);
 
@@ -404,6 +406,9 @@ private:
 /// for user's command to act.
 bool _documentChangedInStorage;
 
+/// Indicates whether the last saveToStorage operation was successful.
+bool _lastStorageSaveSuccessful;
+
 /// The last time we tried saving, regardless of whether the
 /// document was modified and saved or not.
 std::chrono::steady_clock::time_point _lastSaveTime;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: offapi/com

2020-08-11 Thread Samuel Mehrbrodt (via logerrit)
 offapi/com/sun/star/frame/LayoutManager.idl |   11 +++
 1 file changed, 11 insertions(+)

New commits:
commit 74012c48d99634a7556a86f77e9522024f2afdb2
Author: Samuel Mehrbrodt 
AuthorDate: Tue Aug 11 09:58:31 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Tue Aug 11 11:12:11 2020 +0200

LayoutManager: Document available properties

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

diff --git a/offapi/com/sun/star/frame/LayoutManager.idl 
b/offapi/com/sun/star/frame/LayoutManager.idl
index 0b4490cbc1ab..beb5bd595ae7 100644
--- a/offapi/com/sun/star/frame/LayoutManager.idl
+++ b/offapi/com/sun/star/frame/LayoutManager.idl
@@ -36,6 +36,17 @@
 the size and position of those user interface elements.
 
 
+
+Available properties:
+
+boolean MenuBarCloser: Whether the small "Close" 
button in the menubar is displayed
+boolean AutomaticToolbars: Whether automatic toolbars 
do appear
+boolean RefreshContextToolbarVisibility: Set to true 
to refresh visibility of context toolbars
+boolean HideCurrentUI: Hide/Show current UI elements 
(Toolbar, Statusbar, Menubar, etc)
+boolean PreserveContentSize: When true, the the outer 
window is resized the content/document size is preserved
+
+
+
 @since OOo 2.0
 */
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/cib/libreoffice-6-2' - 2 commits - configure.ac wsd/ClientSession.cpp wsd/DocumentBroker.cpp wsd/DocumentBroker.hpp

2020-08-05 Thread Samuel Mehrbrodt (via logerrit)
 configure.ac   |2 +-
 wsd/ClientSession.cpp  |6 ++
 wsd/DocumentBroker.cpp |2 ++
 wsd/DocumentBroker.hpp |5 +
 4 files changed, 14 insertions(+), 1 deletion(-)

New commits:
commit a73fed6c66fee1361efe808ce81ad777daa15563
Author: Samuel Mehrbrodt 
AuthorDate: Wed Aug 5 12:43:27 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Wed Aug 5 12:43:27 2020 +0200

Release 6.2.11.0

diff --git a/configure.ac b/configure.ac
index 4b83ca624..ea556501b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@
 
 AC_PREREQ([2.63])
 
-AC_INIT([loolwsd], [6.2.10.0], [libreoffice@lists.freedesktop.org])
+AC_INIT([loolwsd], [6.2.11.0], [libreoffice@lists.freedesktop.org])
 LT_INIT([shared, disable-static, dlopen])
 
 AM_INIT_AUTOMAKE([1.10 subdir-objects tar-pax -Wno-portability])
commit dd87f6bf89e5e92918fb15265c5861d2e817286e
Author: Samuel Mehrbrodt 
AuthorDate: Wed Aug 5 12:41:57 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Wed Aug 5 12:41:57 2020 +0200

Don't update modified status after saving to storage fails

Otherwise client gets a notification that document is unmodified.
This should not happen, as the document in the storage has not been updated
and so it should be considered as modified until saving to storage succeeds.

diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp
index 262abe6ab..3d69511f6 100644
--- a/wsd/ClientSession.cpp
+++ b/wsd/ClientSession.cpp
@@ -894,6 +894,12 @@ bool ClientSession::handleKitToClientMessage(const char* 
buffer, const int lengt
 StringTokenizer stateTokens(tokens[1], "=", 
StringTokenizer::TOK_IGNORE_EMPTY | StringTokenizer::TOK_TRIM);
 if (stateTokens.count() == 2 && stateTokens[0] == 
".uno:ModifiedStatus")
 {
+// When the document is saved internally, but saving to storage 
failed,
+// don't update the client's modified status
+// (otherwise client thinks document is unmodified b/c saving was 
successful)
+if (!docBroker->isLastStorageSaveSuccessful())
+return false;
+
 docBroker->setModified(stateTokens[1] == "true");
 }
 else
diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index 72777c6c0..3c3ca28bc 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -153,6 +153,7 @@ DocumentBroker::DocumentBroker(const std::string& uri,
 _docId(Util::encodeId(DocBrokerId++, 3)),
 _cacheRoot(getCachePath(uriPublic.toString())),
 _documentChangedInStorage(false),
+_lastStorageSaveSuccessful(true),
 _lastSaveTime(std::chrono::steady_clock::now()),
 _lastSaveRequestTime(std::chrono::steady_clock::now() - 
std::chrono::milliseconds(COMMAND_TIMEOUT_MS)),
 _markToDestroy(false),
@@ -832,6 +833,7 @@ bool DocumentBroker::saveToStorageInternal(const 
std::string& sessionId,
 
 assert(_storage && _tileCache);
 StorageBase::SaveResult storageSaveResult = 
_storage->saveLocalFileToStorage(auth, saveAsPath, saveAsFilename);
+_lastStorageSaveSuccessful = storageSaveResult.getResult() == 
StorageBase::SaveResult::OK;
 if (storageSaveResult.getResult() == StorageBase::SaveResult::OK)
 {
 if (!isSaveAs)
diff --git a/wsd/DocumentBroker.hpp b/wsd/DocumentBroker.hpp
index e0a3480e7..70a6bfb27 100644
--- a/wsd/DocumentBroker.hpp
+++ b/wsd/DocumentBroker.hpp
@@ -241,6 +241,8 @@ public:
 
 bool isDocumentChangedInStorage() { return _documentChangedInStorage; }
 
+bool isLastStorageSaveSuccessful() { return _lastStorageSaveSuccessful; }
+
 /// Save the document to Storage if it needs persisting.
 bool saveToStorage(const std::string& sesionId, bool success, const 
std::string& result = "", bool force = false);
 
@@ -430,6 +432,9 @@ private:
 /// for user's command to act.
 bool _documentChangedInStorage;
 
+/// Indicates whether the last saveToStorage operation was successful.
+bool _lastStorageSaveSuccessful;
+
 /// The last time we tried saving, regardless of whether the
 /// document was modified and saved or not.
 std::chrono::steady_clock::time_point _lastSaveTime;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/cib_contract138c' - 3 commits - configure.ac include/vcl sd/source vcl/osx vcl/source vcl/unx

2020-08-05 Thread Samuel Mehrbrodt (via logerrit)
 configure.ac   |2 -
 include/vcl/print.hxx  |3 +
 sd/source/ui/view/DocumentRenderer.cxx |   38 +
 vcl/osx/salprn.cxx |2 -
 vcl/source/gdi/print.cxx   |   58 ++---
 vcl/source/gdi/print3.cxx  |   14 ---
 vcl/unx/generic/print/genprnpsp.cxx|2 -
 7 files changed, 97 insertions(+), 22 deletions(-)

New commits:
commit 0cccd293f77a30d3a3d67dba7e5a947d325188be
Author: Samuel Mehrbrodt 
AuthorDate: Wed Aug 5 09:36:24 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Wed Aug 5 09:36:24 2020 +0200

Release 6.2.9.10

Change-Id: I2ec4f4afe063952377fed1e7d80243e0020a5ae1

diff --git a/configure.ac b/configure.ac
index bc90cea801a8..670d715e0601 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for 
the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no 
idea.
 
-AC_INIT([LibreOffice],[6.2.9.9],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[6.2.9.10],[],[],[http://documentfoundation.org/])
 
 AC_PREREQ([2.59])
 
commit c614f280683533fc7c1e10d4f960efd420751c66
Author: Gabor Kelemen 
AuthorDate: Mon Jul 22 00:49:03 2019 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Wed Aug 5 09:25:10 2020 +0200

tdf#39742 tdf#44786 Consider Impress/Draw default printing settings

Default settings can be set under Options - APP - Print but
Impress/Draw has not used these as defaults unlike other apps

Change-Id: I7d430f8fb24f9626cd628b4fe9e0520d9d42b848
Reviewed-on: https://gerrit.libreoffice.org/76079
Tested-by: Jenkins
Reviewed-by: László Németh 
(cherry picked from commit 844be49e7e511f0c397e1faebca10b4fa25ea937)

diff --git a/sd/source/ui/view/DocumentRenderer.cxx 
b/sd/source/ui/view/DocumentRenderer.cxx
index 09a227c0a854..e43c942bf70d 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -59,6 +59,9 @@
 #include 
 #include 
 
+#include 
+#include 
+
 #include 
 #include 
 
@@ -442,7 +445,7 @@ namespace {
 
SdResId(STR_IMPRESS_PRINT_UI_IS_PRINT_NAME),
 
".HelpID:vcl:PrintDialog:IsPrintName:CheckBox" ,
 "IsPrintName" ,
-false
+
officecfg::Office::Impress::Print::Other::PageName::get()
 )
 );
 }
@@ -452,7 +455,7 @@ namespace {
 SdResId(STR_DRAW_PRINT_UI_IS_PRINT_NAME),
 
".HelpID:vcl:PrintDialog:IsPrintName:CheckBox" ,
 "IsPrintName" ,
-false
+
officecfg::Office::Draw::Print::Other::PageName::get()
 )
 );
 }
@@ -461,7 +464,12 @@ namespace {
 SdResId(STR_IMPRESS_PRINT_UI_IS_PRINT_DATE),
 
".HelpID:vcl:PrintDialog:IsPrintDateTime:CheckBox" ,
 "IsPrintDateTime" ,
-false
+// Separate settings for time and date in 
Impress/Draw -> Print page, check that both are set
+mbImpress ?
+
officecfg::Office::Impress::Print::Other::Date::get() &&
+
officecfg::Office::Impress::Print::Other::Time::get() :
+
officecfg::Office::Draw::Print::Other::Date::get() &&
+
officecfg::Office::Draw::Print::Other::Time::get()
 )
 );
 
@@ -471,7 +479,7 @@ namespace {
 
SdResId(STR_IMPRESS_PRINT_UI_IS_PRINT_HIDDEN),
 
".HelpID:vcl:PrintDialog:IsPrintHidden:CheckBox" ,
 "IsPrintHidden" ,
-false
+
officecfg::Office::Impress::Print::Other::HiddenPage::get()
 )
 );
 }
@@ -493,7 +501,9 @@ namespace {
 aHelpIds,
 "Quality" ,
 
CreateChoice(STR_IMPRESS_PRINT_UI_QUALITY_CHOICES, 
SAL_N_ELEMENTS(STR_IMPRESS_PRINT_UI_QUALITY_CHOICES)),
-  

[Libreoffice-commits] online.git: loleaflet/reference.html

2020-08-04 Thread Samuel Mehrbrodt (via logerrit)
 loleaflet/reference.html |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 497707eade432f7f16a19831cb2e62cc14ae5340
Author: Samuel Mehrbrodt 
AuthorDate: Tue Aug 4 14:18:17 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Tue Aug 4 14:55:30 2020 +0200

Fix typo

Change-Id: I85cb2f0d88a35a5e92482550bb1cfe1909c6d92f
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100056
Reviewed-by: Samuel Mehrbrodt 
Tested-by: Samuel Mehrbrodt 

diff --git a/loleaflet/reference.html b/loleaflet/reference.html
index c6fe9e008..2c7e538de 100644
--- a/loleaflet/reference.html
+++ b/loleaflet/reference.html
@@ -3446,7 +3446,7 @@ Note that they usually don't change but there is no 
guarantee that they are stab
 
Note that this notification may be published without a change
from the prior value, so care must be taken to check the 
Values.Modified
-   value and not assume the notifiaction itself implies the
+   value and not assume the notification itself implies the
modified state of the document on its own.


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


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - include/vcl vcl/osx vcl/source vcl/unx

2020-07-21 Thread Samuel Mehrbrodt (via logerrit)
 include/vcl/print.hxx   |3 -
 vcl/osx/salprn.cxx  |2 -
 vcl/source/gdi/print.cxx|   58 +++-
 vcl/source/gdi/print3.cxx   |   16 -
 vcl/unx/generic/print/genprnpsp.cxx |2 -
 5 files changed, 15 insertions(+), 66 deletions(-)

New commits:
commit e2f6c1cb82498da172938dc34458a1c0fa4195ee
Author: Samuel Mehrbrodt 
AuthorDate: Thu Jul 9 08:32:38 2020 +0200
Commit: Michael Stahl 
CommitDate: Tue Jul 21 12:44:57 2020 +0200

tdf#134646 Remove "nearest paper matching" feature

This was introduced with da62b0feb684b34ab191fb0f03ed5432c14cba97 to find
the best paper size for user defined page sizes.

However, this leads to problems with Impress: Slides have screen sizes which
have no relation to paper sizes. For the slide site "Screen (16:9)" the
page size "Executive" is the nearest matching size.

However, this paper is (though supported by printers), very uncommon.
We do not want the nearest matching paper size the printer supports, but
rather we want to fit the slide on the printer default paper.

Note that finding a matching print paper still works (and it even has some
fuzzy matching), so some sort of "nearest paper matching" still exists,
(but with sane limits).

Change-Id: Ie60023d64b251954aa50e8bbdd36f6a290b9f278
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98396
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 3cfc390ecd7c7e9095c77383c460c522437bdabe)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98968
Reviewed-by: Michael Stahl 

diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx
index edc55728e5f0..5ce81b9a9a27 100644
--- a/include/vcl/print.hxx
+++ b/include/vcl/print.hxx
@@ -207,7 +207,7 @@ private:
 ImplGetQueueInfo( const OUString& 
rPrinterName, const OUString* pDriver );
 VCL_DLLPRIVATE void ImplUpdatePageData();
 VCL_DLLPRIVATE void ImplUpdateFontList();
-VCL_DLLPRIVATE void ImplFindPaperFormatForUserSize( JobSetup&, 
bool bMatchNearest );
+VCL_DLLPRIVATE void ImplFindPaperFormatForUserSize( JobSetup& );
 
 VCL_DLLPRIVATE bool StartJob( const OUString& rJobName, 
std::shared_ptr const & );
 
@@ -314,7 +314,6 @@ public:
 sal_uInt16  GetPaperBin() const;
 voidSetPaper( Paper ePaper );
 boolSetPaperSizeUser( const Size& rSize );
-boolSetPaperSizeUser( const Size& rSize, bool 
bMatchNearest );
 Paper   GetPaper() const;
 static OUString GetPaperName( Paper ePaper );
 
diff --git a/vcl/osx/salprn.cxx b/vcl/osx/salprn.cxx
index a1e5a0908b3b..56510b977852 100644
--- a/vcl/osx/salprn.cxx
+++ b/vcl/osx/salprn.cxx
@@ -448,7 +448,7 @@ bool AquaSalInfoPrinter::StartJob( const OUString* 
i_pFileName,
 // platform independent paper matching algorithm
 VclPtr pPrinter( i_rController.getPrinter() );
 pPrinter->SetMapMode( MapMode( MapUnit::Map100thMM ) );
-pPrinter->SetPaperSizeUser( aCurSize, true );
+pPrinter->SetPaperSizeUser( aCurSize );
 
 // create view
 NSView* pPrintView = [[AquaPrintView alloc] initWithController: 
_rController withInfoPrinter: this];
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index c825d25f3501..e6386ef17048 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -1218,16 +1218,13 @@ void Printer::SetPrinterSettingsPreferred( bool 
bPaperSizeFromSetup)
 }
 
 // Map user paper format to an available printer paper format
-void Printer::ImplFindPaperFormatForUserSize( JobSetup& aJobSetup, bool 
bMatchNearest )
+void Printer::ImplFindPaperFormatForUserSize( JobSetup& aJobSetup )
 {
 ImplJobSetup& rData = aJobSetup.ImplGetData();
 
 // The angle that a landscape page will be turned counterclockwise wrt to 
portrait.
 int nLandscapeAngle = mpInfoPrinter ? 
mpInfoPrinter->GetLandscapeAngle( () ) : 900;
-
 int nPaperCount = GetPaperInfoCount();
-boolbFound = false;
-
 PaperInfo aInfo(rData.GetPaperWidth(), rData.GetPaperHeight());
 
 // Compare all paper formats and get the appropriate one
@@ -1241,8 +1238,7 @@ void Printer::ImplFindPaperFormatForUserSize( JobSetup& 
aJobSetup, bool bMatchNe
 ImplGetPaperFormat( rPaperInfo.getWidth(),
 rPaperInfo.getHeight() ));
 rData.SetOrientation( Orientation::Portrait );
-bFound = true;
-break;
+return;
 }
 }
 
@@ -1267,49 +1263,10 @@ void Printer::ImplFindPaperFormatForUserSize( 

[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - include/sfx2

2020-07-15 Thread Samuel Mehrbrodt (via logerrit)
 include/sfx2/strings.hrc |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9d86d44665a7cc6ecd636fd2b7a817083497d2f8
Author: Samuel Mehrbrodt 
AuthorDate: Mon Jul 6 09:05:15 2020 +0200
Commit: Christian Lohmaier 
CommitDate: Wed Jul 15 12:27:03 2020 +0200

Revert "tdf#128526: Make the read-only notification a bit more verbose"

This reverts commit 6c102b0a12ed911b207d8b1da421f2b916c2bcdf.

Reason for revert:
The Infobar has an "Edit Document" button which lets you edit the document 
without first saving it in another place.
So at least in that place this verbose message is confusing.

Change-Id: I3bcdd389a560ac4c8ee0f86ca13573bbc05f2ebb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98075
Reviewed-by: Tor Lillqvist 
Tested-by: Jenkins
(cherry picked from commit 69e3b647d27d4fdb8243d6cca86f9287a5be6026)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98346
Reviewed-by: Michael Stahl 
Reviewed-by: Christian Lohmaier 

diff --git a/include/sfx2/strings.hrc b/include/sfx2/strings.hrc
index e2dfefdc990d..ae0727bb3e36 100644
--- a/include/sfx2/strings.hrc
+++ b/include/sfx2/strings.hrc
@@ -272,7 +272,7 @@
 #define STR_DONATE_BUTTON   NC_("STR_DONATE_BUTTON", 
"Donate")
 #define STR_WHATSNEW_TEXT   NC_("STR_WHATSNEW", "You are 
running version %PRODUCTVERSION of %PRODUCTNAME for the first time. Do you want 
to learn what's new?")
 #define STR_WHATSNEW_BUTTON NC_("STR_WHATSNEW_BUTTON", 
"Release Notes")
-#define STR_READONLY_DOCUMENT   NC_("STR_READONLY_DOCUMENT", 
"This document is open in read-only mode. If you wish to modify the contents, 
first save it as another document, in a folder you have write access to.")
+#define STR_READONLY_DOCUMENT   NC_("STR_READONLY_DOCUMENT", 
"This document is open in read-only mode.")
 #define STR_READONLY_PDFNC_("STR_READONLY_PDF", "This 
PDF is open in read-only mode to allow signing the existing file.")
 #define STR_CLASSIFIED_DOCUMENT NC_("STR_CLASSIFIED_DOCUMENT", 
"The classification label of this document is %1.")
 #define STR_TARGET_DOC_NOT_CLASSIFIED   
NC_("STR_TARGET_DOC_NOT_CLASSIFIED", "This document must be classified before 
the clipboard can be pasted.")
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loleaflet/reference.html loleaflet/src wsd/LOOLWSD.cpp wsd/Storage.cpp

2020-07-15 Thread Samuel Mehrbrodt (via logerrit)
 loleaflet/reference.html |   16 
 loleaflet/src/core/Socket.js |7 +++
 wsd/LOOLWSD.cpp  |   19 +++
 wsd/Storage.cpp  |7 +--
 4 files changed, 47 insertions(+), 2 deletions(-)

New commits:
commit ce91fa4201a53400e677857b6a1c82ee4e8606ec
Author: Samuel Mehrbrodt 
AuthorDate: Tue Jul 7 21:18:13 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Wed Jul 15 09:48:43 2020 +0200

Report back load result to integrator

Integrator currently gets no message when loading the document
from WOPI host fails.

Similiar to Action_Save_Resp, introduce Action_Load_Resp with
the result of the load action.

Change-Id: I3b0f9ee691a1c5d58e9f833d511435a0b25a465f
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98299
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/loleaflet/reference.html b/loleaflet/reference.html
index 99cae5ec6..4c07de27d 100644
--- a/loleaflet/reference.html
+++ b/loleaflet/reference.html
@@ -3035,6 +3035,22 @@ Editor to WOPI host
Values
Description

+   
+   Action_Load_Resp
+   
+   success: boolean
+   result: string
+   errorMsg: string
+   
+   Acknowledgement when load finishes.
+   success tells if LOOL was able to load the document
+   successfully.
+   result contains the reason the document was not 
loaded.
+   errorMsg contains a detailed error message in case 
loading failed.
+   Probably it will contain the error message returned from the 
WOPI/Webdav host.
+   
+   
+

Action_Save_Resp

diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js
index 9b9b3c236..790c7885d 100644
--- a/loleaflet/src/core/Socket.js
+++ b/loleaflet/src/core/Socket.js
@@ -370,6 +370,13 @@ L.Socket = L.Class.extend({
errorMsg: commandresult['errorMsg']
};
this._map.fire('postMessage', {msgId: 
'Action_Save_Resp', args: postMessageObj});
+   } else if (commandresult['command'] === 'load') {
+   postMessageObj = {
+   success: commandresult['success'],
+   result: commandresult['result'],
+   errorMsg: commandresult['errorMsg']
+   };
+   this._map.fire('postMessage', {msgId: 
'Action_Load_Resp', args: postMessageObj});
}
return;
}
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index cef10cc11..1df218e83 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -690,6 +690,20 @@ inline std::string getServiceURI(const std::string , 
bool asAdmin = false)
 
 #endif
 
+void sendLoadResult(std::shared_ptr clientSession, bool success,
+const std::string )
+{
+const std::string result = success ? "" : "Error while loading document";
+const std::string resultstr = success ? "true" : "false";
+// Some sane limit, otherwise we get problems transfering this
+// to the client with large strings (can be a whole webpage)
+// Replace reserved characters
+std::string errorMsgFormatted = 
LOOLProtocol::getAbbreviatedMessage(errorMsg);
+errorMsgFormatted = Poco::translate(errorMsg, "\"", "'");
+clientSession->sendMessage("commandresult: { \"command\": \"load\", 
\"success\": " + resultstr +
+", \"result\": \"" + result + "\", \"errorMsg\": \"" + 
errorMsgFormatted  + "\"}");
+}
+
 } // anonymous namespace
 
 #endif // MOBILEAPP
@@ -3235,15 +3249,19 @@ private:
 // Users of development versions get just an 
info
 // when reaching max documents or connections
 LOOLWSD::checkSessionLimitsAndWarnClients();
+
+sendLoadResult(clientSession, true, "");
 }
 catch (const UnauthorizedRequestException& exc)
 {
 LOG_ERR("Unauthorized Request while loading 
session for " << docBroker->getDocKey() << ": " << exc.what());
+sendLoadResult(clientSession, false, 
"Unauthorized Request");
  

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

2020-07-13 Thread Samuel Mehrbrodt (via logerrit)
 solenv/bin/native-code.py |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 92e816e08a983334d78ebb4bd49a39a782e8a053
Author: Samuel Mehrbrodt 
AuthorDate: Mon Jul 13 12:10:20 2020 +0200
Commit: Noel Grandin 
CommitDate: Mon Jul 13 12:41:34 2020 +0200

Fix android build

After d4ff75676920b6d1c6decdfc9906a3efdf68cf69

Change-Id: If0549633fbc35b2cc6a42458b7671103f2939379
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98624
Tested-by: Noel Grandin 
Reviewed-by: Noel Grandin 

diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index e489d23aed13..4105d0691565 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -39,7 +39,6 @@ core_factory_list = [
 ("libucphier1.a", "ucphier1_component_getFactory"),
 ("libucptdoc1lo.a", "ucptdoc1_component_getFactory"),
 ("libxstor.a", "xstor_component_getFactory"),
-("libxmlfalo.a", "xmlfa_component_getFactory"),
 ("libodfflatxmllo.a", "odfflatxml_component_getFactory"),
 ("libvcllo.a", "vcl_component_getFactory"),
 ("libspelllo.a", "spell_component_getFactory", "#ifndef IOS"),
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/cib_contract138c' - 2 commits - configure.ac include/vcl vcl/osx vcl/source vcl/unx

2020-07-13 Thread Samuel Mehrbrodt (via logerrit)
 configure.ac|2 -
 include/vcl/print.hxx   |3 -
 vcl/osx/salprn.cxx  |2 -
 vcl/source/gdi/print.cxx|   58 +++-
 vcl/source/gdi/print3.cxx   |   14 +++-
 vcl/unx/generic/print/genprnpsp.cxx |2 -
 6 files changed, 15 insertions(+), 66 deletions(-)

New commits:
commit 301db091bf31cae7dbead8cb8b458796aa553508
Author: Samuel Mehrbrodt 
AuthorDate: Mon Jul 13 10:05:54 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Mon Jul 13 10:05:54 2020 +0200

Release 6.2.9.9

Change-Id: I4bbf353a38c74cf23e366da125b57a78b7b3ce62

diff --git a/configure.ac b/configure.ac
index 5a73c8ad68ae..bc90cea801a8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for 
the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no 
idea.
 
-AC_INIT([LibreOffice],[6.2.9.8],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[6.2.9.9],[],[],[http://documentfoundation.org/])
 
 AC_PREREQ([2.59])
 
commit 1864add19d0703bb9e4588961ee1cb3a1aa6e15c
Author: Samuel Mehrbrodt 
AuthorDate: Thu Jul 9 08:32:38 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Mon Jul 13 07:58:03 2020 +0200

tdf#134646 Remove "nearest paper matching" feature

This was introduced with da62b0feb684b34ab191fb0f03ed5432c14cba97 to find
the best paper size for user defined page sizes.

However, this leads to problems with Impress: Slides have screen sizes which
have no relation to paper sizes. For the slide site "Screen (16:9)" the
page size "Executive" is the nearest matching size.

However, this paper is (though supported by printers), very uncommon.
We do not want the nearest matching paper size the printer supports, but
rather we want to fit the slide on the printer default paper.

Note that finding a matching print paper still works (and it even has some
fuzzy matching), so some sort of "nearest paper matching" still exists,
(but with sane limits).

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98396
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 3cfc390ecd7c7e9095c77383c460c522437bdabe)

Change-Id: Ie60023d64b251954aa50e8bbdd36f6a290b9f278

diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx
index 631c38a5ab42..cfb981bef073 100644
--- a/include/vcl/print.hxx
+++ b/include/vcl/print.hxx
@@ -210,7 +210,7 @@ private:
 ImplGetQueueInfo( const OUString& 
rPrinterName, const OUString* pDriver );
 VCL_DLLPRIVATE void ImplUpdatePageData();
 VCL_DLLPRIVATE void ImplUpdateFontList();
-VCL_DLLPRIVATE void ImplFindPaperFormatForUserSize( JobSetup&, 
bool bMatchNearest );
+VCL_DLLPRIVATE void ImplFindPaperFormatForUserSize( JobSetup& );
 
 VCL_DLLPRIVATE bool StartJob( const OUString& rJobName, 
std::shared_ptr const & );
 
@@ -310,7 +310,6 @@ public:
 sal_uInt16  GetPaperBin() const;
 voidSetPaper( Paper ePaper );
 boolSetPaperSizeUser( const Size& rSize );
-boolSetPaperSizeUser( const Size& rSize, bool 
bMatchNearest );
 Paper   GetPaper() const;
 static OUString GetPaperName( Paper ePaper );
 
diff --git a/vcl/osx/salprn.cxx b/vcl/osx/salprn.cxx
index 08f696345aa2..1cbb72e9baad 100644
--- a/vcl/osx/salprn.cxx
+++ b/vcl/osx/salprn.cxx
@@ -447,7 +447,7 @@ bool AquaSalInfoPrinter::StartJob( const OUString* 
i_pFileName,
 // platform independent paper matching algorithm
 VclPtr pPrinter( i_rController.getPrinter() );
 pPrinter->SetMapMode( MapMode( MapUnit::Map100thMM ) );
-pPrinter->SetPaperSizeUser( aCurSize, true );
+pPrinter->SetPaperSizeUser( aCurSize );
 
 // create view
 NSView* pPrintView = [[AquaPrintView alloc] initWithController: 
_rController withInfoPrinter: this];
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 3e9ce5d64b9c..38a985807dfe 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -1220,16 +1220,13 @@ void Printer::SetPrinterSettingsPreferred( bool 
bPaperSizeFromSetup)
 }
 
 // Map user paper format to a available printer paper formats
-void Printer::ImplFindPaperFormatForUserSize( JobSetup& aJobSetup, bool 
bMatchNearest )
+void Printer::ImplFindPaperFormatForUserSize( JobSetup& aJobSetup )
 {
 ImplJobSetup& rData = aJobSetup.ImplGetData();
 
 // The angle that a landscape page will be turned counterclockwise wrt to 
portrait.
 int nLandscapeAngle = 

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

2020-07-12 Thread Samuel Mehrbrodt (via logerrit)
 include/vcl/print.hxx   |3 -
 vcl/osx/salprn.cxx  |2 -
 vcl/source/gdi/print.cxx|   58 +++-
 vcl/source/gdi/print3.cxx   |   16 -
 vcl/unx/generic/print/genprnpsp.cxx |2 -
 5 files changed, 15 insertions(+), 66 deletions(-)

New commits:
commit 3cfc390ecd7c7e9095c77383c460c522437bdabe
Author: Samuel Mehrbrodt 
AuthorDate: Thu Jul 9 08:32:38 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Mon Jul 13 07:38:22 2020 +0200

tdf#134646 Remove "nearest paper matching" feature

This was introduced with da62b0feb684b34ab191fb0f03ed5432c14cba97 to find
the best paper size for user defined page sizes.

However, this leads to problems with Impress: Slides have screen sizes which
have no relation to paper sizes. For the slide site "Screen (16:9)" the
page size "Executive" is the nearest matching size.

However, this paper is (though supported by printers), very uncommon.
We do not want the nearest matching paper size the printer supports, but
rather we want to fit the slide on the printer default paper.

Note that finding a matching print paper still works (and it even has some
fuzzy matching), so some sort of "nearest paper matching" still exists,
(but with sane limits).

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

diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx
index e0e63be2a108..eed2722f824f 100644
--- a/include/vcl/print.hxx
+++ b/include/vcl/print.hxx
@@ -176,7 +176,7 @@ private:
 ImplGetQueueInfo( const OUString& 
rPrinterName, const OUString* pDriver );
 VCL_DLLPRIVATE void ImplUpdatePageData();
 VCL_DLLPRIVATE void ImplUpdateFontList();
-VCL_DLLPRIVATE void ImplFindPaperFormatForUserSize( JobSetup&, 
bool bMatchNearest );
+VCL_DLLPRIVATE void ImplFindPaperFormatForUserSize( JobSetup& );
 
 VCL_DLLPRIVATE bool StartJob( const OUString& rJobName, 
std::shared_ptr const & );
 
@@ -293,7 +293,6 @@ public:
 sal_uInt16  GetPaperBin() const;
 voidSetPaper( Paper ePaper );
 boolSetPaperSizeUser( const Size& rSize );
-boolSetPaperSizeUser( const Size& rSize, bool 
bMatchNearest );
 Paper   GetPaper() const;
 static OUString GetPaperName( Paper ePaper );
 
diff --git a/vcl/osx/salprn.cxx b/vcl/osx/salprn.cxx
index bb35f74a5343..c0d05fde9fb5 100644
--- a/vcl/osx/salprn.cxx
+++ b/vcl/osx/salprn.cxx
@@ -448,7 +448,7 @@ bool AquaSalInfoPrinter::StartJob( const OUString* 
i_pFileName,
 // platform independent paper matching algorithm
 VclPtr pPrinter( i_rController.getPrinter() );
 pPrinter->SetMapMode( MapMode( MapUnit::Map100thMM ) );
-pPrinter->SetPaperSizeUser( aCurSize, true );
+pPrinter->SetPaperSizeUser( aCurSize );
 
 // create view
 NSView* pPrintView = [[AquaPrintView alloc] initWithController: 
_rController withInfoPrinter: this];
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 6668d215d29b..6bdf36bc1d4d 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -1225,16 +1225,13 @@ void Printer::SetPrinterSettingsPreferred( bool 
bPaperSizeFromSetup)
 }
 
 // Map user paper format to an available printer paper format
-void Printer::ImplFindPaperFormatForUserSize( JobSetup& aJobSetup, bool 
bMatchNearest )
+void Printer::ImplFindPaperFormatForUserSize( JobSetup& aJobSetup )
 {
 ImplJobSetup& rData = aJobSetup.ImplGetData();
 
 // The angle that a landscape page will be turned counterclockwise wrt to 
portrait.
 int nLandscapeAngle = mpInfoPrinter ? 
mpInfoPrinter->GetLandscapeAngle( () ) : 900;
-
 int nPaperCount = GetPaperInfoCount();
-boolbFound = false;
-
 PaperInfo aInfo(rData.GetPaperWidth(), rData.GetPaperHeight());
 
 // Compare all paper formats and get the appropriate one
@@ -1248,8 +1245,7 @@ void Printer::ImplFindPaperFormatForUserSize( JobSetup& 
aJobSetup, bool bMatchNe
 ImplGetPaperFormat( rPaperInfo.getWidth(),
 rPaperInfo.getHeight() ));
 rData.SetOrientation( Orientation::Portrait );
-bFound = true;
-break;
+return;
 }
 }
 
@@ -1274,49 +1270,10 @@ void Printer::ImplFindPaperFormatForUserSize( JobSetup& 
aJobSetup, bool bMatchNe
 ImplGetPaperFormat( rPaperInfo.getWidth(),
 rPaperInfo.getHeight() ));
 rData.SetOrientation( Orien

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

2020-07-09 Thread Samuel Mehrbrodt (via logerrit)
 include/sfx2/strings.hrc |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 69e3b647d27d4fdb8243d6cca86f9287a5be6026
Author: Samuel Mehrbrodt 
AuthorDate: Mon Jul 6 09:05:15 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Thu Jul 9 12:38:26 2020 +0200

Revert "tdf#128526: Make the read-only notification a bit more verbose"

This reverts commit 6c102b0a12ed911b207d8b1da421f2b916c2bcdf.

Reason for revert:
The Infobar has an "Edit Document" button which lets you edit the document 
without first saving it in another place.
So at least in that place this verbose message is confusing.

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

diff --git a/include/sfx2/strings.hrc b/include/sfx2/strings.hrc
index d537d14e0208..8f7311dd7ae5 100644
--- a/include/sfx2/strings.hrc
+++ b/include/sfx2/strings.hrc
@@ -272,7 +272,7 @@
 #define STR_DONATE_BUTTON   NC_("STR_DONATE_BUTTON", 
"Donate")
 #define STR_WHATSNEW_TEXT   NC_("STR_WHATSNEW", "You are 
running version %PRODUCTVERSION of %PRODUCTNAME for the first time. Do you want 
to learn what's new?")
 #define STR_WHATSNEW_BUTTON NC_("STR_WHATSNEW_BUTTON", 
"Release Notes")
-#define STR_READONLY_DOCUMENT   NC_("STR_READONLY_DOCUMENT", 
"This document is open in read-only mode. If you wish to modify the contents, 
first save it as another document, in a folder you have write access to.")
+#define STR_READONLY_DOCUMENT   NC_("STR_READONLY_DOCUMENT", 
"This document is open in read-only mode.")
 #define STR_READONLY_PDFNC_("STR_READONLY_PDF", "This 
PDF is open in read-only mode to allow signing the existing file.")
 #define STR_CLASSIFIED_DOCUMENT NC_("STR_CLASSIFIED_DOCUMENT", 
"The classification label of this document is %1.")
 #define STR_TARGET_DOC_NOT_CLASSIFIED   
NC_("STR_TARGET_DOC_NOT_CLASSIFIED", "This document must be classified before 
the clipboard can be pasted.")
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'private/tml/ios-gen2' - 155 commits - android/lib android/README common/Authorization.hpp common/FileUtil.cpp common/FileUtil.hpp common/JailUtil.cpp common/L

2020-07-09 Thread Samuel Mehrbrodt (via logerrit)
Rebased ref, commits from common ancestor:
commit 20eaab272069226485c194d639388b6b7038c211
Author: Samuel Mehrbrodt 
AuthorDate: Tue Jul 7 21:07:21 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Thu Jul 9 10:25:36 2020 +0200

Log number of active sessions

Change-Id: Id161f09bc637e5dcf5ea0beaf11e360de7aa1fa2
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98298
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Samuel Mehrbrodt 

diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index f198bb8e3..fe9cdb7f0 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -2257,7 +2257,7 @@ void DocumentBroker::broadcastMessage(const std::string& 
message)
 {
 assertCorrectThread();
 
-LOG_DBG("Broadcasting message [" << message << "] to all sessions.");
+LOG_DBG("Broadcasting message [" << message << "] to all " << 
_sessions.size() <<  " sessions.");
 for (const auto& sessionIt : _sessions)
 {
 sessionIt.second->sendTextFrame(message);
commit dc5c44f712dfbaa42a8a0fe171638ca241799a93
Author: Tamás Zolnai 
AuthorDate: Thu Jul 9 07:54:24 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Thu Jul 9 09:09:13 2020 +0200

cypress: avoid failure of time field insertion (impress, mobile).

Change-Id: I0330ae701a8d6a84f2cb57bc5ccef88f9fe56ecf
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98394
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git 
a/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js 
b/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js
index 6c65caf8f..2627c4642 100644
--- a/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js
+++ b/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js
@@ -19,7 +19,7 @@ describe('Impress insertion wizard.', function() {
helper.afterAll(testFileName);
});
 
-   function selectionShouldBeTextShape() {
+   function selectionShouldBeTextShape(checkTextShape = true) {
// Check that the shape is there
cy.get('.leaflet-pane.leaflet-overlay-pane svg')
.should(function(svg) {
@@ -27,8 +27,9 @@ describe('Impress insertion wizard.', function() {

expect(svg[0].getBBox().height).to.be.greaterThan(0);
});
 
-   cy.get('.leaflet-pane.leaflet-overlay-pane svg 
g.com\\.sun\\.star\\.drawing\\.TextShape')
-   .should('exist');
+   if (checkTextShape)
+   cy.get('.leaflet-pane.leaflet-overlay-pane svg 
g.com\\.sun\\.star\\.drawing\\.TextShape')
+   .should('exist');
 
// Check also that the shape is fully visible
// TODO: shapes are hungs out of the slide after insertion
@@ -260,7 +261,7 @@ describe('Impress insertion wizard.', function() {
.click();
 
// Check that the shape is there
-   selectionShouldBeTextShape();
+   selectionShouldBeTextShape(false);
 
// Check the text
impressMobileHelper.selectTextOfShape();
@@ -280,7 +281,7 @@ describe('Impress insertion wizard.', function() {
.click();
 
// Check that the shape is there
-   selectionShouldBeTextShape();
+   selectionShouldBeTextShape(false);
 
// Check the text
impressMobileHelper.selectTextOfShape();
commit 83557cbb881f22e0a70c808076176560af5513b9
Author: Michael Meeks 
AuthorDate: Wed Jul 8 21:18:55 2020 +0100
Commit: Michael Meeks 
CommitDate: Wed Jul 8 23:11:26 2020 +0200

Adapt l10n for latest Android locale goodness.

cf. https://gist.github.com/amake/0ac7724681ac1c178c6f95a5b09f03ce

Change-Id: Ie0cc7f210a800fd835356d246ec661757e9ab89f
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98391
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Michael Meeks 

diff --git a/loleaflet/l10n/admin-localizations.json 
b/loleaflet/l10n/admin-localizations.json
index a42f0de97..9ac48be94 100644
--- a/loleaflet/l10n/admin-localizations.json
+++ b/loleaflet/l10n/admin-localizations.json
@@ -122,7 +122,9 @@
 "xh": "../l10n/ui-xh.json",
 "zh-cn": "../l10n/ui-zh_CN.json",
 "zh-CN": "../l10n/ui-zh_CN.json",
+"zh-Hans": "../l10n/ui-zh_CN.json",
 "zh-tw": "../l10n/ui-zh_TW.json",
 "zh-TW": "../l10n/ui-zh_TW.json",
+"zh-Hant": "../l10n/ui-zh_TW.json",
 "zu": "../l10n/ui-zu.jso

[Libreoffice-commits] online.git: Branch 'private/tml/ios-gen2' - 138 commits - android/lib common/FileUtil.cpp common/FileUtil.hpp common/JailUtil.cpp common/Log.cpp common/MessageQueue.cpp common/Ut

2020-07-09 Thread Samuel Mehrbrodt (via logerrit)
 
 |8 
 net/Socket.cpp 
 |5 
 test/Makefile.am   
 |2 
 tools/Config.cpp   
 |2 
 wsd/ClientSession.cpp  
 |  156 
 wsd/ClientSession.hpp  
 |   20 
 wsd/DocumentBroker.cpp 
 |   36 
 wsd/LOOLWSD.cpp
 |   47 
 118 files changed, 8643 insertions(+), 1834 deletions(-)

New commits:
commit d4d51632f46ff8dcb5a67d0dc81d4b3c27bd220d
Author: Samuel Mehrbrodt 
AuthorDate: Tue Jul 7 21:07:21 2020 +0200
Commit: Tor Lillqvist 
CommitDate: Thu Jul 9 13:04:06 2020 +0300

Log number of active sessions

Change-Id: Id161f09bc637e5dcf5ea0beaf11e360de7aa1fa2
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98298
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Samuel Mehrbrodt 

diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index f198bb8e3..fe9cdb7f0 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -2257,7 +2257,7 @@ void DocumentBroker::broadcastMessage(const std::string& 
message)
 {
 assertCorrectThread();
 
-LOG_DBG("Broadcasting message [" << message << "] to all sessions.");
+LOG_DBG("Broadcasting message [" << message << "] to all " << 
_sessions.size() <<  " sessions.");
 for (const auto& sessionIt : _sessions)
 {
 sessionIt.second->sendTextFrame(message);
commit 142c72e62ae91a5b93e1aa4e182ffbf0fa1be9d6
Author: Tamás Zolnai 
AuthorDate: Thu Jul 9 07:54:24 2020 +0200
Commit: Tor Lillqvist 
CommitDate: Thu Jul 9 13:03:58 2020 +0300

cypress: avoid failure of time field insertion (impress, mobile).

Change-Id: I0330ae701a8d6a84f2cb57bc5ccef88f9fe56ecf
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98394
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git 
a/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js 
b/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js
index 6c65caf8f..2627c4642 100644
--- a/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js
+++ b/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js
@@ -19,7 +19,7 @@ describe('Impress insertion wizard.', function() {
helper.afterAll(testFileName);
});
 
-   function selectionShouldBeTextShape() {
+   function selectionShouldBeTextShape(checkTextShape = true) {
// Check that the shape is there
cy.get('.leaflet-pane.leaflet-overlay-pane svg')
.should(function(svg) {
@@ -27,8 +27,9 @@ describe('Impress insertion wizard.', function() {

expect(svg[0].getBBox().height).to.be.greaterThan(0);
});
 
-   cy.get('.leaflet-pane.leaflet-overlay-pane svg 
g.com\\.sun\\.star\\.drawing\\.TextShape')
-   .should('exist');
+   if (checkTextShape)
+   cy.get('.leaflet-pane.leaflet-overlay-pane svg 
g.com\\.sun\\.star\\.drawing\\.TextShape')
+   .should('exist');
 
// Check also that the shape is fully visible
// TODO: shapes are hungs out of the slide after insertion
@@ -260,7 +261,7 @@ describe('Impress insertion wizard.', function() {
.click();
 
// Check that the shape is there
-   selectionShouldBeTextShape();
+   selectionShouldBeTextShape(false);
 
// Check the text
impressMobileHelper.selectTextOfShape();
@@ -280,7 +281,7 @@ describe('Impress insertion wizard.', function() {
.click();
 
// Check that the shape is there
-   selectionShouldBeTextShape();
+   selectionShouldBeTextShape(false);
 
// Check the text
impressMobileHelper.selectTextOfShape();
commit 89cd88d4718ef8415e8b7a91c9643e0c3fc6d87c
Author: Michael Meeks 
AuthorDate: Wed Jul 8 21:18:55 2020 +0100
Commit: Tor Lillqvist 
CommitDate: Thu Jul 9 13:03:47 2020 +0300

Adapt l10n for latest Android locale goodness.

cf. https://gist.github.com/amake/0ac7724681ac1c178c6f95a5b09f03ce

Change-Id: Ie0cc7f210a800fd835356d246ec661757e9ab89f
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98391
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Michael Meeks 

diff --git a/loleaflet/l10n/admi

[Libreoffice-commits] core.git: offapi/com

2020-07-09 Thread Samuel Mehrbrodt (via logerrit)
 offapi/com/sun/star/sheet/DocumentSettings.idl |4 
 1 file changed, 4 insertions(+)

New commits:
commit cb21c44b01a640fc121c034346d70a02ef67cdb2
Author: Samuel Mehrbrodt 
AuthorDate: Mon Jul 6 09:34:10 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Thu Jul 9 11:06:37 2020 +0200

Docs: Add missing property

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

diff --git a/offapi/com/sun/star/sheet/DocumentSettings.idl 
b/offapi/com/sun/star/sheet/DocumentSettings.idl
index 36402ee95dc5..b92f1037dc99 100644
--- a/offapi/com/sun/star/sheet/DocumentSettings.idl
+++ b/offapi/com/sun/star/sheet/DocumentSettings.idl
@@ -108,6 +108,10 @@ published service DocumentSettings
 grid settings in the user interface.
  */
 [optional, property] boolean IsRasterAxisSynchronized;
+
+/** enables the document sharing feature (Tools->Share Spreadsheet)
+ */
+[optional, property] boolean IsDocumentShared;
 };
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


<    2   3   4   5   6   7   8   9   10   11   >