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

2022-11-21 Thread Miklos Vajna (via logerrit)
 sw/source/ui/index/cnttab.cxx |   98 +++---
 sw/source/ui/index/swuiidxmrk.cxx |   44 -
 sw/source/ui/misc/bookmark.cxx|6 +-
 sw/source/uibase/inc/bookmark.hxx |2 
 4 files changed, 75 insertions(+), 75 deletions(-)

New commits:
commit 3dc7aa719006aaf62be93ae92311c1859c2c7e19
Author: Miklos Vajna 
AuthorDate: Mon Nov 21 08:20:06 2022 +0100
Commit: Miklos Vajna 
CommitDate: Mon Nov 21 09:09:00 2022 +0100

sw: prefix members of BookmarkTable, SwCreateAuthEntryDlg_Impl, ...

... SwTOXButton and SwTOXEdit

See tdf#94879 for motivation.

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

diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 15158f4e41f3..4db6f48abcbf 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -1443,10 +1443,10 @@ public:
 class SwTOXEdit : public SwTOXWidget
 {
 std::unique_ptr m_xBuilder;
-SwFormToken   aFormToken;
-Link aModifiedLink;
-Link aPrevNextControlLink;
-bool  bNextControl;
+SwFormToken   m_aFormToken;
+Link m_aModifiedLink;
+Link m_aPrevNextControlLink;
+bool  m_bNextControl;
 SwTokenWindow*m_pParent;
 std::unique_ptr m_xEntry;
 
@@ -1454,8 +1454,8 @@ class SwTOXEdit : public SwTOXWidget
 public:
 SwTOXEdit(SwTokenWindow* pTokenWin, const SwFormToken& rToken)
 : 
m_xBuilder(Application::CreateBuilder(pTokenWin->get_child_container(), 
"modules/swriter/ui/toxentrywidget.ui"))
-, aFormToken(rToken)
-, bNextControl(false)
+, m_aFormToken(rToken)
+, m_bNextControl(false)
 , m_pParent(pTokenWin)
 , m_xEntry(m_xBuilder->weld_entry("entry"))
 {
@@ -1527,25 +1527,25 @@ public:
 
 void SetModifyHdl(const Link& rLink)
 {
-aModifiedLink = rLink;
+m_aModifiedLink = rLink;
 }
 
 DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
 DECL_LINK(FocusInHdl, weld::Widget&, void);
 
-boolIsNextControl() const { return bNextControl; }
-void SetPrevNextLink(const Link& rLink) { 
aPrevNextControlLink = rLink; }
+boolIsNextControl() const { return m_bNextControl; }
+void SetPrevNextLink(const Link& rLink) { 
m_aPrevNextControlLink = rLink; }
 
 const SwFormToken& GetFormToken()
 {
-aFormToken.sText = m_xEntry->get_text();
-return aFormToken;
+m_aFormToken.sText = m_xEntry->get_text();
+return m_aFormToken;
 }
 
 void SetCharStyleName(const OUString& rSet, sal_uInt16 nPoolId)
 {
-aFormToken.sCharStyleName = rSet;
-aFormToken.nPoolId = nPoolId;
+m_aFormToken.sCharStyleName = rSet;
+m_aFormToken.nPoolId = nPoolId;
 }
 
 void AdjustSize();
@@ -1553,7 +1553,7 @@ public:
 
 IMPL_LINK_NOARG(SwTOXEdit, ModifyHdl, weld::Entry&, void)
 {
-aModifiedLink.Call(*this);
+m_aModifiedLink.Call(*this);
 }
 
 IMPL_LINK(SwTOXEdit, KeyInputHdl, const KeyEvent&, rKEvt, bool)
@@ -1568,12 +1568,12 @@ IMPL_LINK(SwTOXEdit, KeyInputHdl, const KeyEvent&, 
rKEvt, bool)
 vcl::KeyCode aCode = rKEvt.GetKeyCode();
 if (aCode.GetCode() == KEY_RIGHT && nMin == nTextLen)
 {
-bNextControl = true;
+m_bNextControl = true;
 bCall = true;
 }
 else if (aCode.GetCode() == KEY_LEFT && !nMin)
 {
-bNextControl = false;
+m_bNextControl = false;
 bCall = true;
 }
 else if ( (aCode.GetCode() == KEY_F3) && aCode.IsShift() && 
!aCode.IsMod1() && !aCode.IsMod2() )
@@ -1583,8 +1583,8 @@ IMPL_LINK(SwTOXEdit, KeyInputHdl, const KeyEvent&, rKEvt, 
bool)
 m_pParent->SetFocus2theAllBtn();
 }
 }
-if (bCall && aPrevNextControlLink.IsSet())
-aPrevNextControlLink.Call(*this);
+if (bCall && m_aPrevNextControlLink.IsSet())
+m_aPrevNextControlLink.Call(*this);
 else
 bCall = false;
 
@@ -1607,16 +1607,16 @@ void SwTOXEdit::AdjustSize()
 class SwTOXButton : public SwTOXWidget
 {
 std::unique_ptr m_xBuilder;
-SwFormToken aFormToken;
-Link aPrevNextControlLink;
-boolbNextControl;
+SwFormToken m_aFormToken;
+Link m_aPrevNextControlLink;
+boolm_bNextControl;
 SwTokenWindow*  m_pParent;
 std::unique_ptr m_xButton;
 public:
 SwTOXButton(SwTokenWindow* pTokenWin, const SwFormToken& rToken)
 : 
m_xBuilder(Application::CreateBuilder(pTokenWin->get_child_container(), 
"modules/swriter/ui/toxbuttonwidget.ui"))
-, aFormToken(rToken)
-, bNextControl(false)
+, m_aFormToken(rToken)
+, m_bNextControl(false)
  

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

2022-11-21 Thread Arnaud VERSINI (via logerrit)
 sal/osl/w32/file.cxx   |   73 +
 sal/osl/w32/thread.cxx |   11 ---
 2 files changed, 32 insertions(+), 52 deletions(-)

New commits:
commit d5f29872f5a149fc7905cdf340215c07af0d4da8
Author: Arnaud VERSINI 
AuthorDate: Sun Nov 20 17:46:10 2022 +0100
Commit: Noel Grandin 
CommitDate: Mon Nov 21 09:15:59 2022 +0100

sal/osl win32 : use non recursive mutexes in file and thread

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

diff --git a/sal/osl/w32/file.cxx b/sal/osl/w32/file.cxx
index be921aede733..4c4c06f462fa 100644
--- a/sal/osl/w32/file.cxx
+++ b/sal/osl/w32/file.cxx
@@ -34,6 +34,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #ifdef max /* conflict w/ std::numeric_limits::max() */
 #undef max
@@ -64,7 +65,7 @@ namespace {
 */
 struct FileHandle_Impl
 {
-CRITICAL_SECTION m_mutex;
+std::mutex   m_mutex;
 HANDLE   m_hFile;
 
 StateBits m_state;
@@ -127,32 +128,10 @@ struct FileHandle_Impl
 SIZE_T  nBytes);
 
 oslFileError syncFile();
-
-/** Guard.
- */
-class Guard
-{
-LPCRITICAL_SECTION m_mutex;
-
-public:
-explicit Guard(LPCRITICAL_SECTION pMutex);
-~Guard();
-};
 };
 
 }
 
-FileHandle_Impl::Guard::Guard(LPCRITICAL_SECTION pMutex)
-: m_mutex (pMutex)
-{
-assert(pMutex);
-::EnterCriticalSection (m_mutex);
-}
-
-FileHandle_Impl::Guard::~Guard()
-{
-::LeaveCriticalSection (m_mutex);
-}
 
 FileHandle_Impl::FileHandle_Impl(HANDLE hFile)
 : m_hFile   (hFile),
@@ -165,7 +144,6 @@ FileHandle_Impl::FileHandle_Impl(HANDLE hFile)
   m_bufsiz  (getpagesize()),
   m_buffer  (nullptr)
 {
-::InitializeCriticalSection (&m_mutex);
 m_buffer = static_cast(calloc(m_bufsiz, 1));
 }
 
@@ -173,7 +151,6 @@ FileHandle_Impl::~FileHandle_Impl()
 {
 free(m_buffer);
 m_buffer = nullptr;
-::DeleteCriticalSection (&m_mutex);
 }
 
 SIZE_T FileHandle_Impl::getpagesize()
@@ -679,7 +656,7 @@ oslFileError SAL_CALL osl_syncFile(oslFileHandle Handle)
 if ((!pImpl) || !IsValidHandle(pImpl->m_hFile))
 return osl_File_E_INVAL;
 
-FileHandle_Impl::Guard lock(&(pImpl->m_mutex));
+std::lock_guard lock(pImpl->m_mutex);
 
 oslFileError result = pImpl->syncFile();
 if (result != osl_File_E_None)
@@ -697,21 +674,23 @@ oslFileError SAL_CALL osl_closeFile(oslFileHandle Handle)
 if ((!pImpl) || !IsValidHandle(pImpl->m_hFile))
 return osl_File_E_INVAL;
 
-::EnterCriticalSection(&(pImpl->m_mutex));
-
-oslFileError result = pImpl->syncFile();
-if (result != osl_File_E_None)
-{
-/* ignore double failure */
-(void)::CloseHandle(pImpl->m_hFile);
-}
-else if (!::CloseHandle(pImpl->m_hFile))
+oslFileError result;
 {
-/* translate error code */
-result = oslTranslateFileError(GetLastError());
+std::lock_guard lock(pImpl->m_mutex);
+
+result = pImpl->syncFile();
+if (result != osl_File_E_None)
+{
+/* ignore double failure */
+(void)::CloseHandle(pImpl->m_hFile);
+}
+else if (!::CloseHandle(pImpl->m_hFile))
+{
+/* translate error code */
+result = oslTranslateFileError(GetLastError());
+}
 }
 
-::LeaveCriticalSection(&(pImpl->m_mutex));
 delete pImpl;
 return result;
 }
@@ -820,7 +799,7 @@ SAL_CALL osl_readLine(
 sal_uInt64 uBytesRead = 0;
 
 // read at current filepos; filepos += uBytesRead;
-FileHandle_Impl::Guard lock(&(pImpl->m_mutex));
+std::lock_guard lock(pImpl->m_mutex);
 oslFileError result = pImpl->readLineAt(
 pImpl->m_filepos, ppSequence, &uBytesRead);
 if (result == osl_File_E_None)
@@ -839,7 +818,7 @@ oslFileError SAL_CALL osl_readFile(
 return osl_File_E_INVAL;
 
 // read at current filepos; filepos += *pBytesRead;
-FileHandle_Impl::Guard lock(&(pImpl->m_mutex));
+std::lock_guard lock(pImpl->m_mutex);
 oslFileError result = pImpl->readFileAt(
 pImpl->m_filepos, pBuffer, uBytesRequested, pBytesRead);
 if (result == osl_File_E_None)
@@ -859,7 +838,7 @@ oslFileError SAL_CALL osl_writeFile(
 return osl_File_E_INVAL;
 
 // write at current filepos; filepos += *pBytesWritten;
-FileHandle_Impl::Guard lock(&(pImpl->m_mutex));
+std::lock_guard lock(pImpl->m_mutex);
 oslFileError result = pImpl->writeFileAt(
 pImpl->m_filepos, pBuffer, uBytesToWrite, pBytesWritten);
 if (result == osl_File_E_None)
@@ -899,7 +878,7 @@ oslFileError SAL_CALL osl_readFileAt(
 LONGLONG const nOffset = sal::static_int_cast< LONGLONG >(uOffset);
 
 // read at specified fileptr
-FileHandle_Impl::Guard lock (&(pImpl->m_mutex));
+std::lock_guard lock (pImpl->m_mutex);
 return pImpl->readFileAt(nOffs

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

2022-11-21 Thread Jim Raykowski (via logerrit)
 sd/source/ui/dlg/navigatr.cxx |2 
 sd/source/ui/dlg/sdtreelb.cxx |  104 ---
 sd/uiconfig/simpress/ui/navigatorpanel.ui |  113 +++---
 3 files changed, 139 insertions(+), 80 deletions(-)

New commits:
commit 1b031eb1ba6c529ce67ff8f471afee414d64a098
Author: Jim Raykowski 
AuthorDate: Tue Nov 8 23:49:27 2022 -0900
Commit: Jim Raykowski 
CommitDate: Mon Nov 21 09:41:41 2022 +0100

tdf#145359 related: SdNavigator dnd

This is an enhancement patch that provides drag and drop capability
within the Navigator page object tree to allow arranging object
navigation order and grouping of objects.

Change-Id: I76996cd909765fb3503cf077566bec267b7705e2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142640
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 

diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index 98883e7b..cdc2db1f5a81 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -808,7 +808,7 @@ void 
SdNavigatorControllerItem::StateChangedAtToolBoxControl( sal_uInt16 nSId,
 if (nState & NavState::TableUpdate)
 {
 // InitTlb; is initiated by Slot
-if (maUpdateRequest)
+if (maUpdateRequest && 
!pNavigatorWin->GetObjects().get_treeview().has_focus())
 maUpdateRequest();
 }
 }
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index 8a9002ac6c38..a90a76adbee2 100644
--- a/sd/source/ui/dlg/sdtreelb.cxx
+++ b/sd/source/ui/dlg/sdtreelb.cxx
@@ -379,8 +379,8 @@ namespace
 
 std::unique_ptr 
xSourceParent(rTreeView.make_iterator(xSource.get()));
 bool bSourceHasParent = rTreeView.iter_parent(*xSourceParent);
-// level 1 objects only
-if (!bSourceHasParent || rTreeView.get_iter_depth(*xSourceParent))
+// disallow root drag
+if (!bSourceHasParent)
 return false;
 
 SdrObject* pSourceObject = 
weld::fromId(rTreeView.get_id(*xSource));
@@ -495,20 +495,36 @@ sal_Int8 SdPageObjsTLVDropTarget::AcceptDrop(const 
AcceptDropEvent& rEvt)
 if (!m_rTreeView.get_dest_row_at_pos(rEvt.maPosPixel, xTarget.get(), true))
 return DND_ACTION_NONE;
 
+// disallow when root is drop target
+if (m_rTreeView.get_iter_depth(*xTarget) == 0)
+return DND_ACTION_NONE;
+
+// disallow if there is no source entry selected
 std::unique_ptr xSource(m_rTreeView.make_iterator());
 if (!m_rTreeView.get_selected(xSource.get()))
 return DND_ACTION_NONE;
 
-std::unique_ptr 
xTargetParent(m_rTreeView.make_iterator(xTarget.get()));
-while (m_rTreeView.get_iter_depth(*xTargetParent))
-m_rTreeView.iter_parent(*xTargetParent);
+// disallow when root is source
+if (m_rTreeView.get_iter_depth(*xSource) == 0)
+return DND_ACTION_NONE;
 
-std::unique_ptr 
xSourceParent(m_rTreeView.make_iterator(xSource.get()));
-while (m_rTreeView.get_iter_depth(*xSourceParent))
-m_rTreeView.iter_parent(*xSourceParent);
+// disallow when the source is the parent or ancestoral parent of the 
target
+std::unique_ptr 
xTargetParent(m_rTreeView.make_iterator(xTarget.get()));
+while (m_rTreeView.get_iter_depth(*xTargetParent) > 1)
+{
+if (!m_rTreeView.iter_parent(*xTargetParent) ||
+m_rTreeView.iter_compare(*xSource, *xTargetParent) == 0)
+return DND_ACTION_NONE;
+}
 
-// can only drop within the same page
-if (m_rTreeView.iter_compare(*xTargetParent, *xSourceParent) != 0)
+// disallow drop when source and target are not within the same page
+std::unique_ptr 
xSourcePage(m_rTreeView.make_iterator(xSource.get()));
+std::unique_ptr 
xTargetPage(m_rTreeView.make_iterator(xTarget.get()));
+while (m_rTreeView.get_iter_depth(*xTargetPage))
+m_rTreeView.iter_parent(*xTargetPage);
+while (m_rTreeView.get_iter_depth(*xSourcePage))
+m_rTreeView.iter_parent(*xSourcePage);
+if (m_rTreeView.iter_compare(*xTargetPage, *xSourcePage) != 0)
 return DND_ACTION_NONE;
 
 return DND_ACTION_MOVE;
@@ -529,35 +545,73 @@ sal_Int8 SdPageObjsTLVDropTarget::ExecuteDrop( const 
ExecuteDropEvent& rEvt )
 return DND_ACTION_NONE;
 
 std::unique_ptr xTarget(m_rTreeView.make_iterator());
-if (!m_rTreeView.get_dest_row_at_pos(rEvt.maPosPixel, xTarget.get(), true))
+if (!m_rTreeView.get_dest_row_at_pos(rEvt.maPosPixel, xTarget.get(), 
false))
 return DND_ACTION_NONE;
-int nTargetPos = m_rTreeView.get_iter_index_in_parent(*xTarget) + 1;
+
+auto nIterCompare = m_rTreeView.iter_compare(*xSource, *xTarget);
+if (nIterCompare == 0)
+{
+// drop position is the same as source position
+return DND_ACTION_NONE;
+}
 
 SdrObject* pTargetObject = 
weld::fromId(m_rTreeView.get_id(*xTarget));
 SdrObject* pSourceObject = 
weld::fromId(m_rTreeView.ge

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

2022-11-21 Thread Caolán McNamara (via logerrit)
 vcl/qt5/QtFontFace.cxx |4 
 vcl/source/font/PhysicalFontFace.cxx   |4 
 vcl/unx/generic/glyphs/freetype_glyphcache.cxx |4 
 3 files changed, 12 deletions(-)

New commits:
commit 2df9b7cd3fa03077c9809dab9b94a20dd89002fb
Author: Caolán McNamara 
AuthorDate: Fri Nov 18 12:42:56 2022 +
Commit: Caolán McNamara 
CommitDate: Mon Nov 21 09:55:06 2022 +0100

stop setting OpenSymbol as a "Symbol" font

which has a specific meaning of a Windows Symbol encoding

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

diff --git a/vcl/qt5/QtFontFace.cxx b/vcl/qt5/QtFontFace.cxx
index d45fadafe87e..351f59739544 100644
--- a/vcl/qt5/QtFontFace.cxx
+++ b/vcl/qt5/QtFontFace.cxx
@@ -108,8 +108,6 @@ void QtFontFace::fillAttributesFromQFont(const QFont& 
rFont, FontAttributes& rFA
 QFontInfo aFontInfo(rFont);
 
 rFA.SetFamilyName(toOUString(aFontInfo.family()));
-if (IsOpenSymbol(toOUString(aFontInfo.family(
-rFA.SetSymbolFlag(true);
 rFA.SetStyleName(toOUString(aFontInfo.styleName()));
 rFA.SetPitch(aFontInfo.fixedPitch() ? PITCH_FIXED : PITCH_VARIABLE);
 rFA.SetWeight(QtFontFace::toFontWeight(aFontInfo.weight()));
@@ -142,8 +140,6 @@ QtFontFace* QtFontFace::fromQFontDatabase(const QString& 
aFamily, const QString&
 FontAttributes aFA;
 
 aFA.SetFamilyName(toOUString(aFamily));
-if (IsOpenSymbol(aFA.GetFamilyName()))
-aFA.SetSymbolFlag(true);
 aFA.SetStyleName(toOUString(aStyle));
 aFA.SetPitch(isFixedPitch ? PITCH_FIXED : PITCH_VARIABLE);
 aFA.SetWeight(QtFontFace::toFontWeight(weigh));
diff --git a/vcl/source/font/PhysicalFontFace.cxx 
b/vcl/source/font/PhysicalFontFace.cxx
index cf9849162d15..cd4254d131db 100644
--- a/vcl/source/font/PhysicalFontFace.cxx
+++ b/vcl/source/font/PhysicalFontFace.cxx
@@ -45,10 +45,6 @@ PhysicalFontFace::PhysicalFontFace(const FontAttributes& 
rDFA)
 , mpHbFace(nullptr)
 , mpHbUnscaledFont(nullptr)
 {
-// OpenSymbol is a unicode font, but it still deserves the symbol flag
-if (!IsSymbolFont())
-if (IsOpenSymbol(GetFamilyName()))
-SetSymbolFlag(true);
 }
 
 PhysicalFontFace::~PhysicalFontFace()
diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx 
b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
index 3477ce1cbf42..db2bd614336e 100644
--- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
+++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
@@ -516,10 +516,6 @@ void FreetypeFont::GetFontMetric(ImplFontMetricDataRef 
const & rxTo) const
 
 rxTo->SetOrientation(mrFontInstance.GetFontSelectPattern().mnOrientation);
 
-//Always consider [open]symbol as symbol fonts
-if ( IsOpenSymbol( rxTo->GetFamilyName() ) )
-rxTo->SetSymbolFlag( true );
-
 FT_Activate_Size( maSizeFT );
 
 rxTo->ImplCalcLineSpacing(&mrFontInstance);


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

2022-11-21 Thread Caolán McNamara (via logerrit)
 vcl/inc/impfont.hxx  |7 ++-
 vcl/source/font/font.cxx |9 -
 2 files changed, 2 insertions(+), 14 deletions(-)

New commits:
commit 5a35ca12d98d7ad0bfc012d75d00f9eefb4ec078
Author: Caolán McNamara 
AuthorDate: Fri Nov 18 20:56:51 2022 +
Commit: Caolán McNamara 
CommitDate: Mon Nov 21 09:55:29 2022 +0100

drop ImplFont::SetSymbolFlag

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

diff --git a/vcl/inc/impfont.hxx b/vcl/inc/impfont.hxx
index 450e227b34ad..b570f22a6e7c 100644
--- a/vcl/inc/impfont.hxx
+++ b/vcl/inc/impfont.hxx
@@ -49,7 +49,7 @@ public:
 rtl_TextEncodingGetCharSet() const  { 
return meCharSet; }
 const Size& GetFontSize() const  { return 
maAverageFontSize; }
 
-boolIsSymbolFont() const{ 
return mbSymbolFlag; }
+boolIsSymbolFont() const{ 
return meCharSet == RTL_TEXTENCODING_SYMBOL; }
 
 voidSetFamilyName( const OUString& sFamilyName ){ 
maFamilyName = sFamilyName; }
 voidSetStyleName( const OUString& sStyleName )  { 
maStyleName = sStyleName; }
@@ -72,8 +72,6 @@ public:
 maAverageFontSize = rSize;
 }
 
-voidSetSymbolFlag( const bool bSymbolFlag ) { 
mbSymbolFlag = bSymbolFlag; }
-
 // straight properties, no getting them from AskConfig()
 FontFamily  GetFamilyTypeNoAsk() const  { 
return meFamily; }
 FontWeight  GetWeightNoAsk() const  { 
return meWeight; }
@@ -127,8 +125,7 @@ private:
 LanguageTag maCJKLanguageTag;
 
 // Flags - device independent
-boolmbSymbolFlag:1,
-mbOutline:1,
+boolmbOutline:1,
 mbConfigLookup:1,   // config lookup should only be 
done once
 mbShadow:1,
 mbVertical:1,
diff --git a/vcl/source/font/font.cxx b/vcl/source/font/font.cxx
index afaa430e19f7..b6ed6926b33f 100644
--- a/vcl/source/font/font.cxx
+++ b/vcl/source/font/font.cxx
@@ -161,14 +161,7 @@ void Font::SetFamily( FontFamily eFamily )
 void Font::SetCharSet( rtl_TextEncoding eCharSet )
 {
 if (const_cast(mpImplFont)->GetCharSet() != eCharSet)
-{
 mpImplFont->SetCharSet( eCharSet );
-
-if ( eCharSet == RTL_TEXTENCODING_SYMBOL )
-mpImplFont->SetSymbolFlag( true );
-else
-mpImplFont->SetSymbolFlag( false );
-}
 }
 
 bool Font::IsSymbolFont() const
@@ -977,7 +970,6 @@ ImplFont::ImplFont() :
 meCharSet( RTL_TEXTENCODING_DONTKNOW ),
 maLanguageTag( LANGUAGE_DONTKNOW ),
 maCJKLanguageTag( LANGUAGE_DONTKNOW ),
-mbSymbolFlag( false ),
 mbOutline( false ),
 mbConfigLookup( false ),
 mbShadow( false ),
@@ -1011,7 +1003,6 @@ ImplFont::ImplFont( const ImplFont& rImplFont ) :
 meCharSet( rImplFont.meCharSet ),
 maLanguageTag( rImplFont.maLanguageTag ),
 maCJKLanguageTag( rImplFont.maCJKLanguageTag ),
-mbSymbolFlag( rImplFont.mbSymbolFlag ),
 mbOutline( rImplFont.mbOutline ),
 mbConfigLookup( rImplFont.mbConfigLookup ),
 mbShadow( rImplFont.mbShadow ),


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

2022-11-21 Thread Caolán McNamara (via logerrit)
 vcl/quartz/ctfonts.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 7017ae2fd7161ee9ed07095f56dd3da9eb9e6b10
Author: Caolán McNamara 
AuthorDate: Sat Nov 19 10:08:57 2022 +
Commit: Caolán McNamara 
CommitDate: Mon Nov 21 09:55:53 2022 +0100

IsSymbolFont means that its a Windows Symbol Encoding

so kCTFontSymbolicClass doesn't fulfil that meaning, if we want
something more generic to indicate that a font is only useful
for "icons, dingbats, technical symbols, and so on." then we need
a different thing. Its baked in everywhere else that a "SymbolFont"
uses RTL_TEXTENCODING_SYMBOL.

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

diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx
index 89460c3943a1..93a862653b74 100644
--- a/vcl/quartz/ctfonts.cxx
+++ b/vcl/quartz/ctfonts.cxx
@@ -379,8 +379,6 @@ FontAttributes DevFontFromCTFontDescriptor( 
CTFontDescriptorRef pFD, bool* bFont
 if( CFDictionaryGetValueIfPresent( pAttrDict, kCTFontSymbolicTrait, 
reinterpret_cast(&pSymbolNum) ) )
 {
 CFNumberGetValue( pSymbolNum, kCFNumberSInt64Type, &nSymbolTrait );
-rDFA.SetSymbolFlag( (nSymbolTrait & kCTFontClassMaskTrait) == 
kCTFontSymbolicClass );
-
 if (nSymbolTrait & kCTFontMonoSpaceTrait)
 rDFA.SetPitch(PITCH_FIXED);
 }


[Libreoffice-commits] core.git: 2 commits - include/vcl offapi/com vcl/qa vcl/source vcl/workben

2022-11-21 Thread Caolán McNamara (via logerrit)
 include/vcl/font.hxx   |2 --
 offapi/com/sun/star/rendering/FontInfo.idl |6 ++
 vcl/qa/cppunit/font.cxx|   25 -
 vcl/source/font/font.cxx   |5 -
 vcl/workben/listfonts.cxx  |1 -
 5 files changed, 6 insertions(+), 33 deletions(-)

New commits:
commit b98e2979af71d1f415a856be98839f321371804a
Author: Caolán McNamara 
AuthorDate: Sun Nov 20 20:03:23 2022 +
Commit: Caolán McNamara 
CommitDate: Mon Nov 21 09:57:02 2022 +0100

drop effectively unused Font::IsSymbolFont

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

diff --git a/include/vcl/font.hxx b/include/vcl/font.hxx
index a49005050d67..8f7363d816b7 100644
--- a/include/vcl/font.hxx
+++ b/include/vcl/font.hxx
@@ -72,8 +72,6 @@ public:
 rtl_TextEncodingGetCharSet() const;
 FontEmphasisMarkGetEmphasisMarkStyle() const;
 
-boolIsSymbolFont() const;
-
 voidSetFamilyName( const OUString& rFamilyName );
 voidSetStyleName( const OUString& rStyleName );
 voidSetFamily( FontFamily );
diff --git a/vcl/qa/cppunit/font.cxx b/vcl/qa/cppunit/font.cxx
index 24fd1c6126a1..25550a95f6b0 100644
--- a/vcl/qa/cppunit/font.cxx
+++ b/vcl/qa/cppunit/font.cxx
@@ -26,7 +26,6 @@ public:
 void testItalic();
 void testAlignment();
 void testQuality();
-void testSymbolFlagAndCharSet();
 void testEmphasisMarkShouldBePosAboveWhenSimplifiedChinese();
 void testEmphasisMarkShouldBePosAboveWhenNotSimplifiedChinese();
 void testEmphasisMarkInitAsNone();
@@ -43,7 +42,6 @@ public:
 CPPUNIT_TEST(testItalic);
 CPPUNIT_TEST(testAlignment);
 CPPUNIT_TEST(testQuality);
-CPPUNIT_TEST(testSymbolFlagAndCharSet);
 CPPUNIT_TEST(testEmphasisMarkShouldBePosAboveWhenSimplifiedChinese);
 CPPUNIT_TEST(testEmphasisMarkShouldBePosAboveWhenNotSimplifiedChinese);
 CPPUNIT_TEST(testEmphasisMarkInitAsNone);
@@ -135,29 +133,6 @@ void VclFontTest::testQuality()
 CPPUNIT_ASSERT_EQUAL( int(50), aFont.GetQuality() );
 }
 
-
-void VclFontTest::testSymbolFlagAndCharSet()
-{
-// default constructor should set scalable flag to false
-vcl::Font aFont;
-
-CPPUNIT_ASSERT_MESSAGE( "Should not be seen as a symbol font after default 
constructor called", !aFont.IsSymbolFont() );
-CPPUNIT_ASSERT_EQUAL_MESSAGE( "Character set should be 
RTL_TEXTENCODING_DONTKNOW after default constructor called",
-RTL_TEXTENCODING_DONTKNOW, aFont.GetCharSet() );
-
-aFont.SetCharSet( RTL_TEXTENCODING_SYMBOL );
-
-CPPUNIT_ASSERT_MESSAGE( "Test 1: Symbol font flag should be on", 
aFont.IsSymbolFont() );
-CPPUNIT_ASSERT_EQUAL_MESSAGE( "Test 1: Character set should be 
RTL_TEXTENCODING_SYMBOL",
-RTL_TEXTENCODING_SYMBOL, aFont.GetCharSet() );
-
-aFont.SetCharSet( RTL_TEXTENCODING_UNICODE );
-
-CPPUNIT_ASSERT_MESSAGE( "Test 2: Symbol font flag should be off", 
!aFont.IsSymbolFont() );
-CPPUNIT_ASSERT_EQUAL_MESSAGE( "Test 2: Character set should be 
RTL_TEXTENCODING_UNICODE",
-RTL_TEXTENCODING_UNICODE, aFont.GetCharSet() );
-}
-
 void VclFontTest::testEmphasisMarkShouldBePosAboveWhenSimplifiedChinese()
 {
 vcl::Font aFont;
diff --git a/vcl/source/font/font.cxx b/vcl/source/font/font.cxx
index b6ed6926b33f..410b03d2cae9 100644
--- a/vcl/source/font/font.cxx
+++ b/vcl/source/font/font.cxx
@@ -164,11 +164,6 @@ void Font::SetCharSet( rtl_TextEncoding eCharSet )
 mpImplFont->SetCharSet( eCharSet );
 }
 
-bool Font::IsSymbolFont() const
-{
-return mpImplFont->IsSymbolFont();
-}
-
 void Font::SetLanguageTag( const LanguageTag& rLanguageTag )
 {
 if (const_cast(mpImplFont)->maLanguageTag != rLanguageTag)
diff --git a/vcl/workben/listfonts.cxx b/vcl/workben/listfonts.cxx
index c66f964a895d..49380c03bcbc 100644
--- a/vcl/workben/listfonts.cxx
+++ b/vcl/workben/listfonts.cxx
@@ -381,7 +381,6 @@ int ListFonts::Main()
   << "\n\tWidth type: " << aFont.GetWidthType()
   << "\n\tAlignment: " << aFont.GetAlignment()
   << "\n\tCharset: " << 
GetOctetTextEncodingName(aFont.GetCharSet())
-  << "\n\tSymbol font? " << (aFont.IsSymbolFont() ? "yes" 
: "no")
   << "\n\tAscent: " << aFont.GetAscent()
   << "\n\tDescent: " << aFont.GetDescent()
   << "\n\tInternal leading: " << aFont.GetInternalLeading()
commit 468277a0aec9a40f5d5f3db600088ae04a45e2c9
Author: Caolán McNamara 
AuthorDate: Sun Nov 20 19:49:09 2022 +
Commit: Caolán McNamara 
CommitDate: Mon Nov 21 09:56:48 2022 +0100

clarify what 'IsSymbolFont' in this external facing idl means

Change-Id: I2c

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

2022-11-21 Thread Caolán McNamara (via logerrit)
 vcl/inc/impfont.hxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 8a93dbd60109a46b167bdc656bfb9a802ffe8f69
Author: Caolán McNamara 
AuthorDate: Sun Nov 20 20:04:44 2022 +
Commit: Caolán McNamara 
CommitDate: Mon Nov 21 09:57:30 2022 +0100

drop unused ImplFont::IsSymbolFont

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

diff --git a/vcl/inc/impfont.hxx b/vcl/inc/impfont.hxx
index b570f22a6e7c..08a1fd558ca1 100644
--- a/vcl/inc/impfont.hxx
+++ b/vcl/inc/impfont.hxx
@@ -49,8 +49,6 @@ public:
 rtl_TextEncodingGetCharSet() const  { 
return meCharSet; }
 const Size& GetFontSize() const  { return 
maAverageFontSize; }
 
-boolIsSymbolFont() const{ 
return meCharSet == RTL_TEXTENCODING_SYMBOL; }
-
 voidSetFamilyName( const OUString& sFamilyName ){ 
maFamilyName = sFamilyName; }
 voidSetStyleName( const OUString& sStyleName )  { 
maStyleName = sStyleName; }
 voidSetFamilyType( const FontFamily eFontFamily )   { 
meFamily = eFontFamily; }


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

2022-11-21 Thread Caolán McNamara (via logerrit)
 vcl/inc/unx/freetype_glyphcache.hxx|2 +-
 vcl/unx/generic/glyphs/freetype_glyphcache.cxx |   11 ---
 2 files changed, 5 insertions(+), 8 deletions(-)

New commits:
commit e3245247421fc30c37a8b7321e2815e2507b5a1f
Author: Caolán McNamara 
AuthorDate: Sun Nov 20 20:12:41 2022 +
Commit: Caolán McNamara 
CommitDate: Mon Nov 21 09:58:50 2022 +0100

clarify IsSymbolFont means Microsoft Symbol encoding

https: 
//freetype.org/freetype2/docs/reference/ft2-base_interface.html#ft_encoding_ms_symbol
https: 
//learn.microsoft.com/en-us/typography/opentype/spec/recom#non-standard-symbol-fonts
Change-Id: I77732fff67a145bd8fa347c3d0c8e4deb2083143
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143008
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/vcl/inc/unx/freetype_glyphcache.hxx 
b/vcl/inc/unx/freetype_glyphcache.hxx
index 5bc1632ccee6..fd54def14bb5 100644
--- a/vcl/inc/unx/freetype_glyphcache.hxx
+++ b/vcl/inc/unx/freetype_glyphcache.hxx
@@ -67,7 +67,7 @@ public:
 int   GetFontFaceIndex() const  { return mnFaceNum; }
 int   GetFontFaceVariation() const  { return 
mnFaceVariation; }
 sal_IntPtrGetFontId() const { return mnFontId; }
-bool  IsSymbolFont() const  { return 
maDevFontAttributes.IsSymbolFont(); }
+bool  IsMicrosoftSymbolEncoded() const { return 
maDevFontAttributes.IsSymbolFont(); }
 const FontAttributes& GetFontAttributes() const { return 
maDevFontAttributes; }
 
 void  AnnounceFont( vcl::font::PhysicalFontCollection* );
diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx 
b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
index db2bd614336e..aca47bad7518 100644
--- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
+++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
@@ -452,13 +452,10 @@ FreetypeFont::FreetypeFont(FreetypeFontInstance& 
rFontInstance, std::shared_ptr<
  * not need any glyph data from FreeType in this case */
 /*FT_Error rc = */ FT_Set_Pixel_Sizes( maFaceFT, mnWidth, rFSD.mnHeight );
 
-FT_Select_Charmap(maFaceFT, FT_ENCODING_UNICODE);
-
-if( mxFontInfo->IsSymbolFont() )
-{
-FT_Encoding eEncoding = FT_ENCODING_MS_SYMBOL;
-FT_Select_Charmap(maFaceFT, eEncoding);
-}
+if (mxFontInfo->IsMicrosoftSymbolEncoded())
+FT_Select_Charmap(maFaceFT, FT_ENCODING_MS_SYMBOL);
+else
+FT_Select_Charmap(maFaceFT, FT_ENCODING_UNICODE);
 
 mbFaceOk = true;
 


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

2022-11-21 Thread Tibor Nagy (via logerrit)
 oox/source/export/shapes.cxx|   13 +++--
 sd/qa/unit/data/pptx/tdf149803.pptx |binary
 sd/qa/unit/export-tests-ooxml1.cxx  |   11 +++
 3 files changed, 22 insertions(+), 2 deletions(-)

New commits:
commit ab10008ecaa33228838115a0b714e4f118c07ac1
Author: Tibor Nagy 
AuthorDate: Wed Nov 9 14:08:02 2022 +0100
Commit: László Németh 
CommitDate: Mon Nov 21 10:04:36 2022 +0100

tdf#149803 tdf#128150 PPTX: export UseBgFill of custom shapes

Fixing tdf#128150 the UseBgFill property of shapes can
be saved to PPTX, but not in the case of custom shapes.

Follow-up to commits c4cf2e82e8d0aaef9b1daedc033d6edf647e5284
(tdf#128150 Add OOXML import/export for "use background fill"),
commit 50394abcc36a73c0205e6cb69d925c66c25f81f2,
(tdf#128150 Implement/add SlideBackgroundFill visualization") and
commit  9c2c48f14535e58cad0453fef584400ee703aecc
"tdf#128150 xmloff: ODF import/export of fill-use-slide-background".

Change-Id: Ib88f236d2533ef71ea66718d380e83d9a0685c3e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142489
Tested-by: László Németh 
Reviewed-by: László Németh 

diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 9d00dff8348c..70466d17fdb1 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -812,11 +812,17 @@ ShapeExport& ShapeExport::WriteCustomShape( const 
Reference< XShape >& xShape )
 }
 
 FSHelperPtr pFS = GetFS();
-pFS->startElementNS(mnXmlNamespace, (GetDocumentType() != DOCUMENT_DOCX || 
mbUserShapes ? XML_sp : XML_wsp));
-
 // non visual shape properties
 if (GetDocumentType() != DOCUMENT_DOCX || mbUserShapes)
 {
+bool bUseBackground = false;
+if (GETA(FillUseSlideBackground))
+mAny >>= bUseBackground;
+if (bUseBackground)
+mpFS->startElementNS(mnXmlNamespace, XML_sp, XML_useBgFill, "1");
+else
+mpFS->startElementNS(mnXmlNamespace, XML_sp);
+
 bool isVisible = true ;
 if( GETA (Visible))
 {
@@ -904,7 +910,10 @@ ShapeExport& ShapeExport::WriteCustomShape( const 
Reference< XShape >& xShape )
 pFS->endElementNS( mnXmlNamespace, XML_nvSpPr );
 }
 else
+{
+pFS->startElementNS(mnXmlNamespace, XML_wsp);
 pFS->singleElementNS(mnXmlNamespace, XML_cNvSpPr);
+}
 
 // visual shape properties
 pFS->startElementNS(mnXmlNamespace, XML_spPr);
diff --git a/sd/qa/unit/data/pptx/tdf149803.pptx 
b/sd/qa/unit/data/pptx/tdf149803.pptx
new file mode 100644
index ..a3a16cc23fdc
Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf149803.pptx differ
diff --git a/sd/qa/unit/export-tests-ooxml1.cxx 
b/sd/qa/unit/export-tests-ooxml1.cxx
index 97d2b80902c8..866cd331dc68 100644
--- a/sd/qa/unit/export-tests-ooxml1.cxx
+++ b/sd/qa/unit/export-tests-ooxml1.cxx
@@ -53,6 +53,7 @@ public:
 {
 }
 
+void testTdf149803();
 void testTdf149311();
 void testTdf149128();
 void testTdf66228();
@@ -126,6 +127,7 @@ public:
 
 CPPUNIT_TEST_SUITE(SdOOXMLExportTest1);
 
+CPPUNIT_TEST(testTdf149803);
 CPPUNIT_TEST(testTdf149311);
 CPPUNIT_TEST(testTdf149128);
 CPPUNIT_TEST(testTdf66228);
@@ -225,6 +227,15 @@ void checkFontAttributes(const SdrTextObj* pObj, ItemValue 
nVal, sal_uInt32 nId)
 }
 }
 
+void SdOOXMLExportTest1::testTdf149803()
+{
+loadFromURL(u"pptx/tdf149803.pptx");
+save("Impress Office Open XML");
+
+xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
+assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp", "useBgFill", "1");
+}
+
 void SdOOXMLExportTest1::testTdf149311()
 {
 loadFromURL(u"odp/tdf149311.odp");


[Libreoffice-commits] core.git: extensions/source sd/source svx/source sw/source vcl/source

2022-11-21 Thread Noel Grandin (via logerrit)
 extensions/source/dbpilots/controlwizard.cxx  |1 -
 extensions/source/dbpilots/controlwizard.hxx  |1 -
 sd/source/ui/animations/SlideTransitionPane.cxx   |4 
 sd/source/ui/inc/SlideTransitionPane.hxx  |2 --
 svx/source/sidebar/effect/EffectPropertyPanel.cxx |4 
 svx/source/sidebar/effect/EffectPropertyPanel.hxx |2 --
 sw/source/core/text/xmldump.cxx   |   11 +++
 vcl/source/fontsubset/ttcr.cxx|1 -
 vcl/source/fontsubset/ttcr.hxx|1 -
 9 files changed, 3 insertions(+), 24 deletions(-)

New commits:
commit 727141098b7d7bfed65e64d2062042269a8f6088
Author: Noel Grandin 
AuthorDate: Fri Nov 18 16:28:11 2022 +0200
Commit: Noel Grandin 
CommitDate: Mon Nov 21 10:05:30 2022 +0100

loplugin:unusedfields start removing unused weld fields

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

diff --git a/extensions/source/dbpilots/controlwizard.cxx 
b/extensions/source/dbpilots/controlwizard.cxx
index 5b4ed61dee92..13fa2980683a 100644
--- a/extensions/source/dbpilots/controlwizard.cxx
+++ b/extensions/source/dbpilots/controlwizard.cxx
@@ -150,7 +150,6 @@ namespace dbp
 m_xFormDatasource = m_xBuilder->weld_label("datasource");
 m_xFormDatasourceLabel = m_xBuilder->weld_label("datasourcelabel");
 m_xFormTable = m_xBuilder->weld_label("formtable");
-m_xFormTableLabel = m_xBuilder->weld_label("formtablelabel");
 
 const OControlWizardContext& rContext = getContext();
 if ( rContext.bEmbedded )
diff --git a/extensions/source/dbpilots/controlwizard.hxx 
b/extensions/source/dbpilots/controlwizard.hxx
index cf55c655e574..22e7feca1a5b 100644
--- a/extensions/source/dbpilots/controlwizard.hxx
+++ b/extensions/source/dbpilots/controlwizard.hxx
@@ -49,7 +49,6 @@ namespace dbp
 std::unique_ptr m_xFormDatasource;
 std::unique_ptr m_xFormContentTypeLabel;
 std::unique_ptr m_xFormContentType;
-std::unique_ptr m_xFormTableLabel;
 std::unique_ptr m_xFormTable;
 std::unique_ptr m_xFrame;
 
diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx 
b/sd/source/ui/animations/SlideTransitionPane.cxx
index 4e49dd8aaa5d..30ccf1a51a7b 100644
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -413,9 +413,7 @@ constexpr sal_uInt16 nNoneId = 
std::numeric_limits::max();
 
 void SlideTransitionPane::Initialize(SdDrawDocument* pDoc)
 {
-mxFT_VARIANT = m_xBuilder->weld_label("variant_label");
 mxLB_VARIANT = m_xBuilder->weld_combo_box("variant_list");
-mxFT_duration = m_xBuilder->weld_label("duration_label");
 mxCBX_duration = 
m_xBuilder->weld_metric_spin_button("transition_duration", FieldUnit::SECOND);
 mxFT_SOUND = m_xBuilder->weld_label("sound_label");
 mxLB_SOUND = m_xBuilder->weld_combo_box("sound_list");
@@ -485,9 +483,7 @@ SlideTransitionPane::~SlideTransitionPane()
 removeListener();
 mxVS_TRANSITION_ICONSWin.reset();
 mxVS_TRANSITION_ICONS.reset();
-mxFT_VARIANT.reset();
 mxLB_VARIANT.reset();
-mxFT_duration.reset();
 mxCBX_duration.reset();
 mxFT_SOUND.reset();
 mxLB_SOUND.reset();
diff --git a/sd/source/ui/inc/SlideTransitionPane.hxx 
b/sd/source/ui/inc/SlideTransitionPane.hxx
index 2b6ea8f93c8b..2672bfa630ef 100644
--- a/sd/source/ui/inc/SlideTransitionPane.hxx
+++ b/sd/source/ui/inc/SlideTransitionPane.hxx
@@ -100,9 +100,7 @@ private:
 
 std::unique_ptr mxVS_TRANSITION_ICONS;
 std::unique_ptr mxVS_TRANSITION_ICONSWin;
-std::unique_ptr mxFT_VARIANT;
 std::unique_ptr mxLB_VARIANT;
-std::unique_ptr mxFT_duration;
 std::unique_ptr mxCBX_duration;
 std::unique_ptr mxFT_SOUND;
 std::unique_ptr mxLB_SOUND;
diff --git a/svx/source/sidebar/effect/EffectPropertyPanel.cxx 
b/svx/source/sidebar/effect/EffectPropertyPanel.cxx
index 77e2dac11229..400dda997962 100644
--- a/svx/source/sidebar/effect/EffectPropertyPanel.cxx
+++ b/svx/source/sidebar/effect/EffectPropertyPanel.cxx
@@ -34,8 +34,6 @@ EffectPropertyPanel::EffectPropertyPanel(weld::Widget* 
pParent, SfxBindings* pBi
  [this] { return GetFrameWeld(); }))
 , mxGlowTransparency(
   m_xBuilder->weld_metric_spin_button("LB_GLOW_TRANSPARENCY", 
FieldUnit::PERCENT))
-, mxFTRadiusSoftEdge(m_xBuilder->weld_label("radiussoftedge"))
-, mxFTRadiusGlow(m_xBuilder->weld_label("radiusglow"))
 , mxFTColor(m_xBuilder->weld_label("glowcolorlabel"))
 , 
mxSoftEdgeRadius(m_xBuilder->weld_metric_spin_button("SB_SOFTEDGE_RADIUS", 
FieldUnit::POINT))
 {
@@ -47,11 +45,9 @@ EffectPropertyPanel::~EffectPropertyPanel()
 mxGlowRadius.reset();
 mxLBGlowColor.reset();
 mxGlowTransparency.reset();
-mxFTRadiusSoftEdge.reset();
 mxFTColor

Re: Changes in LibreOfficeKit

2022-11-21 Thread Miklos Vajna
Hi,

On Sat, Nov 19, 2022 at 12:58:24PM +0100, Andreas Mantke  wrote:
> https://gerrit.libreoffice.org/c/core/+/137869
> 
> It would be great if the developer or the reviewer could merge this
> patch into the LibreOffice master too.

Done in .

Regards,

Miklos


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

2022-11-21 Thread Skyler Grey (via logerrit)
 sw/source/ui/dialog/swdlgfact.cxx |   22 +
 sw/source/ui/dialog/swdlgfact.hxx |   14 
 sw/source/ui/frmdlg/cption.cxx|   34 -
 sw/source/uibase/shells/tabsh.cxx |   60 --
 vcl/jsdialog/enabled.cxx  |5 ++-
 5 files changed, 90 insertions(+), 45 deletions(-)

New commits:
commit 19d02a1267cfa1e7a950af31a77d4a7888594630
Author: Skyler Grey 
AuthorDate: Fri Aug 12 10:31:42 2022 +0100
Commit: Szymon Kłos 
CommitDate: Mon Nov 21 11:17:21 2022 +0100

Make the number format dialog an async jsdialog

- The dialog needs to be async in order for multiple people to be able
  to use it at once
- If we don't make the item set a shared pointer, we will crash out with
  an error when we try to copy it after the OK button is pressed
- As the dialog is tabbed, we need to enable the dialog for all UI files
  that the dialog uses rather than just the main dialog UI file

Change-Id: I8d684e9e9ad49b8a85ee940864d7219b4115a6e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138270
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142990
Tested-by: Jenkins

diff --git a/sw/source/ui/dialog/swdlgfact.cxx 
b/sw/source/ui/dialog/swdlgfact.cxx
index 68135716fcb9..56bce661390d 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -110,6 +110,16 @@ short SwAbstractSfxController_Impl::Execute()
 return m_xDlg->run();
 }
 
+short AbstractNumFormatDlg_Impl::Execute()
+{
+return m_xDlg->run();
+}
+
+bool AbstractNumFormatDlg_Impl::StartExecuteAsync(AsyncContext &rCtx)
+{
+return SfxSingleTabDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
+}
+
 short AbstractSwAsciiFilterDlg_Impl::Execute()
 {
 return m_xDlg->run();
@@ -356,11 +366,21 @@ const SfxItemSet* 
SwAbstractSfxController_Impl::GetOutputItemSet() const
 return m_xDlg->GetOutputItemSet();
 }
 
+const SfxItemSet* AbstractNumFormatDlg_Impl::GetOutputItemSet() const
+{
+return m_xDlg->GetOutputItemSet();
+}
+
 void SwAbstractSfxController_Impl::SetText(const OUString& rStr)
 {
 m_xDlg->set_title(rStr);
 }
 
+void AbstractNumFormatDlg_Impl::SetText(const OUString& rStr)
+{
+m_xDlg->set_title(rStr);
+}
+
 void AbstractSwAsciiFilterDlg_Impl::FillOptions( SwAsciiOptions& rOptions )
 {
 m_xDlg->FillOptions(rOptions);
@@ -833,7 +853,7 @@ VclPtr 
SwAbstractDialogFactory_Impl::CreateSwBackgroundDialog
 
 VclPtr 
SwAbstractDialogFactory_Impl::CreateNumFormatDialog(weld::Widget* pParent, 
const SfxItemSet& rSet)
 {
-return 
VclPtr::Create(std::make_unique(pParent,
 rSet));
+return 
VclPtr::Create(std::make_shared(pParent,
 rSet));
 }
 
 VclPtr 
SwAbstractDialogFactory_Impl::CreateSwAsciiFilterDlg(weld::Window* pParent,
diff --git a/sw/source/ui/dialog/swdlgfact.hxx 
b/sw/source/ui/dialog/swdlgfact.hxx
index c0326249a15b..5e110dfbdd59 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -126,6 +126,20 @@ public:
 virtual void SetText(const OUString& rStr) override;
 };
 
+class AbstractNumFormatDlg_Impl : public SfxAbstractDialog
+{
+std::shared_ptr m_xDlg;
+public:
+explicit 
AbstractNumFormatDlg_Impl(std::shared_ptr p)
+: m_xDlg(std::move(p))
+{
+}
+virtual short Execute() override;
+virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
+virtual const SfxItemSet* GetOutputItemSet() const override;
+virtual void SetText(const OUString& rStr) override;
+};
+
 class AbstractSwAsciiFilterDlg_Impl : public AbstractSwAsciiFilterDlg
 {
 std::unique_ptr m_xDlg;
diff --git a/sw/source/uibase/shells/tabsh.cxx 
b/sw/source/uibase/shells/tabsh.cxx
index ab93b027e69f..3082c5e36e98 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -695,58 +695,62 @@ void SwTableShell::Execute(SfxRequest &rReq)
 FieldUnit eMetric = ::GetDfltMetric(dynamic_cast( 
pView) !=  nullptr );
 SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< 
sal_uInt16 >(eMetric)));
 SvNumberFormatter* pFormatter = rSh.GetNumberFormatter();
-SfxItemSetFixed
-aCoreSet( GetPool() );
+auto pCoreSet = 
std::make_shared>( GetPool() );
 
 SfxItemSetFixed
- aBoxSet( *aCoreSet.GetPool() );
+ aBoxSet( *pCoreSet->GetPool() );
 rSh.GetTableBoxFormulaAttrs( aBoxSet );
 
 SfxItemState eState = aBoxSet.GetItemState(RES_BOXATR_FORMAT);
 if(eState == SfxItemState::DEFAULT)
 {
-aCoreSet.Put( SfxUInt32Item( SID_ATTR_NUMBERFORMAT_VALUE,
+pCoreSet->Put( SfxUInt32Item( SID_ATTR_NUMBERFORMAT_VALUE,
 pFormatter->GetFormatIndex(NF_TEXT, LANGUAGE_

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - external/freetype

2022-11-21 Thread Miklos Vajna (via logerrit)
 external/freetype/UnpackedTarball_freetype.mk |3 +++
 external/freetype/ubsan.patch |   12 
 2 files changed, 15 insertions(+)

New commits:
commit 709973084ef694f98076e6d4cbac7135722a8517
Author: Miklos Vajna 
AuthorDate: Thu Nov 17 16:54:09 2022 +0100
Commit: Miklos Vajna 
CommitDate: Mon Nov 21 11:17:51 2022 +0100

exteral/freetype: -fsanitize=non-null-attribute

Crashreport log:

workdir/UnpackedTarball/freetype/src/psaux/psobjs.c:204:5: runtime error: 
null pointer passed as argument 1, which is declared to never be null
/usr/include/string.h:44:28: note: nonnull attribute specified here
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior
   workdir/UnpackedTarball/freetype/src/psaux/psobjs.c:204:5 in

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

diff --git a/external/freetype/UnpackedTarball_freetype.mk 
b/external/freetype/UnpackedTarball_freetype.mk
index 0b521cb934d0..8a6c7f852242 100644
--- a/external/freetype/UnpackedTarball_freetype.mk
+++ b/external/freetype/UnpackedTarball_freetype.mk
@@ -14,6 +14,9 @@ $(eval $(call 
gb_UnpackedTarball_set_tarball,freetype,$(FREETYPE_TARBALL),,freet
 $(eval $(call gb_UnpackedTarball_add_patches,freetype,\
external/freetype/freetype-2.6.5.patch.1 \
external/freetype/freetype-fd-hack.patch.0 \
+   external/freetype/ubsan.patch \
 ))
 
+$(eval $(call gb_UnpackedTarball_set_patchlevel,freetype,0))
+
 # vim: set noet sw=4 ts=4:
diff --git a/external/freetype/ubsan.patch b/external/freetype/ubsan.patch
new file mode 100644
index ..4a743f3ef3f6
--- /dev/null
+++ b/external/freetype/ubsan.patch
@@ -0,0 +1,12 @@
+--- src/psaux/psobjs.c.orig2022-11-17 16:52:21.913211573 +0100
 src/psaux/psobjs.c 2022-11-17 16:53:17.905127207 +0100
+@@ -201,7 +201,8 @@
+ /* add the object to the base block and adjust offset */
+ table->elements[idx] = FT_OFFSET( table->block, table->cursor );
+ table->lengths [idx] = length;
+-FT_MEM_COPY( table->block + table->cursor, object, length );
++if (table->block + table->cursor)
++  FT_MEM_COPY( table->block + table->cursor, object, length );
+ 
+ table->cursor += length;
+ return FT_Err_Ok;


[Libreoffice-commits] core.git: configure.ac

2022-11-21 Thread Balázs Varga (allotropia) (via logerrit)
 configure.ac |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 6edd93671c491938e52fce75a64f48f8a63d08a1
Author: Balázs Varga (allotropia) 
AuthorDate: Thu Nov 10 13:52:21 2022 +0100
Commit: Balazs Varga 
CommitDate: Mon Nov 21 11:18:35 2022 +0100

Revert "use uname for detecting WSL"

Since this patch breaks WSL2 builds on windows.

This reverts commit 5a8a1c4a86938b65c5ea7807f60e721946d7d8de.

Change-Id: Idd68a2609b81881af87ae777b5c4bf9cc2d8ef88
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142580
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/configure.ac b/configure.ac
index cef05a5893d9..52476b46d14a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -302,9 +302,9 @@ dnl checks build and host OSes
 dnl do this before argument processing to allow for platform dependent defaults
 dnl ===
 
-# Check for WSL. But if --host is explicitly specified (to really do build for
+# Check for WSL (version 2, at least). But if --host is explicitly specified 
(to really do build for
 # Linux on WSL) trust that.
-if test -z "$host" -a -z "$build" -a "$(uname -r | grep -i Microsoft 
2>/dev/null)" != ""; then
+if test -z "$host" -a -z "$build" -a "`wslsys -v 2>/dev/null`" != ""; then
 ac_cv_host="x86_64-pc-wsl"
 ac_cv_host_cpu="x86_64"
 ac_cv_host_os="wsl"


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

2022-11-21 Thread Michael Stahl (via logerrit)
 vcl/source/fontsubset/cff.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0f8262d34ba7130a8bd8907bc85e9f42fecafd51
Author: Michael Stahl 
AuthorDate: Sat Nov 19 23:04:53 2022 +0100
Commit: Michael Stahl 
CommitDate: Mon Nov 21 11:20:23 2022 +0100

vcl: GCC 12.2.1 -Werror=maybe-uninitialized

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

diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx
index 900ddfeea637..45a8b7890a31 100644
--- a/vcl/source/fontsubset/cff.cxx
+++ b/vcl/source/fontsubset/cff.cxx
@@ -1360,7 +1360,7 @@ void CffSubsetterContext::convertOneTypeOp()
 auto bchar = popVal();
 auto ady = popVal();
 auto adx = popVal();
-int nBase, nAccent;
+int nBase = {}, nAccent = {};
 if (getBaseAccent(bchar, achar, &nBase, &nAccent))
 {
 maExtraGlyphIds.push_back(nBase);


[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - chart2/source

2022-11-21 Thread Caolán McNamara (via logerrit)
 chart2/source/controller/main/ElementSelector.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 8f23544311f6593ad46c503524be2508fd784c71
Author: Caolán McNamara 
AuthorDate: Thu Nov 17 15:51:58 2022 +
Commit: Michael Stahl 
CommitDate: Mon Nov 21 11:22:40 2022 +0100

Resolves: tdf#152087 strip any newlines from the entry

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

diff --git a/chart2/source/controller/main/ElementSelector.cxx 
b/chart2/source/controller/main/ElementSelector.cxx
index 34bba3173a85..d538108ae8e9 100644
--- a/chart2/source/controller/main/ElementSelector.cxx
+++ b/chart2/source/controller/main/ElementSelector.cxx
@@ -158,7 +158,8 @@ void SelectorListBox::UpdateChartElementsListAndSelection()
 sal_uInt16 nN=0;
 for (auto const& entry : m_aEntries)
 {
-m_xWidget->append_text(entry.UIName);
+// tdf#152087 strip any newlines from the entry
+m_xWidget->append_text(entry.UIName.replaceAll("\n", " "));
 if ( !bSelectionFound && aSelectedOID == entry.OID )
 {
 nEntryPosToSelect = nN;


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - oovbaapi/ooo sw/inc sw/Library_vbaswobj.mk sw/source

2022-11-21 Thread Justin Luth (via logerrit)
 oovbaapi/ooo/vba/word/XFormField.idl  |   50 ++
 oovbaapi/ooo/vba/word/XFormFields.idl |7 
 sw/Library_vbaswobj.mk|2 
 sw/inc/IMark.hxx  |8 -
 sw/source/ui/vba/vbadocument.cxx  |   10 -
 sw/source/ui/vba/vbaformfield.cxx |  255 ++
 sw/source/ui/vba/vbaformfield.hxx |   98 +
 sw/source/ui/vba/vbaformfields.cxx|  249 +
 sw/source/ui/vba/vbaformfields.hxx|   53 +++
 9 files changed, 724 insertions(+), 8 deletions(-)

New commits:
commit a76cf059f0f99b216b3c54f9b8613999b69bf804
Author: Justin Luth 
AuthorDate: Wed Nov 9 17:02:03 2022 -0500
Commit: Miklos Vajna 
CommitDate: Mon Nov 21 11:25:41 2022 +0100

tdf#151548 vba FormFields: Add basic word::XFormField support

Squashed commit including followups from various people.

Unit tests will come in the following commits that represent
actual FormFields that have content/results.

This lays the foundation for adding
Checkboxes, Textinputs, and Dropdowns.

Change-Id: If85ae25f881198d5a0699b3350a7eb20b1735c45
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142507
Reviewed-by: Justin Luth 
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist 

private field 'm_xModel' is not used [-Werror,-Wunused-private-field]

ever since
commit 2a26f136a36791c06caa895d5a25f4633fd10651
Author: Justin Luth 
Date:   Wed Nov 9 17:02:03 2022 -0500
tdf#151548 vba FormFields: Add basic word::XFormField support

Plus, this code is std::move'ing a value into a "&" field, which is
very wrong

Change-Id: Ia8bbf6e0eaa524ca0f5bbf7624f4b9555920f993
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142545
Tested-by: Jenkins
Reviewed-by: Justin Luth 

Fix typos

Change-Id: Id924e4747d6a3d81b69da28910c8e096565b9b68
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142538
Tested-by: Julien Nabet 
Reviewed-by: Julien Nabet 

Clean up some seeming copy/paste mistakes

...all introduced with 2a26f136a36791c06caa895d5a25f4633fd10651 "tdf#151548 
vba
FormFields: Add basic word::XFormField support":

For the SwVbaFormField ctor, std::move of a const lvalue has no effect here.
(And I just don't bother applying the move-from-pass-by-value-param 
optimization
here.)

For FormFieldCollectionHelper, consistently make the data members non-const 
(a
const css::uno::Reference wouldn't make that much sense anyway, as it 
doesn't
transitively apply const'ness also to the referenced object) and 
non-reference,
and make the FormFieldCollectionHelper params non-const (and non-reference) 
to
make the move-from-pass-by-value-param optimization actually work here.

(I came across this code with an upcoming loplugin:constmove that flags
suspicious uses of std::move involving const-qualified types.)

Change-Id: Ib41d4671b33871eddff41bc20ea38de02d616046
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142568
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142644
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Justin Luth 

diff --git a/oovbaapi/ooo/vba/word/XFormField.idl 
b/oovbaapi/ooo/vba/word/XFormField.idl
index f8a4f411d44f..2b879fb6c652 100644
--- a/oovbaapi/ooo/vba/word/XFormField.idl
+++ b/oovbaapi/ooo/vba/word/XFormField.idl
@@ -27,12 +27,60 @@ module ooo {  module vba {  module word {
 interface XFormField
 {
 interface ooo::vba::XHelperInterface;
+interface com::sun::star::script::XDefaultProperty;
 
+/// Default member: returns the field type from WdFieldType
+[attribute, readonly] long Type;
+
+/**
+ * Returns or sets true if references to the specified form field
+ * are automatically updated whenever the field is exited.
+ */
+[attribute] boolean CalculateOnExit;
+/// Returns or sets a string that represents the result of the specified 
form field
 [attribute] string Result;
+/// Returns or sets true if a form field is enabled
 [attribute] boolean Enabled;
+/// Returns or sets the macro name that runs on keyboard (tab) navigation 
into the field
+[attribute] string EntryMacro;
+/// Returns or sets an exit macro name that runs on keyboard (tab) 
navigation out of the field
+[attribute] string ExitMacro;
+/**
+ * Returns or sets the text that's displayed in a message box
+ * when the form field has the focus and the user presses F1.
+ *
+ * When OwnHelp is False, HelpText specifies the name of an AutoText entry
+ * that contains help text for the form field
+ */
+[attribute] string HelpText;
+/**
+ * Returns or sets the specifies the source of the F1 text that's 
displayed in a message box
+ * If True, the text

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

2022-11-21 Thread Caolán McNamara (via logerrit)
 include/vcl/fontcharmap.hxx |6 +++---
 vcl/inc/impfontcharmap.hxx  |   10 +-
 vcl/inc/sft.hxx |6 +++---
 vcl/source/font/PhysicalFontFace.cxx|2 +-
 vcl/source/font/fontcharmap.cxx |   22 +++---
 vcl/source/fontsubset/sft.cxx   |8 
 vcl/unx/generic/fontmanager/fontmanager.cxx |2 +-
 7 files changed, 28 insertions(+), 28 deletions(-)

New commits:
commit 2adaac8bf01a6caffd0eedb9f456eeadc43f1759
Author: Caolán McNamara 
AuthorDate: Sun Nov 20 20:49:26 2022 +
Commit: Caolán McNamara 
CommitDate: Mon Nov 21 11:36:53 2022 +0100

be more specific on what "Symbol" is

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

diff --git a/include/vcl/fontcharmap.hxx b/include/vcl/fontcharmap.hxx
index fc9acd061078..7bfd074f3c8b 100644
--- a/include/vcl/fontcharmap.hxx
+++ b/include/vcl/fontcharmap.hxx
@@ -42,7 +42,7 @@ public:
 
 /** A new FontCharMap is created based on passed arguments.
  */
-FontCharMap(bool bSymbolic, std::vector aRangeCodes);
+FontCharMap(bool bMicrosoftSymbolMap, std::vector aRangeCodes);
 
 virtual ~FontCharMap() override;
 
@@ -50,7 +50,7 @@ public:
 
 @returns the default font character map.
  */
-static FontCharMapRef GetDefaultMap( bool bSymbols );
+static FontCharMapRef GetDefaultMap(bool bMicrosoftSymbolMap);
 
 /** Determines if the font character map is the "default". The default map
 includes all codepoints in the Unicode BMP range, including surrogates.
@@ -136,7 +136,7 @@ public:
  */
 sal_UCS4GetCharFromIndex( int nCharIndex ) const;
 
-bool isSymbolic() const;
+bool isMicrosoftSymbolMap() const;
 
 private:
 ImplFontCharMapRef mpImplFontCharMap;
diff --git a/vcl/inc/impfontcharmap.hxx b/vcl/inc/impfontcharmap.hxx
index 552cb736020f..59f9f3baa001 100644
--- a/vcl/inc/impfontcharmap.hxx
+++ b/vcl/inc/impfontcharmap.hxx
@@ -30,8 +30,8 @@ typedef tools::SvRef ImplFontCharMapRef;
 class ImplFontCharMap final : public SvRefBase
 {
 public:
-explicitImplFontCharMap( bool bSymbolic,
- std::vector aRangeCodes);
+explicitImplFontCharMap(bool bMicrosoftSymbolMap,
+std::vector aRangeCodes);
 virtual ~ImplFontCharMap() override;
 
 private:
@@ -40,16 +40,16 @@ private:
 ImplFontCharMap( const ImplFontCharMap& ) = delete;
 voidoperator=( const ImplFontCharMap& ) = delete;
 
-static ImplFontCharMapRef const & getDefaultMap( bool bSymbols=false);
+static ImplFontCharMapRef const & getDefaultMap(bool bMicrosoftSymbolMap = 
false);
 boolisDefaultMap() const;
 
 private:
 std::vector maRangeCodes; // pairs of StartCode/(EndCode+1)
 int mnCharCount;  // covered codepoints
-const bool m_bSymbolic;
+const bool m_bMicrosoftSymbolMap;
 };
 
-bool VCL_DLLPUBLIC HasSymbolCmap(const unsigned char* pRawData, int 
nRawLength);
+bool VCL_DLLPUBLIC HasMicrosoftSymbolCmap(const unsigned char* pRawData, int 
nRawLength);
 
 #endif // INCLUDED_VCL_INC_IMPFONTCHARMAP_HXX
 
diff --git a/vcl/inc/sft.hxx b/vcl/inc/sft.hxx
index 4814c0e87245..29f282a04ec4 100644
--- a/vcl/inc/sft.hxx
+++ b/vcl/inc/sft.hxx
@@ -171,7 +171,7 @@ namespace vcl
 int   typoLineGap = 0;/**< OS/2 portable typographic line gap  
 */
 int   winAscent = 0;  /**< ascender metric for Windows 
*/
 int   winDescent = 0; /**< descender metric for Windows
*/
-bool  symbolEncoded = false;  /**< true: MS symbol encoded */
+bool  microsoftSymbolEncoded = false;  /**< true: MS symbol encoded */
 sal_uInt8  panose[10] = {};   /**< PANOSE classification number
*/
 sal_uInt32 typeFlags = 0; /**< type flags (copyright bits) 
*/
 sal_uInt16 fsSelection = 0;   /**< OS/2 fsSelection */
@@ -707,7 +707,7 @@ class VCL_DLLPUBLIC AbstractTrueTypeFont
 sal_uInt32 m_nUnitsPerEm;
 std::vector m_aGlyphOffsets;
 FontCharMapRef m_xCharMap;
-bool m_bIsSymbolFont;
+bool m_bMicrosoftSymbolEncoded;
 
 protected:
 SFErrCodes indexGlyphData();
@@ -724,7 +724,7 @@ public:
 sal_uInt32 horzMetricCount() const { return m_nHorzMetrics; }
 sal_uInt32 vertMetricCount() const { return m_nVertMetrics; }
 sal_uInt32 unitsPerEm() const { return m_nUnitsPerEm; }
-bool IsSymbolFont() const { return m_bIsSymbolFont; }
+bool IsMicrosoftSymbolEncoded() const { return m_bMicrosoftSymbolEncoded; }
 
 virtual bool hasTable(sal_uInt3

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

2022-11-21 Thread Mert Tumer (via logerrit)
 cui/source/dialogs/passwdomdlg.cxx   |   47 +
 cui/source/factory/dlgfact.cxx   |7 +
 cui/source/factory/dlgfact.hxx   |3 
 cui/source/inc/passwdomdlg.hxx   |2 
 include/sfx2/dinfdlg.hxx |2 
 include/sfx2/filedlghelper.hxx   |4 
 include/vcl/abstdlg.hxx  |1 
 sfx2/source/dialog/dinfdlg.cxx   |   31 +
 sfx2/source/dialog/filedlghelper.cxx |  182 +++
 vcl/jsdialog/enabled.cxx |2 
 10 files changed, 173 insertions(+), 108 deletions(-)

New commits:
commit 67eb60672936a10fba840078e6aca918c3331f52
Author: Mert Tumer 
AuthorDate: Mon Sep 12 12:58:20 2022 +0300
Commit: Szymon Kłos 
CommitDate: Mon Nov 21 11:45:10 2022 +0100

lok: make properties>change password dialog async

* We now can set a password through properties->change password
  without having to have a password initially only for online
  because it needs a created file already, online works with files
  that are created before loading but the desktop does not need this.
* The same dialog is still used as non-async for desktop version
  because it goes through an InteractionHandler and the result is
  expected not from the dialog but from the interaction handler.
  Therefore, making it async there did not make sense.

Signed-off-by: Mert Tumer 
Change-Id: I3d02822be0b71836b1592abca191b3b1c5f6374e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139884
Reviewed-by: Szymon Kłos 
Tested-by: Jenkins CollaboraOffice 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142991
Tested-by: Jenkins

diff --git a/cui/source/dialogs/passwdomdlg.cxx 
b/cui/source/dialogs/passwdomdlg.cxx
index 8a8fcb35842f..163f3961f22e 100644
--- a/cui/source/dialogs/passwdomdlg.cxx
+++ b/cui/source/dialogs/passwdomdlg.cxx
@@ -29,10 +29,10 @@ IMPL_LINK_NOARG(PasswordToOpenModifyDialog, OkBtnClickHdl, 
weld::Button&, void)
 m_xPasswdToModifyED->get_text().isEmpty();
 if (bInvalidState)
 {
-std::unique_ptr 
xErrorBox(Application::CreateMessageDialog(m_xDialog.get(),
+m_xErrorBox.reset(Application::CreateMessageDialog(m_xDialog.get(),

VclMessageType::Warning, VclButtonsType::Ok,
m_bIsPasswordToModify? 
m_aInvalidStateForOkButton : m_aInvalidStateForOkButton_v2));
-xErrorBox->run();
+m_xErrorBox->runAsync(m_xErrorBox, [](sal_Int32 /*nResult*/) {});
 }
 else // check for mismatched passwords...
 {
@@ -41,26 +41,27 @@ IMPL_LINK_NOARG(PasswordToOpenModifyDialog, OkBtnClickHdl, 
weld::Button&, void)
 const int nMismatch = (bToOpenMatch? 0 : 1) + (bToModifyMatch? 0 : 1);
 if (nMismatch > 0)
 {
-std::unique_ptr 
xErrorBox(Application::CreateMessageDialog(m_xDialog.get(),
+m_xErrorBox.reset(Application::CreateMessageDialog(m_xDialog.get(),

VclMessageType::Warning, VclButtonsType::Ok,
nMismatch == 1 ? 
m_aOneMismatch : m_aTwoMismatch));
-xErrorBox->run();
-
-weld::Entry* pEdit = !bToOpenMatch ? m_xPasswdToOpenED.get() : 
m_xPasswdToModifyED.get();
-weld::Entry* pRepeatEdit = !bToOpenMatch? 
m_xReenterPasswdToOpenED.get() : m_xReenterPasswdToModifyED.get();
-if (nMismatch == 1)
-{
-pEdit->set_text( "" );
-pRepeatEdit->set_text( "" );
-}
-else if (nMismatch == 2)
+m_xErrorBox->runAsync(m_xErrorBox, [this, bToOpenMatch, 
nMismatch](sal_Int32 /*nResult*/)
 {
-m_xPasswdToOpenED->set_text( "" );
-m_xReenterPasswdToOpenED->set_text( "" );
-m_xPasswdToModifyED->set_text( "" );
-m_xReenterPasswdToModifyED->set_text( "" );
-}
-pEdit->grab_focus();
+weld::Entry* pEdit = !bToOpenMatch ? m_xPasswdToOpenED.get() : 
m_xPasswdToModifyED.get();
+weld::Entry* pRepeatEdit = !bToOpenMatch? 
m_xReenterPasswdToOpenED.get() : m_xReenterPasswdToModifyED.get();
+if (nMismatch == 1)
+{
+pEdit->set_text( "" );
+pRepeatEdit->set_text( "" );
+}
+else if (nMismatch == 2)
+{
+m_xPasswdToOpenED->set_text( "" );
+m_xReenterPasswdToOpenED->set_text( "" );
+m_xPasswdToModifyED->set_text( "" );
+m_xReenterPasswdToModifyED->set_text( "" );
+}
+pEdit->grab_focus();
+});
 }
 else
 {
@@ -136,6 +137,14 @@ 
PasswordToOpenModifyDialog::PasswordToOpenModifyDialog(weld:

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

2022-11-21 Thread Andrea Gelmini (via logerrit)
 sd/source/ui/dlg/sdtreelb.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit be12f60b1055292ac655e53f4fb56567b5c15970
Author: Andrea Gelmini 
AuthorDate: Mon Nov 21 11:14:44 2022 +0100
Commit: Julien Nabet 
CommitDate: Mon Nov 21 12:01:54 2022 +0100

Fix typo

Change-Id: Ie1ed42bed5ff91dd39136be11bf365e737853c6c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143021
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index a90a76adbee2..da6a7182ef2a 100644
--- a/sd/source/ui/dlg/sdtreelb.cxx
+++ b/sd/source/ui/dlg/sdtreelb.cxx
@@ -508,7 +508,7 @@ sal_Int8 SdPageObjsTLVDropTarget::AcceptDrop(const 
AcceptDropEvent& rEvt)
 if (m_rTreeView.get_iter_depth(*xSource) == 0)
 return DND_ACTION_NONE;
 
-// disallow when the source is the parent or ancestoral parent of the 
target
+// disallow when the source is the parent or ancestral parent of the target
 std::unique_ptr 
xTargetParent(m_rTreeView.make_iterator(xTarget.get()));
 while (m_rTreeView.get_iter_depth(*xTargetParent) > 1)
 {
@@ -581,7 +581,7 @@ sal_Int8 SdPageObjsTLVDropTarget::ExecuteDrop( const 
ExecuteDropEvent& rEvt )
 if (m_rTreeView.iter_compare(*xSourceParent, *xTargetParent) == 0 && 
nIterCompare < 0)
 nTargetPos = m_rTreeView.get_iter_index_in_parent(*xTarget);
 
-// Remove the source object from soure parent list and insert it in 
the target parent list.
+// Remove the source object from source parent list and insert it in 
the target parent list.
 SdrObject* pSourceParentObject = 
weld::fromId(m_rTreeView.get_id(*xSourceParent));
 SdrObject* pTargetParentObject = 
weld::fromId(m_rTreeView.get_id(*xTargetParent));
 


[Libreoffice-commits] core.git: 2 commits - cui/source include/sfx2 include/vcl sc/source sfx2/source vcl/jsdialog

2022-11-21 Thread Szymon Kłos (via logerrit)
 cui/source/dialogs/passwdomdlg.cxx   |8 +++-
 cui/source/factory/dlgfact.cxx   |5 +
 cui/source/factory/dlgfact.hxx   |1 +
 cui/source/inc/passwdomdlg.hxx   |2 ++
 include/sfx2/filedlghelper.hxx   |5 +++--
 include/vcl/abstdlg.hxx  |1 +
 sc/source/ui/inc/delcodlg.hxx|1 -
 sc/source/ui/miscdlgs/delcodlg.cxx   |1 -
 sfx2/source/dialog/dinfdlg.cxx   |4 +++-
 sfx2/source/dialog/filedlghelper.cxx |   15 ++-
 vcl/jsdialog/enabled.cxx |3 ++-
 11 files changed, 38 insertions(+), 8 deletions(-)

New commits:
commit 5762aa5c0efb75e8b7713b4c2ee8bd9300fc06cf
Author: Szymon Kłos 
AuthorDate: Thu Nov 17 21:40:54 2022 +0100
Commit: Szymon Kłos 
CommitDate: Mon Nov 21 12:36:50 2022 +0100

jsdialog: enable Delete content dialog

Dialog had unused m_xBtnOk which has defined standard
response in .ui file - no need to bind anything in the code.

Change-Id: Ie743485bb30a03b82a87dc69015a704e14c39384
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142903
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Michael Meeks 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142993
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 

diff --git a/sc/source/ui/inc/delcodlg.hxx b/sc/source/ui/inc/delcodlg.hxx
index c23deed4fcc6..7c49a79f9d33 100644
--- a/sc/source/ui/inc/delcodlg.hxx
+++ b/sc/source/ui/inc/delcodlg.hxx
@@ -35,7 +35,6 @@ private:
 std::unique_ptr m_xBtnDelNotes;
 std::unique_ptr m_xBtnDelAttrs;
 std::unique_ptr m_xBtnDelObjects;
-std::unique_ptr m_xBtnOk;
 
 static bool bPreviousAllCheck;
 static InsertDeleteFlags nPreviousChecks;
diff --git a/sc/source/ui/miscdlgs/delcodlg.cxx 
b/sc/source/ui/miscdlgs/delcodlg.cxx
index 9d804c252419..56334ba9ca9c 100644
--- a/sc/source/ui/miscdlgs/delcodlg.cxx
+++ b/sc/source/ui/miscdlgs/delcodlg.cxx
@@ -37,7 +37,6 @@ ScDeleteContentsDlg::ScDeleteContentsDlg(weld::Window* 
pParent)
 , m_xBtnDelNotes(m_xBuilder->weld_check_button("comments"))
 , m_xBtnDelAttrs(m_xBuilder->weld_check_button("formats"))
 , m_xBtnDelObjects(m_xBuilder->weld_check_button("objects"))
-, m_xBtnOk(m_xBuilder->weld_button("ok"))
 {
 m_xBtnDelAll->set_active( ScDeleteContentsDlg::bPreviousAllCheck );
 m_xBtnDelStrings->set_active( bool(InsertDeleteFlags::STRING & 
ScDeleteContentsDlg::nPreviousChecks) );
diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index 375023636916..47d8e0e08df5 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -73,7 +73,8 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool 
bMobile)
 || rUIFile == u"modules/swriter/ui/insertcaption.ui"
 || rUIFile == u"modules/swriter/ui/captionoptions.ui"
 || rUIFile == u"cui/ui/formatnumberdialog.ui" || rUIFile == 
u"cui/ui/password.ui"
-|| rUIFile == u"cui/ui/numberingformatpage.ui")
+|| rUIFile == u"cui/ui/numberingformatpage.ui"
+|| rUIFile == u"modules/scalc/ui/deletecontents.ui")
 {
 return true;
 }
commit 58ae6705deccb614f33d20bfa4b2ab0923d426e1
Author: Szymon Kłos 
AuthorDate: Fri Oct 14 14:54:15 2022 +0200
Commit: Szymon Kłos 
CommitDate: Mon Nov 21 12:36:35 2022 +0100

lok: allow password reset in properties>change password

Change-Id: I92a3c658e96f602549ff5282b6ed5bc9ee780bbd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141372
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142992
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 

diff --git a/cui/source/dialogs/passwdomdlg.cxx 
b/cui/source/dialogs/passwdomdlg.cxx
index 163f3961f22e..579af0edc9aa 100644
--- a/cui/source/dialogs/passwdomdlg.cxx
+++ b/cui/source/dialogs/passwdomdlg.cxx
@@ -24,7 +24,7 @@
 
 IMPL_LINK_NOARG(PasswordToOpenModifyDialog, OkBtnClickHdl, weld::Button&, void)
 {
-bool bInvalidState = !m_xOpenReadonlyCB->get_active() &&
+bool bInvalidState = !m_xOpenReadonlyCB->get_active() && !m_bAllowEmpty &&
 m_xPasswdToOpenED->get_text().isEmpty() &&
 m_xPasswdToModifyED->get_text().isEmpty();
 if (bInvalidState)
@@ -107,6 +107,7 @@ 
PasswordToOpenModifyDialog::PasswordToOpenModifyDialog(weld::Window * pParent, s
 , m_aInvalidStateForOkButton_v2( CuiResId( 
RID_CUISTR_INVALID_STATE_FOR_OK_BUTTON_V2 ) )
 , m_nMaxPasswdLen(nMaxPasswdLen)
 , m_bIsPasswordToModify( bIsPasswordToModify )
+, m_bAllowEmpty( false )
 {
 m_xOk->connect_clicked(LINK(this, PasswordToOpenModifyDialog, 
OkBtnClickHdl));
 
@@ -145,6 +146,11 @@ PasswordToOpenModifyDialog::~PasswordToOpenModifyDialog()
 }
 }
 
+void PasswordToOpenModifyDialog::AllowEmpty()
+{
+m_bAllowEmpty = true;
+}
+
 OUString PasswordToOpenModifyDialog::GetPasswordToOpen() const
 {
 const bool bPasswdOk =
diff --git a/cui/source/factory/dlgfact.cxx

[Libreoffice-commits] core.git: 2 commits - include/sfx2 sc/inc sc/qa sc/source sfx2/source

2022-11-21 Thread Szymon Kłos (via logerrit)
 include/sfx2/lokhelper.hxx   |2 +
 sc/inc/table.hxx |9 
 sc/qa/unit/ucalc.cxx |2 +
 sc/source/core/data/document.cxx |9 
 sc/source/core/data/table1.cxx   |   19 --
 sc/source/ui/docshell/docsh.cxx  |2 +
 sc/source/ui/inc/docsh.hxx   |   44 ++-
 sc/source/ui/undo/undoblk3.cxx   |4 +-
 sc/source/ui/undo/undocell.cxx   |   17 ++--
 sc/source/ui/unoobj/docuno.cxx   |   74 ---
 sc/source/ui/view/viewfun2.cxx   |   10 +++--
 sc/source/ui/view/viewfun3.cxx   |   10 +++--
 sc/source/ui/view/viewfunc.cxx   |   46 
 sfx2/source/view/lokhelper.cxx   |   14 +++
 14 files changed, 216 insertions(+), 46 deletions(-)

New commits:
commit 0a55aa8ba38aea56a2bce1504fd687e510f66b9d
Author: Szymon Kłos 
AuthorDate: Fri Nov 4 15:19:13 2022 +0100
Commit: Szymon Kłos 
CommitDate: Mon Nov 21 12:37:18 2022 +0100

calc: cache GetCellArea results

This will avoid repeated lookup in the ScTable::GetCellArea.
Which is used for vcl::ITiledRenderable::getDataArea().

Tested in CppunitTest_sc_ucalc

Change-Id: Ied58cfe447e1b924af9b401e95e127c784b80355
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142279
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Dennis Francis 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142995
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 

diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index a9d2ad71bd39..f81e3925964e 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -178,6 +178,12 @@ private:
 SCROW   nRepeatStartY;
 SCROW   nRepeatEndY;
 
+// last used col and row
+boolmbCellAreaDirty;
+boolmbCellAreaEmpty;
+SCCOL   mnEndCol;
+SCROW   mnEndRow;
+
 std::unique_ptr pTabProtection;
 
 std::unique_ptr> mpColWidth;
@@ -604,7 +610,8 @@ public:
 voidInvalidateTableArea();
 voidInvalidatePageBreaks();
 
-boolGetCellArea( SCCOL& rEndCol, SCROW& rEndRow ) const;   
 // FALSE = empty
+voidInvalidateCellArea() { mbCellAreaDirty = true; }
+boolGetCellArea( SCCOL& rEndCol, SCROW& rEndRow );// 
FALSE = empty
 boolGetTableArea( SCCOL& rEndCol, SCROW& rEndRow, bool 
bCalcHiddens = false) const;
 boolGetPrintArea( SCCOL& rEndCol, SCROW& rEndRow, bool bNotes, 
bool bCalcHiddens = false) const;
 boolGetPrintAreaHor( SCROW nStartRow, SCROW nEndRow,
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 321977460cb7..257a80bd4b50 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -41,6 +41,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 
@@ -5387,6 +5388,7 @@ void Test::testAreasWithNotes()
 
 m_pDoc->SetString(0, 3, 0, "Some Text");
 m_pDoc->SetString(3, 3, 0, "Some Text");
+m_pDoc->FetchTable(0)->InvalidateCellArea();
 
 dataFound = m_pDoc->GetDataStart(0,col,row);
 
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 19e01a6d06c0..a907c9184754 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -41,6 +41,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -6748,7 +6749,15 @@ void ScDocument::SetNote(const ScAddress& rPos, 
std::unique_ptr pNote)
 void ScDocument::SetNote(SCCOL nCol, SCROW nRow, SCTAB nTab, 
std::unique_ptr pNote)
 {
 if (ValidTab(nTab) && nTab < static_cast(maTabs.size()))
+{
 maTabs[nTab]->SetNote(nCol, nRow, std::move(pNote));
+
+if (ScDocShell* pDocSh = dynamic_cast(GetDocumentShell()))
+{
+HelperNotifyChanges::NotifyIfChangesListeners(
+*pDocSh, ScRange(nCol, nRow, nTab), "note");
+}
+}
 }
 
 bool ScDocument::HasNote(const ScAddress& rPos) const
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index d0828d04b5d4..78c49912bcc9 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -244,6 +244,10 @@ ScTable::ScTable( ScDocument& rDoc, SCTAB nNewTab, const 
OUString& rNewName,
 nRepeatEndX( SCCOL_REPEAT_NONE ),
 nRepeatStartY( SCROW_REPEAT_NONE ),
 nRepeatEndY( SCROW_REPEAT_NONE ),
+mbCellAreaDirty( true ),
+mbCellAreaEmpty( true ),
+mnEndCol( -1 ),
+mnEndRow( -1 ),
 mpRowHeights( static_cast(nullptr) ),
 mpHiddenCols(new ScFlatBoolColSegments(rDoc.MaxCol())),
 mpHiddenRows(new ScFlatBoolRowSegments(rDoc.MaxRow())),
@@ -510,8 +514,15 @@ void ScTable::SetOptimalHeightOnly(
 delete pProgress;
 }
 
-bool ScTable::GetCellArea( SCCOL& rEndCol, SCROW& rEndRow ) const
+bool ScTable::GetCellArea( SCCOL& rEndCol, SCROW& rEndRow )
 {
+if (!mbCellAreaDirty)
+{
+rEndCol = mnEndCol;
+rEndRow = mnEndRow;
+return !mbCellAreaEm

Questions about signature and notarization for LibreOffice on macOS

2022-11-21 Thread Pierre-Antoine Foulquier
Hello,

We need to distribute a stand alone version from LibreOffice Draw for macOS

For that, we have to sign and notarize the compiled .app.

How to proceed ?

have found on this article
https://wiki.documentfoundation.org/LibreOffice_Vanilla for Mac, that there's 
some parameter in the file autogen.input that can help to accomplish the 
signature from the app.

—enable-macOS-package-signing=xxx
—enable-macOS-sandbox
—enable mpl-subset
—enable-release build

What we need to fill in the parameter --enable-macOS-package-signing=xxx

What ist the xxx value ?

Thanks for your help.

Best regards.

Pierre-Antoine Foulquier 


[Libreoffice-commits] core.git: Branch 'feature/wasm' - static/README.wasm.md

2022-11-21 Thread Tor Lillqvist (via logerrit)
 static/README.wasm.md |   28 
 1 file changed, 28 insertions(+)

New commits:
commit 3f84244f5e13367442d0f42508c403b8b674cf84
Author: Tor Lillqvist 
AuthorDate: Mon Nov 21 14:20:28 2022 +0200
Commit: Tor Lillqvist 
CommitDate: Mon Nov 21 14:20:28 2022 +0200

Document how tml managed to run the qt_soffice.html thing without emrun

diff --git a/static/README.wasm.md b/static/README.wasm.md
index 7bca790acf7a..f84512d77ac9 100644
--- a/static/README.wasm.md
+++ b/static/README.wasm.md
@@ -10,6 +10,34 @@ The build generates a Writer-only LO build. You should be 
able to run either
 $ emrun --serve_after_close workdir/LinkTarget/Executable/qt_vcldemo.html
 $ emrun --serve_after_close 
workdir/LinkTarget/Executable/qt_wasm-qt5-mandelbrot.html
 
+To run the WASM Qt-LibreOffice, it also works to just use the Chromium
+browser on Linux against a local web server as long as the following
+files (that have ended up after the build in instdir/program) are
+available in a folder through the web server:
+
+  qtloader.js
+  qtlogo.svg
+  qt_soffice.html
+  soffice.data
+  soffice.data.js.metadata
+  soffice.html
+  soffice.html.linkdeps
+  soffice.js
+  soffice.wasm
+  soffice.worker.js
+
+Either the instdir/program folder itself can be available in the web
+server, or you copy those files to some place that is. No emrun or
+container (as perhaps used to build the thing) necessary.
+
+Like this:
+
+  chromium-browser --enable-features=SharedArrayBuffer 
http://localhost/tml/wasm/
+
+Where the above mentioned files have been copied to a folder that
+shows up as tml/wasm on localhost, and qt_soffice.html has been
+renamed to index.html.
+
 REMINDER: Always start new tabs in the browser, reload might fail / cache!
 INFO: latest browser won't work anymore with 0.0.0.0 and need 127.0.0.1.
 


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - oovbaapi/ooo sw/Library_vbaswobj.mk sw/qa sw/source

2022-11-21 Thread Justin Luth (via logerrit)
 oovbaapi/ooo/vba/word/XCheckBox.idl   |   14 +++
 sw/Library_vbaswobj.mk|1 
 sw/qa/core/data/docm/testVBA.docm |binary
 sw/source/core/crsr/bookmark.cxx  |   11 ++
 sw/source/core/inc/bookmark.hxx   |2 
 sw/source/ui/vba/vbaformfield.cxx |6 -
 sw/source/ui/vba/vbaformfieldcheckbox.cxx |  120 ++
 sw/source/ui/vba/vbaformfieldcheckbox.hxx |   56 ++
 8 files changed, 207 insertions(+), 3 deletions(-)

New commits:
commit 3841eb4efa8f4795a0e8ca09b80b0bc700d2785c
Author: Justin Luth 
AuthorDate: Thu Nov 3 10:05:24 2022 -0400
Commit: Miklos Vajna 
CommitDate: Mon Nov 21 13:28:45 2022 +0100

tdf#151548 vba FormFields: Add basic word::XCheckBox support

make CppunitTest_sw_macros_test CPPUNIT_TEST_NAME=testVba

This now allows MS Word Basic legacy checkbox form fields
to be controlled by VBA basic.
-allows getting and setting the checkbox value

TODO:
-wire up entry and exit macros
-wire up StarBASIC support (hmm, how would that be different?)
   -probably completely ignore this. formfields hidden from
normal writer - only activeX and content controls shown.
-setup tri-state for checkboxes: with a separate default value

Change-Id: Ied47a507dd9acc2c8dfd1472e6704e9dd571b480
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142253
Reviewed-by: Justin Luth 
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142645
Tested-by: Jenkins CollaboraOffice 

diff --git a/oovbaapi/ooo/vba/word/XCheckBox.idl 
b/oovbaapi/ooo/vba/word/XCheckBox.idl
index 6cd82ada0e37..6481af013892 100644
--- a/oovbaapi/ooo/vba/word/XCheckBox.idl
+++ b/oovbaapi/ooo/vba/word/XCheckBox.idl
@@ -27,7 +27,21 @@ module ooo {  module vba {  module word {
 interface XCheckBox
 {
 interface ooo::vba::XHelperInterface;
+interface com::sun::star::script::XDefaultProperty;
 
+/// Default member: True if the specified form field object is a valid 
check box form field.
+[attribute, readonly] boolean Valid;
+
+/** AutoSize:
+ * True sizes the check box or text frame according to the font size of 
the surrounding text.
+ * False sizes the check box or text frame according to the Size property.
+ */
+[attribute] boolean AutoSize;
+/// Returns or sets the default check box value. True if the default value 
is checked.
+[attribute] boolean Default;
+/// Returns or sets the size of a check box, in points.
+[attribute] long Size;
+/// Returns or sets true if the check box is ticked.
 [attribute] boolean Value;
 };
 
diff --git a/sw/Library_vbaswobj.mk b/sw/Library_vbaswobj.mk
index a2405f755ccb..f4264d365b89 100644
--- a/sw/Library_vbaswobj.mk
+++ b/sw/Library_vbaswobj.mk
@@ -74,6 +74,7 @@ $(eval $(call gb_Library_add_exception_objects,vbaswobj,\
 sw/source/ui/vba/vbacolumns \
 sw/source/ui/vba/vbaformfield \
 sw/source/ui/vba/vbaformfields \
+sw/source/ui/vba/vbaformfieldcheckbox \
 sw/source/ui/vba/vbaframe \
 sw/source/ui/vba/vbaframes \
 sw/source/ui/vba/vbalistformat \
diff --git a/sw/qa/core/data/docm/testVBA.docm 
b/sw/qa/core/data/docm/testVBA.docm
index a2609feb6cd0..58ac4e8bd3ae 100644
Binary files a/sw/qa/core/data/docm/testVBA.docm and 
b/sw/qa/core/data/docm/testVBA.docm differ
diff --git a/sw/source/core/crsr/bookmark.cxx b/sw/source/core/crsr/bookmark.cxx
index ecbd5dab2d56..65e1bb76b08b 100644
--- a/sw/source/core/crsr/bookmark.cxx
+++ b/sw/source/core/crsr/bookmark.cxx
@@ -648,6 +648,17 @@ namespace sw::mark
 return bResult;
 }
 
+OUString CheckboxFieldmark::GetContent() const
+{
+return IsChecked() ? "1" : "0";
+}
+
+void CheckboxFieldmark::ReplaceContent(const OUString& sNewContent)
+{
+SetChecked(sNewContent.toBoolean());
+Invalidate();
+}
+
 FieldmarkWithDropDownButton::FieldmarkWithDropDownButton(const SwPaM& rPaM)
 : NonTextFieldmark(rPaM)
 , m_pButton(nullptr)
diff --git a/sw/source/core/inc/bookmark.hxx b/sw/source/core/inc/bookmark.hxx
index 7399ea28cd0e..a3ce8f28466b 100644
--- a/sw/source/core/inc/bookmark.hxx
+++ b/sw/source/core/inc/bookmark.hxx
@@ -262,6 +262,8 @@ namespace sw::mark {
 CheckboxFieldmark(const SwPaM& rPaM, const OUString& rName);
 bool IsChecked() const override;
 void SetChecked(bool checked) override;
+virtual OUString GetContent() const override;
+virtual void ReplaceContent(const OUString& sNewContent) override;
 };
 
 /// Fieldmark with a drop down button (e.g. this button opens the date 
picker for a date field)
diff --git a/sw/source/ui/vba/vbaformfield.cxx 
b/sw/source/ui/vba/vbaformfield.cxx
index b873002a6f11..35e8927fe02e 100644
--- a/sw/source/ui/vba/vbaformfield.cxx
+++ b/sw/source/ui/vba/vbaformfield.cxx
@@ -25,

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

2022-11-21 Thread Xisco Fauli (via logerrit)
 sc/qa/unit/data/csv/tdf152053.csv   |3 +++
 sc/qa/unit/subsequent_filters_test2.cxx |   15 +++
 2 files changed, 18 insertions(+)

New commits:
commit 9e4b47190eb762f3aea80920846fe5135b7d76fc
Author: Xisco Fauli 
AuthorDate: Mon Nov 21 12:31:44 2022 +0100
Commit: Xisco Fauli 
CommitDate: Mon Nov 21 14:08:11 2022 +0100

tdf#152053: sc_subsequent_filters_test2: Add unittest

Change-Id: If0de645a0ca0901862ef4e084e14ff60cbc3800b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143028
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/sc/qa/unit/data/csv/tdf152053.csv 
b/sc/qa/unit/data/csv/tdf152053.csv
new file mode 100644
index ..3872dc60560d
--- /dev/null
+++ b/sc/qa/unit/data/csv/tdf152053.csv
@@ -0,0 +1,3 @@
+Date
+2020-12-29
+2020-12-29
diff --git a/sc/qa/unit/subsequent_filters_test2.cxx 
b/sc/qa/unit/subsequent_filters_test2.cxx
index 0118b5b627cc..9cd12d5a72d6 100644
--- a/sc/qa/unit/subsequent_filters_test2.cxx
+++ b/sc/qa/unit/subsequent_filters_test2.cxx
@@ -168,6 +168,7 @@ public:
 void testAutoheight2Rows();
 void testXLSDefColWidth();
 void testTdf148423();
+void testTdf152053();
 void testPreviewMissingObjLink();
 void testShapeRotationImport();
 void testShapeDisplacementOnRotationImport();
@@ -286,6 +287,7 @@ public:
 CPPUNIT_TEST(testAutoheight2Rows);
 CPPUNIT_TEST(testXLSDefColWidth);
 CPPUNIT_TEST(testTdf148423);
+CPPUNIT_TEST(testTdf152053);
 CPPUNIT_TEST(testPreviewMissingObjLink);
 CPPUNIT_TEST(testShapeRotationImport);
 CPPUNIT_TEST(testShapeDisplacementOnRotationImport);
@@ -2331,6 +2333,19 @@ void ScFiltersTest2::testTdf148423()
 CPPUNIT_ASSERT_EQUAL(32880, nWidth);
 }
 
+void ScFiltersTest2::testTdf152053()
+{
+createScDoc("csv/tdf152053.csv");
+ScDocument* pDoc = getScDoc();
+
+int nWidth = pDoc->GetColWidth(0, 0, false);
+
+// Without the fix in place, this test would have failed with
+// - Expected: 1162
+// - Actual  : 715
+CPPUNIT_ASSERT_EQUAL(1162, nWidth);
+}
+
 void ScFiltersTest2::testPreviewMissingObjLink()
 {
 createScDoc("ods/keep-preview-missing-obj-link.ods");


[Libreoffice-commits] core.git: Branch 'feature/cib_contract891c' - sw/qa sw/source

2022-11-21 Thread Samuel Mehrbrodt (via logerrit)
 sw/qa/extras/uiwriter/uiwriter.cxx   |   21 -
 sw/source/core/unocore/unocrsrhelper.cxx |   10 --
 2 files changed, 31 deletions(-)

New commits:
commit 6ff386fb693f2cb0e41ba716ac3e8ef38a6693f5
Author: Samuel Mehrbrodt 
AuthorDate: Mon Nov 21 14:27:08 2022 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Mon Nov 21 14:27:08 2022 +0100

Revert "sw: check if cursor position is valid before inserting file"

This reverts commit 376f0143d875ef39550f916f209a3a923342c269.

diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx 
b/sw/qa/extras/uiwriter/uiwriter.cxx
index 7f81222766bf..d11cf4e2d3f8 100755
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -47,7 +47,6 @@
 #include 
 #include "com/sun/star/text/XDefaultNumberingProvider.hpp"
 #include "com/sun/star/awt/FontUnderline.hpp"
-#include 
 
 #include 
 #include 
@@ -130,7 +129,6 @@ public:
 void testDOCXAutoTextGallery();
 void testWatermarkDOCX();
 void testTdf67238();
-void testInsertFileInInputFieldException();
 void testFdo75110();
 void testFdo75898();
 void testFdo74981();
@@ -280,7 +278,6 @@ public:
 CPPUNIT_TEST(testDOCXAutoTextGallery);
 CPPUNIT_TEST(testWatermarkDOCX);
 CPPUNIT_TEST(testTdf67238);
-CPPUNIT_TEST(testInsertFileInInputFieldException);
 CPPUNIT_TEST(testFdo75110);
 CPPUNIT_TEST(testFdo75898);
 CPPUNIT_TEST(testFdo74981);
@@ -562,24 +559,6 @@ void SwUiWriterTest::testBookmarkCopy()
 }
 }
 
-void SwUiWriterTest::testInsertFileInInputFieldException()
-{
-createDoc();
-uno::Reference const xTextDoc(mxComponent, 
uno::UNO_QUERY);
-uno::Reference const xBody(xTextDoc->getText());
-uno::Reference const xFactory(mxComponent, 
uno::UNO_QUERY);
-uno::Reference const xCursor(xBody->createTextCursor());
-uno::Reference const xInsertable(xCursor, 
uno::UNO_QUERY);
-uno::Reference const xContent(
-xFactory->createInstance("com.sun.star.text.textfield.Input"), 
uno::UNO_QUERY);
-xBody->insertTextContent(xCursor, xContent, false);
-xCursor->goLeft(1, false);
-// try to insert some random file
-OUString const url(m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"fdo75110.odt");
-// inserting even asserts in debug builds - document model goes invalid 
with input field split across 2 nodes
-CPPUNIT_ASSERT_THROW(xInsertable->insertDocumentFromURL(url, {}), 
uno::RuntimeException);
-}
-
 void SwUiWriterTest::testTdf67238()
 {
 //create a new writer document
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx 
b/sw/source/core/unocore/unocrsrhelper.cxx
index 4dc38b347e8f..547598423ab7 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -955,16 +955,6 @@ void resetCursorPropertyValue(const 
SfxItemPropertySimpleEntry& rEntry, SwPaM& r
 void InsertFile(SwUnoCursor* pUnoCursor, const OUString& rURL,
 const uno::Sequence< beans::PropertyValue >& rOptions)
 {
-if (SwTextNode const*const pTextNode = 
pUnoCursor->GetPoint()->nNode.GetNode().GetTextNode())
-{
-// TODO: check meta field here too in case it ever grows a 2nd char
-if 
(pTextNode->GetTextAttrAt(pUnoCursor->GetPoint()->nContent.GetIndex(),
-RES_TXTATR_INPUTFIELD, SwTextNode::PARENT))
-{
-throw uno::RuntimeException("cannot insert file inside input 
field");
-}
-}
-
 std::unique_ptr pMed;
 SwDoc* pDoc = pUnoCursor->GetDoc();
 SwDocShell* pDocSh = pDoc->GetDocShell();


[Libreoffice-commits] core.git: 2 commits - icon-themes/colibre include/svx sd/inc sd/qa sd/source sd/uiconfig svx/source xmloff/source

2022-11-21 Thread Maxim Monastirsky (via logerrit)
 icon-themes/colibre/sd/res/addtablestyle.png |binary
 include/svx/sdr/table/tablecontroller.hxx|3 
 sd/inc/bitmaps.hlst  |1 
 sd/inc/strings.hrc   |2 
 sd/qa/unit/data/odg/tablestyles.fodg |   22 +
 sd/qa/unit/export-tests.cxx  |   35 ++
 sd/source/core/drawdoc4.cxx  |5 
 sd/source/core/stlsheet.cxx  |9 
 sd/source/ui/inc/TableDesignPane.hxx |   16 +
 sd/source/ui/table/TableDesignPane.cxx   |  317 +--
 sd/uiconfig/simpress/ui/tabledesignpanel.ui  |  118 ++
 svx/source/table/tablecontroller.cxx |   56 ++--
 svx/source/table/tabledesign.cxx |  126 ++
 xmloff/source/table/XMLTableExport.cxx   |   14 +
 14 files changed, 674 insertions(+), 50 deletions(-)

New commits:
commit f23d3661ab04601650db95f846081317fc06801d
Author: Maxim Monastirsky 
AuthorDate: Sun Nov 13 14:50:08 2022 +0200
Commit: Maxim Monastirsky 
CommitDate: Mon Nov 21 14:39:14 2022 +0100

sd: table design editing

Change-Id: I75559c80da015a13ee078bdda06f6f4975fe5946
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140943
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky 

diff --git a/icon-themes/colibre/sd/res/addtablestyle.png 
b/icon-themes/colibre/sd/res/addtablestyle.png
new file mode 100644
index ..8e4422cb733f
Binary files /dev/null and b/icon-themes/colibre/sd/res/addtablestyle.png differ
diff --git a/include/svx/sdr/table/tablecontroller.hxx 
b/include/svx/sdr/table/tablecontroller.hxx
index e71eba7cf608..bb02fc271f52 100644
--- a/include/svx/sdr/table/tablecontroller.hxx
+++ b/include/svx/sdr/table/tablecontroller.hxx
@@ -87,6 +87,9 @@ public:
 const SdrTableObj& rObj,
 const rtl::Reference< sdr::SelectionController >& xRefController);
 
+static SvxBoxItem TextDistancesToSvxBoxItem(const SfxItemSet& rAttrSet);
+static void SvxBoxItemToTextDistances(const SvxBoxItem& pOriginalItem, 
SfxItemSet& rAttrSet);
+
 SVX_DLLPRIVATE void MergeAttrFromSelectedCells(SfxItemSet& rAttr, bool 
bOnlyHardAttr) const;
 SVX_DLLPRIVATE void SetAttrToSelectedCells(const SfxItemSet& rAttr, bool 
bReplaceAll);
 void SetAttrToSelectedShape(const SfxItemSet& rAttr);
diff --git a/sd/inc/bitmaps.hlst b/sd/inc/bitmaps.hlst
index e1c798cfae4e..32e81ced59fa 100644
--- a/sd/inc/bitmaps.hlst
+++ b/sd/inc/bitmaps.hlst
@@ -78,6 +78,7 @@ inline constexpr OUStringLiteral BMP_POINTER_ICON = 
u"sd/res/pointericon.png";
 inline constexpr OUStringLiteral BMP_WAIT_ICON = u"sd/res/waiticon.png";
 inline constexpr OUStringLiteral BMP_FADE_EFFECT_INDICATOR = 
u"sd/res/fade_effect_indicator.png";
 inline constexpr OUStringLiteral BMP_CUSTOM_ANIMATION_INDICATOR = 
u"sd/res/click_16.png";
+inline constexpr OUStringLiteral BMP_INSERT_TABLESTYLE = 
u"sd/res/addtablestyle.png";
 // Presenter Screen bitmaps:
 inline constexpr OUStringLiteral BMP_PRESENTERSCREEN_BORDER_LEFT = 
u"sd/res/presenterscreen-BorderLeft.png";
 inline constexpr OUStringLiteral 
BMP_PRESENTERSCREEN_BUTTON_SLIDE_NEXT_DISABLED = 
u"sd/res/presenterscreen-ButtonSlideNextDisabled.png";
diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc
index 05326f9e461a..662acd59db12 100644
--- a/sd/inc/strings.hrc
+++ b/sd/inc/strings.hrc
@@ -484,5 +484,7 @@
 #define RID_SVXSTR_MENU_LAST
NC_("RID_SVXSTR_MENU_LAST", "~Last Slide")
 
 #define STR_CLOSE_PANE  NC_("STR_CLOSE_PANE", 
"Close Pane")
+#define STR_INSERT_TABLESTYLE   
NC_("STR_INSERT_TABLESTYLE", "Add a new design")
+#define STR_REMOVE_TABLESTYLE   
NC_("STR_REMOVE_TABLESTYLE", "The selected style is in use in this 
document.\nIf you will delete this style, tables using it will revert to the 
default style.\nDo you still wish to delete this style?\n")
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/inc/TableDesignPane.hxx 
b/sd/source/ui/inc/TableDesignPane.hxx
index 042eb6137662..a3658bb30bf2 100644
--- a/sd/source/ui/inc/TableDesignPane.hxx
+++ b/sd/source/ui/inc/TableDesignPane.hxx
@@ -25,7 +25,7 @@
 #include 
 
 namespace com::sun::star::beans { class XPropertySet; }
-namespace com::sun::star::container { class XIndexAccess; }
+namespace com::sun::star::container { class XIndexAccess; class 
XNameContainer; }
 namespace com::sun::star::drawing { class XDrawView; }
 
 namespace sd
@@ -52,12 +52,16 @@ class TableValueSet final : public ValueSet
 {
 private:
 bool m_bModal;
+Link maContextMenuHandler;
 public:
 TableValueSet(std::unique_ptr pScrolledWindow);
+virtual bool Command(const CommandEvent& rEvent) override;
 virtual void Resize() override;
 virtual void StyleUpdated() override;
 void updateSettings();
 void setModal(bool bModal) { m_bModal = bModal; }
+void SetContextMenuHandler(const Link& rLink) { 
ma

[Libreoffice-commits] core.git: sc/qa sd/qa svl/qa sw/qa vcl/qa

2022-11-21 Thread Xisco Fauli (via logerrit)
 sc/qa/extras/new_cond_format.cxx   |6 --
 sc/qa/unit/helper/qahelper.cxx |6 --
 sc/qa/unit/helper/qahelper.hxx |2 --
 sd/qa/unit/sdmodeltestbase.hxx |   14 --
 svl/qa/unit/svl.cxx|6 --
 sw/qa/inc/swmodeltestbase.hxx  |9 -
 vcl/qa/cppunit/pdfexport/pdfexport.cxx |9 -
 7 files changed, 52 deletions(-)

New commits:
commit 19b586543b08325897278ef8b4a65ac81615978d
Author: Xisco Fauli 
AuthorDate: Wed Nov 9 20:40:51 2022 +0100
Commit: Xisco Fauli 
CommitDate: Mon Nov 21 15:47:38 2022 +0100

qa: remove duplicated operators

it's already defined in include/tools/color.hxx

Change-Id: I26eaba4a1279fadd8669e9702b695e02871052d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142512
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/sc/qa/extras/new_cond_format.cxx b/sc/qa/extras/new_cond_format.cxx
index dd4d2354f546..9cab2bdd1edc 100644
--- a/sc/qa/extras/new_cond_format.cxx
+++ b/sc/qa/extras/new_cond_format.cxx
@@ -21,12 +21,6 @@
 
 using namespace css;
 
-static std::ostream& operator<<(std::ostream& rStrm, const Color& rColor)
-{
-rStrm << "Color: R:" << static_cast(rColor.GetRed()) << " G:" << 
static_cast(rColor.GetGreen()) << " B: " << 
static_cast(rColor.GetBlue());
-return rStrm;
-}
-
 namespace sc_apitest {
 
 class ScConditionalFormatTest : public UnoApiTest
diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx
index 73250ba299e1..17f169b9e090 100644
--- a/sc/qa/unit/helper/qahelper.cxx
+++ b/sc/qa/unit/helper/qahelper.cxx
@@ -92,12 +92,6 @@ std::ostream& operator<<(std::ostream& rStrm, const 
ScRangeList& rList)
 return rStrm;
 }
 
-std::ostream& operator<<(std::ostream& rStrm, const Color& rColor)
-{
-rStrm << "Color: R:" << static_cast(rColor.GetRed()) << " G:" << 
static_cast(rColor.GetGreen()) << " B: " << 
static_cast(rColor.GetBlue());
-return rStrm;
-}
-
 std::ostream& operator<<(std::ostream& rStrm, const OpCode& rCode)
 {
 rStrm << static_cast(rCode);
diff --git a/sc/qa/unit/helper/qahelper.hxx b/sc/qa/unit/helper/qahelper.hxx
index dd41622a579c..6ad03dc1fa67 100644
--- a/sc/qa/unit/helper/qahelper.hxx
+++ b/sc/qa/unit/helper/qahelper.hxx
@@ -109,8 +109,6 @@ SCQAHELPER_DLLPUBLIC std::ostream& operator<<(std::ostream& 
rStrm, const ScRange
 
 SCQAHELPER_DLLPUBLIC std::ostream& operator<<(std::ostream& rStrm, const 
ScRangeList& rList);
 
-SCQAHELPER_DLLPUBLIC std::ostream& operator<<(std::ostream& rStrm, const 
Color& rColor);
-
 SCQAHELPER_DLLPUBLIC std::ostream& operator<<(std::ostream& rStrm, const 
OpCode& rCode);
 
 bool checkFormula(ScDocument& rDoc, const ScAddress& rPos, const char* 
pExpected);
diff --git a/sd/qa/unit/sdmodeltestbase.hxx b/sd/qa/unit/sdmodeltestbase.hxx
index 210301b8452a..fa342154cd9d 100644
--- a/sd/qa/unit/sdmodeltestbase.hxx
+++ b/sd/qa/unit/sdmodeltestbase.hxx
@@ -140,20 +140,6 @@ public:
 
 CPPUNIT_NS_BEGIN
 
-template <> struct assertion_traits
-{
-static bool equal(const Color& c1, const Color& c2) { return c1 == c2; }
-
-static std::string toString(const Color& c)
-{
-OStringStream ost;
-ost << "Color: R:" << static_cast(c.GetRed())
-<< " G:" << static_cast(c.GetGreen()) << " B:" << 
static_cast(c.GetBlue())
-<< " A:" << static_cast(255 - c.GetAlpha());
-return ost.str();
-}
-};
-
 template <> struct assertion_traits
 {
 static bool equal(const tools::Rectangle& r1, const tools::Rectangle& r2) 
{ return r1 == r2; }
diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx
index 88add0a71793..29bbde9b999d 100644
--- a/svl/qa/unit/svl.cxx
+++ b/svl/qa/unit/svl.cxx
@@ -42,12 +42,6 @@
 using namespace ::com::sun::star;
 using namespace svl;
 
-static std::ostream& operator<<(std::ostream& rStrm, const Color& rColor)
-{
-rStrm << "Color: R:" << static_cast(rColor.GetRed()) << " G:" << 
static_cast(rColor.GetGreen()) << " B: " << 
static_cast(rColor.GetBlue());
-return rStrm;
-}
-
 namespace svl
 {
 static std::ostream& operator<<(std::ostream& rStrm, const SharedString& 
string )
diff --git a/sw/qa/inc/swmodeltestbase.hxx b/sw/qa/inc/swmodeltestbase.hxx
index f00b16272e16..8b7775f1ae23 100644
--- a/sw/qa/inc/swmodeltestbase.hxx
+++ b/sw/qa/inc/swmodeltestbase.hxx
@@ -373,15 +373,6 @@ inline void assertBorderEqual(
 #define CPPUNIT_ASSERT_BORDER_EQUAL(aExpected, aActual) \
 assertBorderEqual( aExpected, aActual, CPPUNIT_SOURCELINE() ) \
 
-inline std::ostream& operator<<(std::ostream& rStrm, const Color& rColor)
-{
-rStrm << "Color: R:" << static_cast(rColor.GetRed())
-  << " G:" << static_cast(rColor.GetGreen())
-  << " B:" << static_cast(rColor.GetBlue())
-  << " A:" << static_cast(255 - rColor.GetAlpha());
-return rStrm;
-}
-
 #endif // INCLUDED_SW_QA_INC_SWMODELTESTBASE_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --

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

2022-11-21 Thread Miklos Vajna (via logerrit)
 sw/inc/fmtflcnt.hxx |2 ++
 sw/source/core/txtnode/atrflyin.cxx |   12 
 sw/source/core/txtnode/txatbase.cxx |3 +++
 3 files changed, 17 insertions(+)

New commits:
commit 7bf26fa8c848a15dde1c7c6b94edbee759a523d1
Author: Miklos Vajna 
AuthorDate: Mon Nov 21 14:17:55 2022 +0100
Commit: Miklos Vajna 
CommitDate: Mon Nov 21 16:17:01 2022 +0100

sw doc model xml dump: show the frame format of as-char images

Old:



New:


  

  


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

diff --git a/sw/inc/fmtflcnt.hxx b/sw/inc/fmtflcnt.hxx
index 882e1b328abc..21b8bf33b6f2 100644
--- a/sw/inc/fmtflcnt.hxx
+++ b/sw/inc/fmtflcnt.hxx
@@ -47,6 +47,8 @@ public:
 void SetFlyFormat( SwFrameFormat* pNew = nullptr )   { m_pFormat = pNew; }
 
 const SwTextFlyCnt *GetTextFlyCnt() const { return m_pTextAttr; }
+
+void dumpAsXml(xmlTextWriterPtr pWriter) const override;
 };
 
 #endif
diff --git a/sw/source/core/txtnode/atrflyin.cxx 
b/sw/source/core/txtnode/atrflyin.cxx
index 8216c96805c4..c1f3225b5d22 100644
--- a/sw/source/core/txtnode/atrflyin.cxx
+++ b/sw/source/core/txtnode/atrflyin.cxx
@@ -56,6 +56,18 @@ SwFormatFlyCnt* SwFormatFlyCnt::Clone( SfxItemPool* ) const
 return new SwFormatFlyCnt( m_pFormat );
 }
 
+void SwFormatFlyCnt::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+(void)xmlTextWriterStartElement(pWriter, BAD_CAST("SwFormatFlyCnt"));
+(void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("ptr"), "%p", 
this);
+(void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("text-attr"), 
"%p", m_pTextAttr);
+(void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("format"), "%p", 
m_pFormat);
+
+SfxPoolItem::dumpAsXml(pWriter);
+
+(void)xmlTextWriterEndElement(pWriter);
+}
+
 SwTextFlyCnt::SwTextFlyCnt( SwFormatFlyCnt& rAttr, sal_Int32 nStartPos )
 : SwTextAttr( rAttr, nStartPos )
 {
diff --git a/sw/source/core/txtnode/txatbase.cxx 
b/sw/source/core/txtnode/txatbase.cxx
index c846084a312e..05d05ce12e1c 100644
--- a/sw/source/core/txtnode/txatbase.cxx
+++ b/sw/source/core/txtnode/txatbase.cxx
@@ -170,6 +170,9 @@ void SwTextAttr::dumpAsXml(xmlTextWriterPtr pWriter) const
 case RES_TXTATR_CONTENTCONTROL:
 GetContentControl().dumpAsXml(pWriter);
 break;
+case RES_TXTATR_FLYCNT:
+GetFlyCnt().dumpAsXml(pWriter);
+break;
 default:
 SAL_WARN("sw.core", "Unhandled TXTATR");
 break;


[Libreoffice-commits] core.git: vcl/inc vcl/qa vcl/quartz vcl/source vcl/unx vcl/win

2022-11-21 Thread Caolán McNamara (via logerrit)
 vcl/inc/fontattributes.hxx |   26 +-
 vcl/inc/unx/freetype_glyphcache.hxx|2 +-
 vcl/qa/cppunit/physicalfontcollection.cxx  |4 ++--
 vcl/quartz/ctfonts.cxx |2 +-
 vcl/source/font/PhysicalFontCollection.cxx |4 ++--
 vcl/source/font/PhysicalFontFace.cxx   |2 +-
 vcl/source/font/PhysicalFontFamily.cxx |2 +-
 vcl/source/font/font.cxx   |2 +-
 vcl/source/font/fontattributes.cxx |5 ++---
 vcl/source/font/fontcache.cxx  |4 ++--
 vcl/source/font/fontmetric.cxx |2 +-
 vcl/source/gdi/pdfbuildin_fonts.cxx|3 ++-
 vcl/source/gdi/pdfwriter_impl.cxx  |2 +-
 vcl/source/outdev/font.cxx |2 +-
 vcl/unx/generic/fontmanager/fontsubst.cxx  |4 ++--
 vcl/unx/generic/print/genpspgraphics.cxx   |2 +-
 vcl/win/gdi/salfont.cxx|8 
 17 files changed, 30 insertions(+), 46 deletions(-)

New commits:
commit 538ebbd4fa4241d59e49e33d3cedd04e02ca9287
Author: Caolán McNamara 
AuthorDate: Sun Nov 20 21:09:01 2022 +
Commit: Caolán McNamara 
CommitDate: Mon Nov 21 16:17:47 2022 +0100

remove FontAttributes::meCharSet

its baked in that Symbol means RTL_TEXTENCODING_SYMBOL, so accept
that status quo and make it explicit

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

diff --git a/vcl/inc/fontattributes.hxx b/vcl/inc/fontattributes.hxx
index 23fd15955404..7ae4b4527bf1 100644
--- a/vcl/inc/fontattributes.hxx
+++ b/vcl/inc/fontattributes.hxx
@@ -42,9 +42,8 @@ public:
 FontItalic  GetItalic() const   { return 
meItalic; }
 FontPitch   GetPitch() const{ return 
mePitch; }
 FontWidth   GetWidthType() const{ return 
meWidthType; }
-rtl_TextEncodingGetCharSet() const  { return 
meCharSet; }
 
-boolIsSymbolFont() const{ return 
mbSymbolFlag; }
+boolIsMicrosoftSymbolEncoded() const{ return 
mbMicrosoftSymbolEncoded; }
 
 voidSetFamilyName(const OUString& sFamilyName)  { 
maFamilyName = sFamilyName; }
 voidSetStyleName( const OUString& sStyleName)   { 
maStyleName = sStyleName; }
@@ -55,7 +54,7 @@ public:
 voidSetWeight(const FontWeight eWeight ){ meWeight 
= eWeight; }
 voidSetWidthType(const FontWidth eWidthType){ 
meWidthType = eWidthType; }
 
-voidSetSymbolFlag(const bool );
+voidSetMicrosoftSymbolEncoded(const bool );
 
 boolCompareDeviceIndependentFontAttributes(const 
FontAttributes& rOther) const;
 
@@ -77,8 +76,7 @@ private:
 FontPitch   mePitch;// Pitch Type
 FontWidth   meWidthType;// Width Type
 FontItalic  meItalic;   // Slant Type
-rtl_TextEncodingmeCharSet;  // RTL_TEXTENCODING_SYMBOL 
or RTL_TEXTENCODING_UNICODE
-boolmbSymbolFlag;   // Is font a symbol?
+boolmbMicrosoftSymbolEncoded;   // Is font microsoft 
symbol encoded?
 
 // device dependent variables
 OUStringmaMapNames; // List of family name 
aliases separated with ';'
@@ -86,23 +84,9 @@ private:
 
 };
 
-inline void FontAttributes::SetSymbolFlag( const bool bSymbolFlag )
+inline void FontAttributes::SetMicrosoftSymbolEncoded(const bool 
bMicrosoftSymbolEncoded)
 {
-mbSymbolFlag = bSymbolFlag;
-if ( bSymbolFlag )
-{
-meCharSet = RTL_TEXTENCODING_SYMBOL;
-}
-else
-{
-// if the symbol flag is unset, but it was a symbol font before then
-// until the character set encoding is set via SetCharSet then we
-// can't know what the characterset is!
-if ( meCharSet == RTL_TEXTENCODING_SYMBOL )
-{
-meCharSet = RTL_TEXTENCODING_DONTKNOW;
-}
-}
+mbMicrosoftSymbolEncoded = bMicrosoftSymbolEncoded;
 }
 
 inline void FontAttributes::AddMapName( std::u16string_view aMapName )
diff --git a/vcl/inc/unx/freetype_glyphcache.hxx 
b/vcl/inc/unx/freetype_glyphcache.hxx
index fd54def14bb5..dd081339b910 100644
--- a/vcl/inc/unx/freetype_glyphcache.hxx
+++ b/vcl/inc/unx/freetype_glyphcache.hxx
@@ -67,7 +67,7 @@ public:
 int   GetFontFaceIndex() const  { return mnFaceNum; }
 int   GetFontFaceVariation() const  { return 
mnFaceVariation; }
 sal_IntPtrGetFontId() const { return mnFontId; }
-bool  IsMicrosoftSymbolEncoded() const { return 
maDevFontAttributes.IsSymbolFo

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

2022-11-21 Thread Caolán McNamara (via logerrit)
 vcl/unx/generic/glyphs/freetype_glyphcache.cxx |5 -
 1 file changed, 5 deletions(-)

New commits:
commit fd1b475143572655db18d2f1bc12309e3f5ab8d6
Author: Caolán McNamara 
AuthorDate: Mon Nov 21 09:10:50 2022 +
Commit: Caolán McNamara 
CommitDate: Mon Nov 21 16:18:05 2022 +0100

drop FT_Select_Charmap

khaled: "I think this is probably a no-op now as we don’t call 
FT_Get_Char_Index
anywhere (since mapping characters to glyphs is handled by HarfBuzz
now). I think the whole symbol font concept might be no-op as HarfBuzz
will internally use the symbol cmap subtable if the font has one and we
don’t need to (or can) influence this."

last use of FT_Get_Char_Index was removed with

commit 23c5125148a8110d88385b29570bf0b7d4400458
Date:   Thu May 10 15:46:06 2018 +0200

Use HarfBuzz to get Kashida width

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

diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx 
b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
index aca47bad7518..1c5f41be951c 100644
--- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
+++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
@@ -452,11 +452,6 @@ FreetypeFont::FreetypeFont(FreetypeFontInstance& 
rFontInstance, std::shared_ptr<
  * not need any glyph data from FreeType in this case */
 /*FT_Error rc = */ FT_Set_Pixel_Sizes( maFaceFT, mnWidth, rFSD.mnHeight );
 
-if (mxFontInfo->IsMicrosoftSymbolEncoded())
-FT_Select_Charmap(maFaceFT, FT_ENCODING_MS_SYMBOL);
-else
-FT_Select_Charmap(maFaceFT, FT_ENCODING_UNICODE);
-
 mbFaceOk = true;
 
 // TODO: query GASP table for load flags


[Libreoffice-commits] core.git: Branch 'feature/cib_contract891c' - 2 commits - configure.ac download.lst external/expat

2022-11-21 Thread Thorsten Behrens (via logerrit)
 configure.ac  |2 +-
 download.lst  |4 ++--
 external/expat/expat-winapi.patch |   13 +++--
 3 files changed, 10 insertions(+), 9 deletions(-)

New commits:
commit bb6e836404d0ab71908a030fbfa8a3c903b9251d
Author: Thorsten Behrens 
AuthorDate: Mon Nov 21 16:44:52 2022 +0100
Commit: Thorsten Behrens 
CommitDate: Mon Nov 21 16:44:52 2022 +0100

elease 5.4.17

Change-Id: Ib14755055a857265f7b6e683f0d3b1057f108de8

diff --git a/configure.ac b/configure.ac
index a52137e6f88a..ced1de25fcf1 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.16.0],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[5.4.17.0],[],[],[http://documentfoundation.org/])
 
 AC_PREREQ([2.59])
 
commit 04e0ab35b2036082518925535cc52da75f46e837
Author: Taichi Haradaguchi <20001...@ymail.ne.jp>
AuthorDate: Mon Oct 31 00:20:55 2022 +0900
Commit: Thorsten Behrens 
CommitDate: Mon Nov 21 16:42:55 2022 +0100

upgrade Expat to 2.5.0

Fixes CVE-2022-43680

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142205
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit 74eea44c685e108fab44c85ce81609091c7be1ec)

Change-Id: I5bf8d1ab0ac352833c76a7edfc1d8eb78dd03e10
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142420
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

Conflicts:
download.lst

diff --git a/download.lst b/download.lst
index d5e3f2f17cb9..210a8bb89c44 100644
--- a/download.lst
+++ b/download.lst
@@ -41,8 +41,8 @@ export EPM_TARBALL := 
3ade8cfe7e59ca8e65052644fed9fca4-epm-3.7.tar.gz
 export ETONYEK_SHA256SUM := 
032f53e8d7691e48a73ddbe74fa84c906ff6ff32a33e6ee2a935b6fdb6aecb78
 export ETONYEK_VERSION_MICRO := 6
 export ETONYEK_TARBALL := libetonyek-0.1.$(ETONYEK_VERSION_MICRO).tar.bz2
-export EXPAT_SHA256SUM := 
6e8c0728fe5c7cd3f93a6acce43046c5e4736c7b4b68e032e9350daa0efc0354
-export EXPAT_TARBALL := expat-2.4.9.tar.xz
+export EXPAT_SHA256SUM := 
ef2420f0232c087801abf705e89ae65f6257df6b7931d37846a193ef2e8cdcbe
+export EXPAT_TARBALL := expat-2.5.0.tar.xz
 export FIREBIRD_SHA256SUM := 
6994be3555e23226630c587444be19d309b25b0fcf1f87df3b4e3f88943e5860
 export FIREBIRD_TARBALL := Firebird-3.0.0.32483-0.tar.bz2
 export FONTCONFIG_SHA256SUM := 
b449a3e10c47e1d1c7a6ec6e2016cca73d3bd68fbbd4f0ae5cc6b573f7d6c7f3
diff --git a/external/expat/expat-winapi.patch 
b/external/expat/expat-winapi.patch
index 7eae7d5d6139..fed65644a732 100644
--- a/external/expat/expat-winapi.patch
+++ b/external/expat/expat-winapi.patch
@@ -1,6 +1,6 @@
 misc/expat-2.1.0/lib/expat_external.h  2009-11-16 08:53:17.37500 
+
-+++ misc/build/expat-2.1.0/lib/expat_external.h2009-11-16 
08:53:34.703125000 +
-@@ -81,10 +81,6 @@
+--- misc/expat-2.5.0/lib/expat_external.h  2022-10-25 01:32:54.0 
+0900
 misc/build/expat-2.5.0/lib/expat_external.h2022-10-30 
23:09:47.339459134 +0900
+@@ -88,10 +88,6 @@
  #  ifndef XML_BUILDING_EXPAT
  /* using Expat from an application */
  
@@ -11,12 +11,13 @@
  #  endif
  #endif /* not defined XML_STATIC */
  
 misc/expat-2.1.0/lib/xmlparse.c2021-05-23 16:56:25.0 +0100
-+++ misc/build/expat-2.1.0/lib/xmlparse.c  2021-05-25 12:42:11.997173600 
+0100
-@@ -64,6 +64,8 @@
+--- misc/expat-2.5.0/lib/xmlparse.c2022-10-26 00:09:08.0 +0900
 misc/build/expat-2.5.0/lib/xmlparse.c  2022-10-30 23:09:01.843006341 
+0900
+@@ -67,6 +67,9 @@
  #endif
  
  #ifdef _WIN32
++#  undef HAVE_ARC4RANDOM_BUF
 +#  undef HAVE_GETRANDOM
 +#  undef HAVE_SYSCALL_GETRANDOM
  /* force stdlib to define rand_s() */


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

2022-11-21 Thread Stephan Bergmann (via logerrit)
 l10ntools/source/localize.cxx |   18 --
 solenv/gbuild/Module.mk   |1 +
 2 files changed, 17 insertions(+), 2 deletions(-)

New commits:
commit 17cfd43e28c45626b1e0990bd0e51fdc97409ebe
Author: Stephan Bergmann 
AuthorDate: Sun Nov 20 17:39:27 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Nov 21 16:45:02 2022 +0100

Avoid external processes picking up instdir/program/libxml2.so.2

...which is a problem in ASan builds, as seen with a failing `make check`:

> xgettext: symbol lookup error: .../instdir/program/libxml2.so.2: 
undefined symbol: __asan_init
> xgettext: symbol lookup error: .../instdir/program/libxml2.so.2: 
undefined symbol: __asan_init
> xgettext: symbol lookup error: .../instdir/program/libxml2.so.2: 
undefined symbol: __asan_init
> xgettext: symbol lookup error: .../instdir/program/libxml2.so.2: 
undefined symbol: __asan_init
> xgettext: symbol lookup error: .../instdir/program/libxml2.so.2: 
undefined symbol: __asan_init
> Traceback (most recent call last):
>   File ".../solenv/bin/uiex", line 25, in 
> input = check_output(["xgettext", "--add-comments", "--no-wrap", 
ifile, "-o", "-"], encoding="UTF-8")
> 
^
>   File "/usr/lib64/python3.11/subprocess.py", line 465, in check_output
> return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
>^
>   File "/usr/lib64/python3.11/subprocess.py", line 569, in run
> raise CalledProcessError(retcode, process.args,
> subprocess.CalledProcessError: Command '['xgettext', '--add-comments', 
'--no-wrap', '.../basctl/uiconfig/basicide/ui/basicmacrodialog.ui', '-o', '-']' 
returned non-zero exit status 127.
> Error: Failed to execute .../solenv/bin/uiex -i 
.../basctl/uiconfig/basicide/ui/basicmacrodialog.ui -o 
.../workdir//pot/basctl/messages.pot

The solution is similar to e854abe076155fc085b56549ced50b3ee9a095d2 "Avoid
external processes picking up instdir/program/libnspr4.so" used in various
tests.  And as Executable_localize appears to only be called in that one 
place
in the recipe of `make translations`, for simplicity make the library path
override a required fourth argument for that executable.

Change-Id: Ia6326ac0bb12ea75a8b3df51f7fbf12b88aca634
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142999
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx
index 2ec0123616f4..c5ffd6d5c060 100644
--- a/l10ntools/source/localize.cxx
+++ b/l10ntools/source/localize.cxx
@@ -46,6 +46,8 @@
 
 namespace {
 
+OString libraryPathEnvVarOverride;
+
 bool matchList(
 std::u16string_view rUrl, const std::u16string_view* pList, size_t nLength)
 {
@@ -89,6 +91,17 @@ void handleCommand(
 OStringBuffer buf;
 if (rExecutable == "uiex" || rExecutable == "hrcex")
 {
+#if !defined _WIN32
+// For now, this is only needed by some Linux ASan builds, so keep it 
simply and disable it
+// on  Windows (which doesn't support the relevant shell syntax for 
(un-)setting environment
+// variables).
+auto const n = libraryPathEnvVarOverride.indexOf('=');
+if (n == -1) {
+buf.append("unset -v " + libraryPathEnvVarOverride + " && ");
+} else {
+buf.append(libraryPathEnvVarOverride + " ");
+}
+#endif
 auto const env = getenv("SRC_ROOT");
 assert(env != nullptr);
 buf.append(env);
@@ -485,16 +498,17 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
 {
 try
 {
-if (argc != 3)
+if (argc != 4)
 {
 std::cerr
 << ("localize (c)2001 by Sun Microsystems\n\n"
 "As part of the L10N framework, localize extracts en-US\n"
 "strings for translation out of the toplevel modules 
defined\n"
 "in projects array in l10ntools/source/localize.cxx.\n\n"
-"Syntax: localize  \n");
+"Syntax: localize   
\n");
 exit(EXIT_FAILURE);
 }
+libraryPathEnvVarOverride = argv[3];
 handleProjects(argv[1],argv[2]);
 }
 catch (std::exception& e)
diff --git a/solenv/gbuild/Module.mk b/solenv/gbuild/Module.mk
index 347f1239e005..fe7470e85822 100644
--- a/solenv/gbuild/Module.mk
+++ b/solenv/gbuild/Module.mk
@@ -247,6 +247,7 @@ $(WORKDIR)/pot.done : $(foreach exec,cfgex helpex localize 
propex ulfex xrmex tr
$(call gb_Trace_MakeMark,$(subst .pot,,$(subst $(WORKDIR)/,,$@)),POT)
$(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $@) && $(call gb_Helper_execute,localize) 
$(SRCDIR) $(dir $@)/pot \
+   
$(gb_Helper_LIBRARY_PATH_VAR)"$${$(gb_Hel

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

2022-11-21 Thread Jonas Eyov (via logerrit)
 vcl/inc/window.h  |2 ++
 vcl/source/window/window.cxx  |2 ++
 vcl/source/window/window2.cxx |   37 ++---
 3 files changed, 26 insertions(+), 15 deletions(-)

New commits:
commit fe21365c5a9083ae1f086ea48614263b3a75ab3e
Author: Jonas Eyov 
AuthorDate: Fri Nov 18 03:40:57 2022 +
Commit: Caolán McNamara 
CommitDate: Mon Nov 21 17:28:45 2022 +0100

tdf#143209 vcl: track partial scroll deltas

this makes scrolling in calc smoother and makes left/up scrolling
the same speed as right/down scrolling, which was previously not the
case.

prior to this change, Window::HandleScrollCommand only checked each
event for being a large enough scroll to advance one unit. this
happened in lcl_HandleScrollHelper by way of o3tl::saturating_cast,
which meant that nonzero upward/leftward scrolls were always worth at
least one unit, while downward/rightward scrolls needed to be larger
than 1 to count.

now, we accumulate partial scroll offsets in WindowImpl and perform a
saturating cast on the absolute value, so behavior is symmetric and
sensitive to accumulated small scroll values. this feels smoother
and is more correct.

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

diff --git a/vcl/inc/window.h b/vcl/inc/window.h
index 639bee80e82c..6f10445abf39 100644
--- a/vcl/inc/window.h
+++ b/vcl/inc/window.h
@@ -256,6 +256,8 @@ public:
 vcl::Cursor*mpCursor;
 PointerStylemaPointer;
 FractionmaZoom;
+double  mfPartialScrollX;
+double  mfPartialScrollY;
 OUStringmaText;
 std::optional
 mpControlFont;
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 4705fe516ce5..5cfc50d717c0 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -590,6 +590,8 @@ WindowImpl::WindowImpl( vcl::Window& rWindow, WindowType 
nType )
 {
 mxOutDev = VclPtr::Create(rWindow);
 maZoom  = Fraction( 1, 1 );
+mfPartialScrollX= 0.0;
+mfPartialScrollY= 0.0;
 maWinRegion = vcl::Region(true);
 maWinClipRegion = vcl::Region(true);
 mpWinData   = nullptr;  // 
Extra Window Data, that we don't need for all windows
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index b6c4ee25415a..978dc0b6ecf8 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -598,12 +598,14 @@ tools::Long Window::GetDrawPixel( OutputDevice const * 
pDev, tools::Long nPixels
 return nP;
 }
 
-static void lcl_HandleScrollHelper( Scrollable* pScrl, double nN, bool 
isMultiplyByLineSize )
+// returns how much was actually scrolled (so that abs(retval) <= abs(nN))
+static double lcl_HandleScrollHelper( Scrollable* pScrl, double nN, bool 
isMultiplyByLineSize )
 {
 if (!pScrl || !nN || pScrl->Inactive())
-return;
+return 0.0;
 
 tools::Long nNewPos = pScrl->GetThumbPos();
+double scrolled = nN;
 
 if ( nN == double(-LONG_MAX) )
 nNewPos += pScrl->GetPageSize();
@@ -616,13 +618,22 @@ static void lcl_HandleScrollHelper( Scrollable* pScrl, 
double nN, bool isMultipl
 nN*=pScrl->GetLineSize();
 }
 
-const double fVal = nNewPos - nN;
+// compute how many quantized units to scroll
+tools::Long magnitude = o3tl::saturating_cast(abs(nN));
+tools::Long change = copysign(magnitude, nN);
+
+nNewPos = nNewPos - change;
 
-nNewPos = o3tl::saturating_cast(fVal);
+scrolled = double(change);
+// convert back to chunked/continuous
+if(isMultiplyByLineSize){
+scrolled /= pScrl->GetLineSize();
+}
 }
 
 pScrl->DoScroll( nNewPos );
 
+return scrolled;
 }
 
 bool Window::HandleScrollCommand( const CommandEvent& rCmd,
@@ -668,6 +679,9 @@ bool Window::HandleScrollCommand( const CommandEvent& rCmd,
 {
 double nScrollLines = pData->GetScrollLines();
 double nLines;
+double* partialScroll = pData->IsHorz()
+? &mpWindowImpl->mfPartialScrollX
+: &mpWindowImpl->mfPartialScrollY;
 if ( nScrollLines == COMMAND_WHEEL_PAGESCROLL )
 {
 if ( pData->GetDelta() < 0 )
@@ -676,13 +690,12 @@ bool Window::HandleScrollCommand( const CommandEvent& 
rCmd,
 nLines = double(LONG_MAX);
 }
 else
- 

Re: Changes in LibreOfficeKit

2022-11-21 Thread Andreas Mantke

Hi Miklos,

Am 21.11.22 um 10:15 schrieb Miklos Vajna:

Hi,

On Sat, Nov 19, 2022 at 12:58:24PM +0100, Andreas Mantke  wrote:

https://gerrit.libreoffice.org/c/core/+/137869

It would be great if the developer or the reviewer could merge this
patch into the LibreOffice master too.

Done in .


thanks.

Regards,
Andreas

--
## Free Software Advocate
## Plone add-on developer
## My blog: http://www.amantke.de/blog



[Libreoffice-commits] core.git: Changes to 'private/mmeeks/macinput'

2022-11-21 Thread Michael Meeks (via logerrit)
New branch 'private/mmeeks/macinput' available with the following commits:
commit 91c43c58f0d46debbe3054c5e33f3a102a4b5a12
Author: Michael Meeks 
Date:   Mon Nov 21 17:41:58 2022 +

tdf#148435 - avoid strange OS/X deadlock around AnyInput.

Apparently calling AnyInput on Mac and filtering for just input, gives
you window creation / re-sizing events which then trigger idle paint
events which then deadlock if called with the scheduler lock.

Try having a little more inefficiency and a different race for
this case to handle the Mac world.

Change-Id: I9985eaf18f8d0ba4d44e83c03746510a6ba6d664



[Libreoffice-commits] core.git: Branch 'private/mmeeks/macinput' - 0 commits -

2022-11-21 Thread (via logerrit)
Rebased ref, commits from common ancestor:


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

2022-11-21 Thread Jim Raykowski (via logerrit)
 svx/source/svdraw/svdobj.cxx|8 +++
 sw/qa/extras/uiwriter/uiwriter6.cxx |   37 
 2 files changed, 41 insertions(+), 4 deletions(-)

New commits:
commit fd0f6a4e83cb4a99839c73d7f545b4b80ef4657a
Author: Jim Raykowski 
AuthorDate: Sat Nov 19 17:57:43 2022 -0900
Commit: Jim Raykowski 
CommitDate: Mon Nov 21 18:54:30 2022 +0100

tdf#151828 related: Make cut shape have the same name after paste

when possible

Fixes shape names without a number at the end of the name, having the
number 1 appended to the end of the name after cut and paste in the
same document.

When possible - because it might happen that a shape is inserted
after the cut operation and is given the same name as the cut shape
name. If so, when the shape is pasted into the same document it will
not have the same name as before it was cut.

Change-Id: I1d1ebc76d07d81da0286d1f0bb7d34ad973a43b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142983
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 
Reviewed-by: Jim Raykowski 

diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 877744f4e273..34688e501eae 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -3094,6 +3094,7 @@ void SdrObject::MakeNameUnique()
 {
 if (GetName().isEmpty())
 {
+OUString aName;
 if (const E3dScene* pE3dObj = DynCastE3dScene(this))
 {
 SdrObjList* pObjList = pE3dObj->GetSubList();
@@ -3101,11 +3102,12 @@ void SdrObject::MakeNameUnique()
 {
 SdrObject* pObj0 = pObjList->GetObj(0);
 if (pObj0)
-SetName(pObj0->TakeObjNameSingul());
+aName = pObj0->TakeObjNameSingul();
 }
 }
 else
-SetName(TakeObjNameSingul());
+aName = TakeObjNameSingul();
+SetName(aName + " 1");
 }
 
 std::unordered_set aNameSet;
@@ -3143,8 +3145,6 @@ void 
SdrObject::MakeNameUnique(std::unordered_set& rNameSet)
 while (nPos > 0 && rtl::isAsciiDigit(sName[--nPos]));
 sRootName = o3tl::trim(sName.subView(0, nPos + 1));
 }
-else
-sName += " 1";
 
 for (sal_uInt32 n = 1; rNameSet.find(sName) != rNameSet.end(); n++)
 sName = sRootName + " " + OUString::number(n);
diff --git a/sw/qa/extras/uiwriter/uiwriter6.cxx 
b/sw/qa/extras/uiwriter/uiwriter6.cxx
index eac32ec1b233..2c0900fe0797 100644
--- a/sw/qa/extras/uiwriter/uiwriter6.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter6.cxx
@@ -,6 +,43 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testCaptionShape)
 CPPUNIT_ASSERT_EQUAL(1, getShapes());
 }
 
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf151828_Comment2)
+{
+createSwDoc();
+
+// Add a basic shape to the document.
+uno::Sequence aArgs(
+comphelper::InitPropertySequence({ { "KeyModifier", uno::Any(KEY_MOD1) 
} }));
+dispatchCommand(mxComponent, ".uno:BasicShapes", aArgs);
+Scheduler::ProcessEventsToIdle();
+
+auto xBasicShape = getShape(1);
+auto pObject = SdrObject::getSdrObjectFromXShape(xBasicShape);
+
+CPPUNIT_ASSERT_EQUAL(1, getShapes());
+
+// rename the shape name
+pObject->SetName("Shape");
+
+// cut and paste it
+dispatchCommand(mxComponent, ".uno:Cut", {});
+Scheduler::ProcessEventsToIdle();
+
+CPPUNIT_ASSERT_EQUAL(0, getShapes());
+
+dispatchCommand(mxComponent, ".uno:Paste", {});
+Scheduler::ProcessEventsToIdle();
+
+CPPUNIT_ASSERT_EQUAL(1, getShapes());
+
+// it is required to get the shape objet again after paste
+xBasicShape = getShape(1);
+pObject = SdrObject::getSdrObjectFromXShape(xBasicShape);
+
+// Without fix in place, the shape name was 'Shape 1' after paste.
+CPPUNIT_ASSERT_EQUAL(OUString("Shape"), pObject->GetName());
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


[Libreoffice-commits] core.git: basctl/inc chart2/inc comphelper/Library_comphelper.mk comphelper/source cui/inc include/comphelper include/svl reportdesign/inc sc/inc sd/inc slideshow/inc solenv/clan

2022-11-21 Thread Stephan Bergmann (via logerrit)
 basctl/inc/pch/precompiled_basctl.hxx  |1 
 chart2/inc/pch/precompiled_chartcontroller.hxx |1 
 comphelper/Library_comphelper.mk   |1 
 comphelper/source/misc/weak.cxx|   57 --
 cui/inc/pch/precompiled_cui.hxx|1 
 include/comphelper/weak.hxx|   64 -
 include/svl/style.hxx  |5 -
 reportdesign/inc/pch/precompiled_rpt.hxx   |1 
 reportdesign/inc/pch/precompiled_rptui.hxx |1 
 sc/inc/pch/precompiled_sc.hxx  |1 
 sd/inc/pch/precompiled_sdui.hxx|1 
 slideshow/inc/pch/precompiled_slideshow.hxx|1 
 solenv/clang-format/excludelist|2 
 svl/source/items/style.cxx |4 -
 svx/inc/pch/precompiled_svx.hxx|1 
 sw/inc/pch/precompiled_msword.hxx  |1 
 sw/inc/pch/precompiled_sw.hxx  |1 
 sw/inc/pch/precompiled_vbaswobj.hxx|1 
 18 files changed, 4 insertions(+), 141 deletions(-)

New commits:
commit 4beea25b0797fe9c9acf05e9e4ef926d0726582a
Author: Stephan Bergmann 
AuthorDate: Mon Nov 21 12:58:55 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Nov 21 19:35:40 2022 +0100

Drop comphelper::OWeakTypeObject, use cppu::WeakImplHelper<> instead

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

diff --git a/basctl/inc/pch/precompiled_basctl.hxx 
b/basctl/inc/pch/precompiled_basctl.hxx
index a92d3a0870f5..4f3566f3f6ea 100644
--- a/basctl/inc/pch/precompiled_basctl.hxx
+++ b/basctl/inc/pch/precompiled_basctl.hxx
@@ -351,7 +351,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/chart2/inc/pch/precompiled_chartcontroller.hxx 
b/chart2/inc/pch/precompiled_chartcontroller.hxx
index b87950ae5bf1..6839b807696d 100644
--- a/chart2/inc/pch/precompiled_chartcontroller.hxx
+++ b/chart2/inc/pch/precompiled_chartcontroller.hxx
@@ -285,7 +285,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/comphelper/Library_comphelper.mk b/comphelper/Library_comphelper.mk
index ffa06369ddbd..6d0536058882 100644
--- a/comphelper/Library_comphelper.mk
+++ b/comphelper/Library_comphelper.mk
@@ -136,7 +136,6 @@ $(eval $(call gb_Library_add_exception_objects,comphelper,\
 comphelper/source/misc/syntaxhighlight \
 comphelper/source/misc/threadpool \
 comphelper/source/misc/types \
-comphelper/source/misc/weak \
 comphelper/source/misc/weakeventlistener \
 comphelper/source/misc/xmlsechelper \
 comphelper/source/officeinstdir/officeinstallationdirectories \
diff --git a/comphelper/source/misc/weak.cxx b/comphelper/source/misc/weak.cxx
deleted file mode 100644
index 02cf40e2b646..
--- a/comphelper/source/misc/weak.cxx
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-
-#include 
-
-using namespace com::sun::star::uno;
-using namespace com::sun::star::lang;
-
-namespace comphelper
-{
-
-OWeakTypeObject::OWeakTypeObject()
-{
-}
-
-OWeakTypeObject::~OWeakTypeObject()
-{
-}
-
-Any SAL_CALL OWeakTypeObject::queryInterface(const Type & rType )
-{
-if( rType == cppu::UnoType::get() )
-return Any( Reference< XTypeProvider >(this) );
-else
-return ::cppu::OWeakObject::queryInterface( rType );
-}
-
-Sequence< Type > SAL_CALL OWeakTypeObject::getTypes(  )
-{
-return Sequence< Type >();
-}
-
-Sequence< ::sal_Int8 > SAL_CALL OWeakTypeObject::getImplementationId(  )
-{
-return Sequence< ::sal_Int8 >();
-}
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/inc/pch/precompiled_cui.hxx b/cui/inc/pch/precompiled_cui.hxx
index 7de8ace33474..6553c5874b1a 100644
--- a/cui/inc/pch/precompiled_cui.hxx
+++ b/cui/inc/pch/precompiled_cui.hxx
@@ -266,7 +266,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git

[Libreoffice-commits] core.git: include/vcl vcl/CppunitTest_vcl_font.mk vcl/qa

2022-11-21 Thread خالد حسني (via logerrit)
 include/vcl/outdev.hxx |2 -
 vcl/CppunitTest_vcl_font.mk|5 --
 vcl/qa/cppunit/logicalfontinstance.cxx |   59 -
 3 files changed, 1 insertion(+), 65 deletions(-)

New commits:
commit 1ff2f5fa2d8c353b0cad28317a696c2ba9a4aab5
Author: خالد حسني 
AuthorDate: Mon Nov 21 15:01:39 2022 +0100
Commit: خالد حسني 
CommitDate: Mon Nov 21 19:58:22 2022 +0100

Revert "vcl: test getting glyph boundary rect from LogicalFontInstance"

This reverts commit 0cef06f0a2c0963e8c1579b78975710e6af4471c.

Reason for revert:

https://gerrit.libreoffice.org/c/core/+/141234/comments/89325e55_2271cfe8

> Stephan Bergmann:
>
> I saw the unrelated  
fail its Jenkins  build 
on tb88-win with
>
>   
C:/cygwin64/home/tdf/jenkins/workspace/gerrit_windows/vcl/qa/cppunit/logicalfontinstance.cxx(53)
 : error : Assertion
>   Test name: VclLogicalFontInstanceTest::testglyphboundrect
>   equality assertion failed
>   - Expected: 51x82@(7,-80)
>   - Actual  : 50x82@(7,-80)

Change-Id: Idc4132adbaf0b051dcf955f3f1e7c44841c60117
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142928
Tested-by: Jenkins
Reviewed-by: خالد حسني 

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index b4fdd82e1ab9..14c1675e7eed 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -1176,7 +1176,7 @@ public:
 //If bNewFontLists is true then drop and refetch lists of system fonts
 SAL_DLLPRIVATE static void  ImplUpdateAllFontData( bool bNewFontLists );
 
-const LogicalFontInstance* GetFontInstance() const;
+SAL_DLLPRIVATE const LogicalFontInstance* GetFontInstance() const;
 
 protected:
 SAL_DLLPRIVATE tools::Long GetEmphasisAscent() const { return 
mnEmphasisAscent; }
diff --git a/vcl/CppunitTest_vcl_font.mk b/vcl/CppunitTest_vcl_font.mk
index 813ab1c9c009..891352508a1c 100644
--- a/vcl/CppunitTest_vcl_font.mk
+++ b/vcl/CppunitTest_vcl_font.mk
@@ -20,7 +20,6 @@ $(eval $(call gb_CppunitTest_add_exception_objects,vcl_font, \
vcl/qa/cppunit/physicalfontfacecollection \
vcl/qa/cppunit/physicalfontfamily \
vcl/qa/cppunit/physicalfontcollection \
-   vcl/qa/cppunit/logicalfontinstance \
 ))
 
 $(eval $(call gb_CppunitTest_use_externals,vcl_font,\
@@ -57,8 +56,4 @@ $(eval $(call gb_CppunitTest_use_components,vcl_font,\
 
 $(eval $(call gb_CppunitTest_use_configuration,vcl_font))
 
-$(eval $(call gb_CppunitTest_use_more_fonts,vcl_font))
-
-$(eval $(call gb_CppunitTest_set_non_application_font_use,vcl_font,abort))
-
 # vim: set noet sw=4 ts=4:
diff --git a/vcl/qa/cppunit/logicalfontinstance.cxx 
b/vcl/qa/cppunit/logicalfontinstance.cxx
deleted file mode 100644
index 56b9897f0589..
--- a/vcl/qa/cppunit/logicalfontinstance.cxx
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-#include 
-
-#include 
-#include 
-
-#include 
-#include 
-
-#include 
-
-#include 
-
-class VclLogicalFontInstanceTest : public test::BootstrapFixture
-{
-public:
-VclLogicalFontInstanceTest()
-: BootstrapFixture(true, false)
-{
-}
-
-void testglyphboundrect();
-
-CPPUNIT_TEST_SUITE(VclLogicalFontInstanceTest);
-CPPUNIT_TEST(testglyphboundrect);
-
-CPPUNIT_TEST_SUITE_END();
-};
-
-void VclLogicalFontInstanceTest::testglyphboundrect()
-{
-ScopedVclPtr device = 
VclPtr::Create(DeviceFormat::DEFAULT);
-device->SetOutputSizePixel(Size(1000, 1000));
-device->SetFont(vcl::Font("Liberation Sans", Size(0, 110)));
-
-const LogicalFontInstance* pFontInstance = device->GetFontInstance();
-
-tools::Rectangle aBoundRect;
-const auto LATIN_SMALL_LETTER_B = 0x0062;
-
pFontInstance->GetGlyphBoundRect(pFontInstance->GetGlyphIndex(LATIN_SMALL_LETTER_B),
 aBoundRect,
- false);
-#ifdef MACOSX
-CPPUNIT_ASSERT_EQUAL(tools::Rectangle(Point(7, -80), Size(51, 83)), 
aBoundRect);
-#else
-CPPUNIT_ASSERT_EQUAL(tools::Rectangle(Point(7, -80), Size(51, 82)), 
aBoundRect);
-#endif
-}
-
-CPPUNIT_TEST_SUITE_REGISTRATION(VclLogicalFontInstanceTest);
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */


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

2022-11-21 Thread Khaled Hosny (via logerrit)
 vcl/inc/font/PhysicalFontFace.hxx|3 ++-
 vcl/source/font/PhysicalFontFace.cxx |4 ++--
 vcl/source/gdi/pdfwriter_impl.cxx|5 +++--
 3 files changed, 7 insertions(+), 5 deletions(-)

New commits:
commit ab5c60f2fd3e24f24fd82d7756d45a5fd4d19f1d
Author: Khaled Hosny 
AuthorDate: Mon Nov 21 17:32:42 2022 +0200
Commit: خالد حسني 
CommitDate: Mon Nov 21 19:58:54 2022 +0100

vcl: fix accessing color font colors

Don’t unconditionally access palette 0.

Change-Id: I3de3f005371fcb9360ee0cf245a1d0a7434ffbd8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143042
Tested-by: Jenkins
Reviewed-by: خالد حسني 

diff --git a/vcl/inc/font/PhysicalFontFace.hxx 
b/vcl/inc/font/PhysicalFontFace.hxx
index 96f2533f22fe..ac8ba2d958c7 100644
--- a/vcl/inc/font/PhysicalFontFace.hxx
+++ b/vcl/inc/font/PhysicalFontFace.hxx
@@ -174,9 +174,10 @@ public:
 bool IsColorFont() const { return HasColorLayers() || HasColorBitmaps(); }
 
 bool HasColorLayers() const;
-const ColorPalette& GetColorPalette(size_t) const;
 std::vector GetGlyphColorLayers(sal_GlyphId) const;
 
+const std::vector& GetColorPalettes() const;
+
 bool HasColorBitmaps() const;
 RawFontData GetGlyphColorBitmap(sal_GlyphId, tools::Rectangle&) const;
 
diff --git a/vcl/source/font/PhysicalFontFace.cxx 
b/vcl/source/font/PhysicalFontFace.cxx
index 83f50b31e690..682113cad102 100644
--- a/vcl/source/font/PhysicalFontFace.cxx
+++ b/vcl/source/font/PhysicalFontFace.cxx
@@ -383,7 +383,7 @@ bool PhysicalFontFace::HasColorLayers() const
 return hb_ot_color_has_layers(pHbFace) && 
hb_ot_color_has_palettes(pHbFace);
 }
 
-const ColorPalette& PhysicalFontFace::GetColorPalette(size_t nIndex) const
+const std::vector& PhysicalFontFace::GetColorPalettes() const
 {
 if (!mxColorPalettes)
 {
@@ -410,7 +410,7 @@ const ColorPalette& 
PhysicalFontFace::GetColorPalette(size_t nIndex) const
 }
 }
 
-return (*mxColorPalettes)[nIndex];
+return *mxColorPalettes;
 }
 
 std::vector PhysicalFontFace::GetGlyphColorLayers(sal_GlyphId 
nGlyphIndex) const
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index 8ba2ac6e0428..57ea2c785b81 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -2446,7 +2446,7 @@ bool PDFWriterImpl::emitType3Font(const 
vcl::font::PhysicalFontFace* pFace,
 if (g_bDebugDisableCompression)
 emitComment("PDFWriterImpl::emitType3Font");
 
-const auto& aPalette = pFace->GetColorPalette(0);
+const auto& rColorPalettes = pFace->GetColorPalettes();
 
 FontSubsetInfo aSubsetInfo;
 sal_GlyphId pTempGlyphIds[] = { 0 };
@@ -2587,7 +2587,8 @@ bool PDFWriterImpl::emitType3Font(const 
vcl::font::PhysicalFontFace* pFace,
 // 0x is a special value means foreground color.
 if (rLayer.m_nColorIndex != 0x)
 {
-auto aColor(aPalette[rLayer.m_nColorIndex]);
+auto& rPalette = rColorPalettes[0];
+auto aColor(rPalette[rLayer.m_nColorIndex]);
 appendNonStrokingColor(aColor, aContents);
 aContents.append(" ");
 if (aColor.GetAlpha() != 0xFF


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

2022-11-21 Thread Bogdan B (via logerrit)
 source/text/shared/01/0101.xhp |  109 +
 1 file changed, 51 insertions(+), 58 deletions(-)

New commits:
commit 9a51c0944dd694febb2c007f497c22ec57d159aa
Author: Bogdan B 
AuthorDate: Tue Nov 15 22:17:07 2022 +0200
Commit: Olivier Hallot 
CommitDate: Mon Nov 21 20:31:43 2022 +0100

tdf#152057 Complete revision of shared/01/0101.xhp

Change-Id: Ib3bbc1c9660e7102bdcd4eb2d0573903bf4cf195
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/142689
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/source/text/shared/01/0101.xhp 
b/source/text/shared/01/0101.xhp
index ae3aac3643..5482d9bd88 100644
--- a/source/text/shared/01/0101.xhp
+++ b/source/text/shared/01/0101.xhp
@@ -28,19 +28,24 @@
   
 
 
+
 
 
+
 New
   Creates a new $[officename] document.
 
+
 
 Creates a new $[officename] 
document. Click the arrow to select the document type.
+
 
   
 
 
 If you want to create a document from a template, choose New - 
Templates.
 A template is 
a file that contains the design elements for a document, including formatting 
styles, backgrounds, frames, graphics, fields, page layout, and 
text.
+
 
   
 
@@ -55,164 +60,152 @@
   
   
 
-  Icon
+  Icon Text Document
 
 
   Text 
Document
 
 
-  Creates 
a new text document in $[officename] Writer.
+  
+  Creates 
a text document in $[officename] Writer.
 
   
   
 
-  Icon
+  Icon Spreadsheet
 
 
   Spreadsheet
 
 
-  Creates 
a new spreadsheet document in $[officename] Calc.
+  
+  Creates 
a spreadsheet document in $[officename] Calc.
 
   
   
 
-  Icon
+  Icon Presentation
 
 
   Presentation
 
 
-  Creates 
a new presentation document in $[officename] Impress.
+  
+  Creates 
a presentation document in $[officename] Impress.
 
   
   
 
-  Icon
+  Icon Drawing
 
 
   Drawing
 
   
-Creates a new drawing document in $[officename] 
Draw.
+
+Creates a drawing document in $[officename] Draw.
 
   
   
 
-  Icon
+  Icon Formula
 
 
-  Database
+  Formula
 
-
-  Opens the 
Database Wizard 
to create a database 
file.
+  
+
+Creates a formula document in $[officename] Math.
 
   
   
 
-  Icon
+  Icon Database
 
 
-  HTML 
Document
+  Database
 
 
-  Creates 
a new HTML document.
+  
+  
+  Opens the 
Database Wizard 
to create a database 
file.
 
   
   
 
-  Icon
+  Icon HTML Document
 
 
-  XML Form 
Document
+  HTML 
Document
 
 
-  Creates a 
new XForms 
document.
+
+  Creates 
a HTML document.
 
   
   
 
-  Icon
+  Icon XML Form Document
 
 
-  Master 
Document
+  XML Form 
Document
 
 
-  Creates 
a new master 
document.
+  
+  Creates a 
XForms document.
 
   
   
 
-  Icon
+  Icon Labels
 
 
-  Formula
+  Labels
 
-  
-Creates a new formula document in $[officename] 
Math.
+
+  
+  Opens 
the Labels dialog where you can set the options 
for your labels, and then creates a text document for the labels in 
$[officename] Writer.
 
   
   
 
-  Icon
+  Icon Business 
Cards
 
 
-  Labels
+  Business 
Cards
 
 
-  Opens 
the Labels dialog where you can set the options 
for your labels, and then creates a new text document for the labels in 
$[officename] Writer.
+  
+  Opens 
the Business Cards dialog where you can set the options 
for your business cards, and then creates a text document in $[officename] 
Writer.
 
   
   
 
-  Icon
+  Icon Master 
Document
 
 
-  Business 
Cards
+  Master 
Document
 
 
-  Opens 
the Business Cards dialog where you can set the options 
for your business cards, and then creates a new text document in $[officename] 
Writer.
+  
+  Creates 
a master 
document.
 
   
   
 
-  Icon
+  Icon Templates
 
 
   Templates
 
 
-  Creates 
a new document using an existing template.
+  
+  Creates 
a document using an existing template.
 
   
 
 
   Opening documents
 
-
-  Creates a new text document in $[officename] 
Writer.
-
-  Creates a new spreadsheet document in $[officename] 
Calc.
-
-  Creates a new presentation document in 
$[officename] Impress.
-
-  Creates a new drawing document in $[officename] 
Draw.
-
-  
-Opens the Database Wizard to create a database 
file.
-  
-Creates a new HTML document.
-
-  Creates a new XForms document.
-
-  Creates a new master document.
-
-  Creates a new formula document in $[officename] 
Math.
-
-  Opens the Labels dialog where you can 
set the options for your lab

[Libreoffice-commits] core.git: helpcontent2

2022-11-21 Thread Bogdan B (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2420ef3c349fb323cc5b28a0d00b2234098f34b4
Author: Bogdan B 
AuthorDate: Mon Nov 21 21:31:46 2022 +0200
Commit: Gerrit Code Review 
CommitDate: Mon Nov 21 20:31:46 2022 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to 9a51c0944dd694febb2c007f497c22ec57d159aa
  - tdf#152057 Complete revision of shared/01/0101.xhp

Change-Id: Ib3bbc1c9660e7102bdcd4eb2d0573903bf4cf195
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/142689
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/helpcontent2 b/helpcontent2
index b60b4ebbd128..9a51c0944dd6 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit b60b4ebbd1289522a96a0ad6e344a9f6a77d78c3
+Subproject commit 9a51c0944dd694febb2c007f497c22ec57d159aa


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

2022-11-21 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtkframe.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit dcb13565119faa3bfecfb487230bac02d73509b2
Author: Caolán McNamara 
AuthorDate: Mon Nov 21 16:27:59 2022 +
Commit: Caolán McNamara 
CommitDate: Mon Nov 21 20:48:47 2022 +0100

fix a comment typo

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

diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx
index 214262c6db11..8ae708ad99b5 100644
--- a/vcl/unx/gtk3/gtkframe.cxx
+++ b/vcl/unx/gtk3/gtkframe.cxx
@@ -3272,7 +3272,7 @@ void GtkSalFrame::DrawingAreaScroll(double delta_x, 
double delta_y, int nEventX,
 aEvent.mnY = nEventY;
 aEvent.mnCode = GetMouseModCode(nState);
 
-// rhbz#1344042 "Traditionally" in gtk3 we tool a single up/down event as
+// rhbz#1344042 "Traditionally" in gtk3 we took a single up/down event as
 // equating to 3 scroll lines and a delta of 120. So scale the delta here
 // by 120 where a single mouse wheel click is an incoming delta_x of 1
 // and divide that by 40 to get the number of scroll lines


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

2022-11-21 Thread Caolán McNamara (via logerrit)
 editeng/source/editeng/impedit4.cxx |3 +++
 vcl/source/gdi/metaact.cxx  |1 +
 2 files changed, 4 insertions(+)

New commits:
commit ff0d0d0797701e38afb4f6d48486c5cd45f142cf
Author: Caolán McNamara 
AuthorDate: Mon Nov 21 09:55:48 2022 +
Commit: Caolán McNamara 
CommitDate: Mon Nov 21 20:49:35 2022 +0100

add some checks for OpenSymbol

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

diff --git a/editeng/source/editeng/impedit4.cxx 
b/editeng/source/editeng/impedit4.cxx
index 9f2b617428fa..5affeff55455 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -363,7 +363,10 @@ ErrCode ImpEditEngine::WriteRTF( SvStream& rOutput, 
EditSelection aSel )
 // on export what encoding we claim to use for these
 // fonts.
 if (IsOpenSymbol(pFontItem->GetFamilyName()))
+{
+SAL_WARN_IF(eChrSet == RTL_TEXTENCODING_SYMBOL, "editeng", 
"OpenSymbol should not have charset of RTL_TEXTENCODING_SYMBOL in new 
documents");
 eChrSet = RTL_TEXTENCODING_UTF8;
+}
 DBG_ASSERT( eChrSet != 9, "SystemCharSet?!" );
 if( RTL_TEXTENCODING_DONTKNOW == eChrSet )
 eChrSet = osl_getThreadTextEncoding();
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index cc92677c72b7..ef32bc0f3fb3 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -1686,6 +1686,7 @@ MetaFontAction::MetaFontAction( vcl::Font aFont ) :
 if ( IsOpenSymbol( maFont.GetFamilyName() )
 && ( maFont.GetCharSet() != RTL_TEXTENCODING_UNICODE ) )
 {
+SAL_WARN_IF(maFont.GetCharSet() == RTL_TEXTENCODING_SYMBOL, "vcl", 
"OpenSymbol should not have charset of RTL_TEXTENCODING_SYMBOL in new 
documents");
 maFont.SetCharSet( RTL_TEXTENCODING_UNICODE );
 }
 }


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

2022-11-21 Thread Bogdan B (via logerrit)
 source/text/shared/01/01010303.xhp   |3 ---
 source/text/shared/01/01010304.xhp   |3 ---
 source/text/shared/optionen/01010100.xhp |6 ++
 3 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 175750251cc83397e714586617681414316adf57
Author: Bogdan B 
AuthorDate: Sat Nov 19 18:41:57 2022 +0100
Commit: Olivier Hallot 
CommitDate: Mon Nov 21 20:50:52 2022 +0100

tdf#152127 Change order for Country/State

The country was not included into location in shared/optionen/01010100.xhp, 
just the state.
It is possible that there are files where country need to be removed, being 
now included in shared/optionen/01010100.xhp. I will take care of that in the 
next commits, when I will found them.

Change-Id: Ie7ac4deb9a7c0e1d3c4a03dda2e2b348a3aeb585
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/142923
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/source/text/shared/01/01010303.xhp 
b/source/text/shared/01/01010303.xhp
index 92262fcb50..36fa607f9f 100644
--- a/source/text/shared/01/01010303.xhp
+++ b/source/text/shared/01/01010303.xhp
@@ -46,9 +46,6 @@
 Initials 2
   Enter the initials of the 
person, whom you want to use as a second contact.
 
-
-Country
-  Enter the name of the country 
in which you live.
 
 
 Profession
diff --git a/source/text/shared/01/01010304.xhp 
b/source/text/shared/01/01010304.xhp
index 2a01307ece..de1db7d56f 100644
--- a/source/text/shared/01/01010304.xhp
+++ b/source/text/shared/01/01010304.xhp
@@ -48,9 +48,6 @@
 Slogan
   Enter the slogan of your 
company.
 
-
-Country
-  Enter the name of the country 
where your business is located.
 
 
 Phone
diff --git a/source/text/shared/optionen/01010100.xhp 
b/source/text/shared/optionen/01010100.xhp
index 35ed809b6a..63c5ea860b 100644
--- a/source/text/shared/optionen/01010100.xhp
+++ b/source/text/shared/optionen/01010100.xhp
@@ -92,6 +92,12 @@
 
 City
 Type the city where you live.
+
+
+
+
+Country
+Type your country.
 
 
 


[Libreoffice-commits] core.git: helpcontent2

2022-11-21 Thread Bogdan B (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 26ad69b87ea705d634595899df983001a26b2399
Author: Bogdan B 
AuthorDate: Mon Nov 21 20:50:54 2022 +0100
Commit: Gerrit Code Review 
CommitDate: Mon Nov 21 20:50:54 2022 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to 175750251cc83397e714586617681414316adf57
  - tdf#152127 Change order for Country/State

The country was not included into location in 
shared/optionen/01010100.xhp, just the state.
It is possible that there are files where country need to be removed, 
being now included in shared/optionen/01010100.xhp. I will take care of that in 
the next commits, when I will found them.

Change-Id: Ie7ac4deb9a7c0e1d3c4a03dda2e2b348a3aeb585
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/142923
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/helpcontent2 b/helpcontent2
index 9a51c0944dd6..175750251cc8 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 9a51c0944dd694febb2c007f497c22ec57d159aa
+Subproject commit 175750251cc83397e714586617681414316adf57


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - filter/source sd/qa

2022-11-21 Thread Marco Cecchetti (via logerrit)
 filter/source/svg/presentation_engine.js |  141 ---
 filter/source/svg/svgexport.cxx  |   12 +-
 filter/source/svg/svgwriter.cxx  |   42 +++--
 sd/qa/unit/SVGExportTests.cxx|   18 +--
 4 files changed, 88 insertions(+), 125 deletions(-)

New commits:
commit 5a30e56b51b1d14151859e2f710fe822156d287c
Author: Marco Cecchetti 
AuthorDate: Mon Nov 21 16:43:34 2022 +0100
Commit: Andras Timar 
CommitDate: Mon Nov 21 20:54:35 2022 +0100

svg export filter: text fields not handled correctly

New solution for fixing text field issues:

- small text field are not substituted with the right content because
the placeholder text span several lines
- copy of standard text fields embedded in the default master page are
not substitute with the right content.

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

diff --git a/filter/source/svg/presentation_engine.js 
b/filter/source/svg/presentation_engine.js
index 08ca59498dfe..def2e947ad36 100644
--- a/filter/source/svg/presentation_engine.js
+++ b/filter/source/svg/presentation_engine.js
@@ -4464,13 +4464,13 @@ var aOOOAttrTextAdjust = 'text-adjust';
 // element class names
 var aClipPathGroupClassName = 'ClipPathGroup';
 var aPageClassName = 'Page';
-var aSlideNumberClassName = 'Slide_Number';
-var aDateTimeClassName = 'Date/Time';
+var aSlideNumberClassName = 'PageNumber';
+var aDateTimeClassName = 'DateTime';
 var aFooterClassName = 'Footer';
 var aHeaderClassName = 'Header';
 var aDateClassName = 'Date';
 var aTimeClassName = 'Time';
-var aSlideNameClassName='SlideName';
+var aSlideNameClassName='PageName';
 
 // Creating a namespace dictionary.
 var NSS = {};
@@ -4785,15 +4785,6 @@ function getRandomInt( nMax )
 return Math.floor( Math.random() * nMax );
 }
 
-function isTextFieldElement( aElement ) // eslint-disable-line no-unused-vars
-{
-var sClassName = aElement.getAttribute( 'class' );
-return ( sClassName === aSlideNumberClassName ) ||
-   ( sClassName === aFooterClassName ) ||
-   ( sClassName === aHeaderClassName ) ||
-   ( sClassName === aDateTimeClassName );
-}
-
 
 /*
  ** Debug Utilities **
@@ -5192,10 +5183,11 @@ initPlaceholderElements : function()
 for( ; i < aPlaceholderList.length; ++i )
 {
 var aPlaceholderElem = aPlaceholderList[i];
-var sContent = aPlaceholderElem.textContent;
-if( sContent === '' )
+var sClass = aPlaceholderElem.getAttribute('class');
+var sFieldType = sClass.split(' ')[1];
+if( sFieldType ===  aDateClassName)
 aPlaceholderElem.textContent = new Date().toLocaleDateString();
-else if( sContent === '' )
+else if( sFieldType === aTimeClassName )
 aPlaceholderElem.textContent = new Date().toLocaleTimeString();
 }
 },
@@ -5376,53 +5368,43 @@ getSlideAnimationsRoot : function()
 
 }; // end MetaSlide prototype
 
-function getTextFieldType ( elem )
+function removeRedundantParagraphFromTextFieldShape( aObject )
 {
-var sFieldType = null;
-var sClass = elem.getAttribute('class');
-if( sClass == 'TextShape' )
+var aTextElem = getElementByClassName( aObject, 'SVGTextShape' );
+if( aTextElem )
 {
-var aPlaceholderElement = getElementByClassName( elem, 
'PlaceholderText' );
-if (aPlaceholderElement)
+var aPlaceholderElement = getElementsByClassName(aTextElem, 
'PlaceholderText');
+if( aPlaceholderElement )
 {
-var sContent = aPlaceholderElement.textContent
-if (sContent === '')
-sFieldType = aSlideNumberClassName;
-else if (sContent === '')
-sFieldType = aDateTimeClassName;
-else if (sContent === '')
-sFieldType = aDateClassName;
-else if (sContent === '')
-sFieldType = aTimeClassName;
-else if (sContent === '')
-sFieldType = aSlideNameClassName;
-else if (sContent === '')
-sFieldType = aFooterClassName;
-else if (sContent === '')
-sFieldType = aHeaderClassName;
+var aTextParagraphSet = getElementsByClassName(aTextElem, 
'TextParagraph');
+// When the text field width is too small, the placeholder text 
spans several lines.
+// We remove all text lines but the first one which is used as a 
placeholder.
+// This is a workaround but it should work in the majority of 
cases.
+// A complete solution needs to support svg text wrapping.
+if( aTextParagraphSet.length > 1 )
+{
+var i = aTextParagraphSet.length;
+while( i > 1 )
+{
+aTextElem.

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - filter/source sd/qa

2022-11-21 Thread Marco Cecchetti (via logerrit)
 filter/source/svg/presentation_engine.js |  141 ---
 filter/source/svg/svgexport.cxx  |   12 +-
 filter/source/svg/svgwriter.cxx  |   42 +++--
 sd/qa/unit/SVGExportTests.cxx|   18 +--
 4 files changed, 88 insertions(+), 125 deletions(-)

New commits:
commit 392bffdf3dced101716904ef8231426b3c3b64e7
Author: Marco Cecchetti 
AuthorDate: Mon Nov 21 16:43:34 2022 +0100
Commit: Andras Timar 
CommitDate: Mon Nov 21 20:54:56 2022 +0100

svg export filter: text fields not handled correctly

New solution for fixing text field issues:

- small text field are not substituted with the right content because
the placeholder text span several lines
- copy of standard text fields embedded in the default master page are
not substitute with the right content.

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

diff --git a/filter/source/svg/presentation_engine.js 
b/filter/source/svg/presentation_engine.js
index dbfe2ab0f914..a3ef0ee4550b 100644
--- a/filter/source/svg/presentation_engine.js
+++ b/filter/source/svg/presentation_engine.js
@@ -4464,13 +4464,13 @@ var aOOOAttrTextAdjust = 'text-adjust';
 // element class names
 var aClipPathGroupClassName = 'ClipPathGroup';
 var aPageClassName = 'Page';
-var aSlideNumberClassName = 'Slide_Number';
-var aDateTimeClassName = 'Date/Time';
+var aSlideNumberClassName = 'PageNumber';
+var aDateTimeClassName = 'DateTime';
 var aFooterClassName = 'Footer';
 var aHeaderClassName = 'Header';
 var aDateClassName = 'Date';
 var aTimeClassName = 'Time';
-var aSlideNameClassName='SlideName';
+var aSlideNameClassName='PageName';
 
 // Creating a namespace dictionary.
 var NSS = {};
@@ -4785,15 +4785,6 @@ function getRandomInt( nMax )
 return Math.floor( Math.random() * nMax );
 }
 
-function isTextFieldElement( aElement ) // eslint-disable-line no-unused-vars
-{
-var sClassName = aElement.getAttribute( 'class' );
-return ( sClassName === aSlideNumberClassName ) ||
-   ( sClassName === aFooterClassName ) ||
-   ( sClassName === aHeaderClassName ) ||
-   ( sClassName === aDateTimeClassName );
-}
-
 
 /*
  ** Debug Utilities **
@@ -5192,10 +5183,11 @@ initPlaceholderElements : function()
 for( ; i < aPlaceholderList.length; ++i )
 {
 var aPlaceholderElem = aPlaceholderList[i];
-var sContent = aPlaceholderElem.textContent;
-if( sContent === '' )
+var sClass = aPlaceholderElem.getAttribute('class');
+var sFieldType = sClass.split(' ')[1];
+if( sFieldType ===  aDateClassName)
 aPlaceholderElem.textContent = new Date().toLocaleDateString();
-else if( sContent === '' )
+else if( sFieldType === aTimeClassName )
 aPlaceholderElem.textContent = new Date().toLocaleTimeString();
 }
 },
@@ -5376,53 +5368,43 @@ getSlideAnimationsRoot : function()
 
 }; // end MetaSlide prototype
 
-function getTextFieldType ( elem )
+function removeRedundantParagraphFromTextFieldShape( aObject )
 {
-var sFieldType = null;
-var sClass = elem.getAttribute('class');
-if( sClass == 'TextShape' )
+var aTextElem = getElementByClassName( aObject, 'SVGTextShape' );
+if( aTextElem )
 {
-var aPlaceholderElement = getElementByClassName( elem, 
'PlaceholderText' );
-if (aPlaceholderElement)
+var aPlaceholderElement = getElementsByClassName(aTextElem, 
'PlaceholderText');
+if( aPlaceholderElement )
 {
-var sContent = aPlaceholderElement.textContent
-if (sContent === '')
-sFieldType = aSlideNumberClassName;
-else if (sContent === '')
-sFieldType = aDateTimeClassName;
-else if (sContent === '')
-sFieldType = aDateClassName;
-else if (sContent === '')
-sFieldType = aTimeClassName;
-else if (sContent === '')
-sFieldType = aSlideNameClassName;
-else if (sContent === '')
-sFieldType = aFooterClassName;
-else if (sContent === '')
-sFieldType = aHeaderClassName;
+var aTextParagraphSet = getElementsByClassName(aTextElem, 
'TextParagraph');
+// When the text field width is too small, the placeholder text 
spans several lines.
+// We remove all text lines but the first one which is used as a 
placeholder.
+// This is a workaround but it should work in the majority of 
cases.
+// A complete solution needs to support svg text wrapping.
+if( aTextParagraphSet.length > 1 )
+{
+var i = aTextParagraphSet.length;
+while( i > 1 )
+{
+aTextElem.

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

2022-11-21 Thread Bogdan B (via logerrit)
 source/text/shared/01/01010203.xhp |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit ef74e307a6dfc74571727c42ee3b9f1e901451b9
Author: Bogdan B 
AuthorDate: Sat Nov 19 06:12:45 2022 +0100
Commit: Olivier Hallot 
CommitDate: Mon Nov 21 21:07:24 2022 +0100

tdf#152121 Improve row and column description for label options

Change-Id: I8604f7d40a7a06c6a6da9314c52321b74194c3a2
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/142920
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/source/text/shared/01/01010203.xhp 
b/source/text/shared/01/01010203.xhp
index 8e347ced5c..6a9f93f7cb 100644
--- a/source/text/shared/01/01010203.xhp
+++ b/source/text/shared/01/01010203.xhp
@@ -45,10 +45,10 @@
   Prints a single label or business card on a 
page.
 
 Column
-  Enter the 
number of labels or business cards that you want to have in a row on your 
page.
+  Enter the 
column in which you want to place your single label or business 
card.
 
 Row
-  Enter the 
number of rows of labels or business cards that you want to have on your 
page.
+  Enter the 
row in which you want to place your single label or business 
card.
 
 Synchronize contents
   Allows you to edit a 
single label or business card and updates the contents of the remaining labels 
or business cards on the page when you click the Synchronize 
Labels button.


[Libreoffice-commits] core.git: helpcontent2

2022-11-21 Thread Bogdan B (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 15a4b25ab7c2e49bf468df7582043a5c1ed6d24f
Author: Bogdan B 
AuthorDate: Mon Nov 21 21:07:26 2022 +0100
Commit: Gerrit Code Review 
CommitDate: Mon Nov 21 21:07:26 2022 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to ef74e307a6dfc74571727c42ee3b9f1e901451b9
  - tdf#152121 Improve row and column description for label options

Change-Id: I8604f7d40a7a06c6a6da9314c52321b74194c3a2
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/142920
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/helpcontent2 b/helpcontent2
index 175750251cc8..ef74e307a6df 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 175750251cc83397e714586617681414316adf57
+Subproject commit ef74e307a6dfc74571727c42ee3b9f1e901451b9


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

2022-11-21 Thread Bogdan B (via logerrit)
 source/text/shared/01/01010201.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit cd779009d25f499ae7e8af70ac4b110e43efec83
Author: Bogdan B 
AuthorDate: Fri Nov 18 18:56:59 2022 +0100
Commit: Olivier Hallot 
CommitDate: Mon Nov 21 21:09:21 2022 +0100

tdf#152112 Include "labels grid" in Info description

Change-Id: I4978961d3373753754438a5b383fd6af293dc530
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/142918
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/source/text/shared/01/01010201.xhp 
b/source/text/shared/01/01010201.xhp
index 0994cc9c5b..ebb39cf42e 100644
--- a/source/text/shared/01/01010201.xhp
+++ b/source/text/shared/01/01010201.xhp
@@ -72,6 +72,6 @@
 Type
   Select the size format that you 
want to use. The available formats depend on the brand on what you selected in 
the Brand list. If you want to use a custom label format, select 
[User], and then click the Format tab 
to define the format.
 Info
-  The paper 
type and the dimensions of the label are displayed at the bottom of the 
Format area.
+  The paper 
type, the dimensions of the label and the labels grid are displayed at the 
bottom of the Format area.
 
 


[Libreoffice-commits] core.git: helpcontent2

2022-11-21 Thread Bogdan B (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2183dd48aa018a79b00c60f463f68acd7d8761d1
Author: Bogdan B 
AuthorDate: Mon Nov 21 21:09:23 2022 +0100
Commit: Gerrit Code Review 
CommitDate: Mon Nov 21 21:09:23 2022 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to cd779009d25f499ae7e8af70ac4b110e43efec83
  - tdf#152112 Include "labels grid" in Info description

Change-Id: I4978961d3373753754438a5b383fd6af293dc530
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/142918
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/helpcontent2 b/helpcontent2
index ef74e307a6df..cd779009d25f 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit ef74e307a6dfc74571727c42ee3b9f1e901451b9
+Subproject commit cd779009d25f499ae7e8af70ac4b110e43efec83


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

2022-11-21 Thread Xisco Fauli (via logerrit)
 sc/qa/unit/helper/qahelper.cxx |   19 ---
 sc/qa/unit/helper/qahelper.hxx |2 --
 sc/qa/unit/ucalc_sharedformula.cxx |   12 ++--
 3 files changed, 6 insertions(+), 27 deletions(-)

New commits:
commit 780bc10c439aad5bbcbd2434f16719ba0cd65b35
Author: Xisco Fauli 
AuthorDate: Mon Nov 21 14:46:39 2022 +0100
Commit: Xisco Fauli 
CommitDate: Mon Nov 21 21:11:58 2022 +0100

sc: remove duplicated code

Change-Id: Ice7d74263954c49a341f427c470f992225a40762
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143033
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx
index 17f169b9e090..28d2b1243e8c 100644
--- a/sc/qa/unit/helper/qahelper.cxx
+++ b/sc/qa/unit/helper/qahelper.cxx
@@ -444,25 +444,6 @@ ScTokenArray* getTokens(ScDocument& rDoc, const ScAddress& 
rPos)
 return pCell->GetCode();
 }
 
-bool checkFormula(ScDocument& rDoc, const ScAddress& rPos, const char* 
pExpected)
-{
-ScTokenArray* pCode = getTokens(rDoc, rPos);
-if (!pCode)
-{
-cerr << "Empty token array." << endl;
-return false;
-}
-
-OUString aFormula = toString(rDoc, rPos, *pCode, rDoc.GetGrammar());
-if (aFormula != OUString::createFromAscii(pExpected))
-{
-cerr << "Formula '" << pExpected << "' expected, but '" << aFormula << 
"' found" << endl;
-return false;
-}
-
-return true;
-}
-
 bool checkOutput(
 const ScDocument* pDoc, const ScRange& aOutRange,
 const std::vector>& aCheck, const char* pCaption )
diff --git a/sc/qa/unit/helper/qahelper.hxx b/sc/qa/unit/helper/qahelper.hxx
index 6ad03dc1fa67..b9a51701e26b 100644
--- a/sc/qa/unit/helper/qahelper.hxx
+++ b/sc/qa/unit/helper/qahelper.hxx
@@ -111,8 +111,6 @@ SCQAHELPER_DLLPUBLIC std::ostream& operator<<(std::ostream& 
rStrm, const ScRange
 
 SCQAHELPER_DLLPUBLIC std::ostream& operator<<(std::ostream& rStrm, const 
OpCode& rCode);
 
-bool checkFormula(ScDocument& rDoc, const ScAddress& rPos, const char* 
pExpected);
-
 SCQAHELPER_DLLPUBLIC bool checkOutput(
 const ScDocument* pDoc, const ScRange& aOutRange,
 const std::vector>& aCheck, const char* pCaption 
);
diff --git a/sc/qa/unit/ucalc_sharedformula.cxx 
b/sc/qa/unit/ucalc_sharedformula.cxx
index 11d4132ec80d..0d2275c42b31 100644
--- a/sc/qa/unit/ucalc_sharedformula.cxx
+++ b/sc/qa/unit/ucalc_sharedformula.cxx
@@ -537,9 +537,9 @@ void TestSharedFormula::testSharedFormulasRefUpdateMove()
 CPPUNIT_ASSERT_EQUAL(3.0, m_pDoc->GetValue(ScAddress(1,2,0)));
 
 // The formulas should have been adjusted for the move.
-CPPUNIT_ASSERT(checkFormula(*m_pDoc, ScAddress(2,1,0), "R[-1]C[-1]"));
-CPPUNIT_ASSERT(checkFormula(*m_pDoc, ScAddress(2,2,0), "R[-1]C[-1]"));
-CPPUNIT_ASSERT(checkFormula(*m_pDoc, ScAddress(2,3,0), "R[-1]C[-1]"));
+ASSERT_FORMULA_EQUAL(*m_pDoc, ScAddress(2,1,0), "R[-1]C[-1]", "Wrong 
formula");
+ASSERT_FORMULA_EQUAL(*m_pDoc, ScAddress(2,2,0), "R[-1]C[-1]", "Wrong 
formula");
+ASSERT_FORMULA_EQUAL(*m_pDoc, ScAddress(2,3,0), "R[-1]C[-1]", "Wrong 
formula");
 
 SfxUndoManager* pUndoMgr = m_pDoc->GetUndoManager();
 CPPUNIT_ASSERT(pUndoMgr);
@@ -551,9 +551,9 @@ void TestSharedFormula::testSharedFormulasRefUpdateMove()
 CPPUNIT_ASSERT_EQUAL(3.0, m_pDoc->GetValue(ScAddress(1,3,0)));
 
 // And the formulas should have been re-adjusted to their original 
references.
-CPPUNIT_ASSERT(checkFormula(*m_pDoc, ScAddress(2,1,0), "RC[-1]"));
-CPPUNIT_ASSERT(checkFormula(*m_pDoc, ScAddress(2,2,0), "RC[-1]"));
-CPPUNIT_ASSERT(checkFormula(*m_pDoc, ScAddress(2,3,0), "RC[-1]"));
+ASSERT_FORMULA_EQUAL(*m_pDoc, ScAddress(2,1,0), "RC[-1]", "Wrong formula");
+ASSERT_FORMULA_EQUAL(*m_pDoc, ScAddress(2,2,0), "RC[-1]", "Wrong formula");
+ASSERT_FORMULA_EQUAL(*m_pDoc, ScAddress(2,3,0), "RC[-1]", "Wrong formula");
 
 m_pDoc->DeleteTab(0);
 }


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

2022-11-21 Thread Xisco Fauli (via logerrit)
 sc/qa/unit/helper/qahelper.cxx |9 
 sc/qa/unit/helper/qahelper.hxx |1 
 sc/qa/unit/ucalc_copypaste.cxx | 3227 +
 3 files changed, 1667 insertions(+), 1570 deletions(-)

New commits:
commit cb6e1d160d946aeb4693b24236e5b83d8fcf0c3c
Author: Xisco Fauli 
AuthorDate: Mon Nov 21 15:05:12 2022 +0100
Commit: Xisco Fauli 
CommitDate: Mon Nov 21 21:14:43 2022 +0100

CppunitTest_sc_ucalc_copypaste: use GetFormula directly

Change-Id: Id23a07d3d7442119676f8628d1e394914461b678
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143034
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx
index 28d2b1243e8c..6fd30e2398a4 100644
--- a/sc/qa/unit/helper/qahelper.cxx
+++ b/sc/qa/unit/helper/qahelper.cxx
@@ -872,17 +872,12 @@ OUString 
ScSimpleBootstrapFixture::getRangeByName(ScDocument* pDoc, const OUStri
 return pName->GetSymbol(pDoc->GetGrammar());
 }
 
-OUString ScSimpleBootstrapFixture::getFormula(ScDocument* pDoc, SCCOL nCol, 
SCROW nRow, SCTAB nTab)
-{
-return pDoc->GetFormula(nCol, nRow, nTab);
-}
-
 #if CALC_DEBUG_OUTPUT != 0
 void ScSimpleBootstrapFixture::printFormula(ScDocument* pDoc, SCCOL nCol, 
SCROW nRow, SCTAB nTab, const char* pCaption)
 {
 if (pCaption != nullptr)
 cout << pCaption << ", ";
-cout << nCol << "/" << nRow << ": " << getFormula(pDoc, nCol, nRow, nTab);
+cout << nCol << "/" << nRow << ": " << pDoc->GetFormula(nCol, nRow, nTab);
 cout << endl;
 }
 #else
@@ -902,7 +897,7 @@ void ScSimpleBootstrapFixture::printRange(ScDocument* pDoc, 
const ScRange& rRang
 {
 ScAddress aPos(nCol, nRow, rRange.aStart.Tab());
 ScRefCellValue aCell(*pDoc, aPos);
-OUString aVal = printFormula ? getFormula(pDoc, nCol, nRow, 
rRange.aStart.Tab())
+OUString aVal = printFormula ? pDoc->GetFormula(nCol, nRow, 
rRange.aStart.Tab())
  : 
ScCellFormat::GetOutputString(*pDoc, aPos, aCell);
 printer.set(nRow - nRow1, nCol - nCol1, aVal);
 }
diff --git a/sc/qa/unit/helper/qahelper.hxx b/sc/qa/unit/helper/qahelper.hxx
index b9a51701e26b..9bdd10d405d5 100644
--- a/sc/qa/unit/helper/qahelper.hxx
+++ b/sc/qa/unit/helper/qahelper.hxx
@@ -194,7 +194,6 @@ public:
 bool insertRangeNames(ScDocument* pDoc, ScRangeName* pNames, const 
RangeNameDef* p,
const RangeNameDef* pEnd);
 OUString getRangeByName(ScDocument* pDoc, const OUString& aRangeName);
-OUString getFormula(ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab);
 void printFormula(ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab,
const char* pCaption = nullptr);
 void printRange(ScDocument* pDoc, const ScRange& rRange, const char* 
pCaption,
diff --git a/sc/qa/unit/ucalc_copypaste.cxx b/sc/qa/unit/ucalc_copypaste.cxx
index 0dde661423ff..87b9416086ff 100644
--- a/sc/qa/unit/ucalc_copypaste.cxx
+++ b/sc/qa/unit/ucalc_copypaste.cxx
@@ -312,7 +312,6 @@ private:
 
 void printValuesAndFormulasInRange(ScDocument* pDoc, const ScRange& rRange,
const OString& rCaption);
-OUString getFormula(SCCOL nCol, SCROW nRow, SCTAB nTab);
 OUString getRangeByName(const OUString& aRangeName);
 ScAddress setNote(SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString 
noteText);
 OUString getNote(SCCOL nCol, SCROW nRow, SCTAB nTab);
@@ -339,11 +338,6 @@ void 
TestCopyPaste::printValuesAndFormulasInRange(ScDocument* pDoc, const ScRang
 printRange(pDoc, rRange, rCaption, true);
 }
 
-OUString TestCopyPaste::getFormula(SCCOL nCol, SCROW nRow, SCTAB nTab)
-{
-return ScSimpleBootstrapFixture::getFormula(m_pDoc, nCol, nRow, nTab);
-}
-
 OUString TestCopyPaste::getRangeByName(const OUString& aRangeName)
 {
 return ScSimpleBootstrapFixture::getRangeByName(m_pDoc, aRangeName);
@@ -910,12 +904,14 @@ void TestCopyPaste::testCopyPasteSpecialAsLinkTranspose()
 // Check pasted content to make sure they reference the correct cells.
 ScFormulaCell* pFC = m_pDoc->GetFormulaCell(ScAddress(1, 1, destSheet));
 CPPUNIT_ASSERT_MESSAGE("This should be a formula cell B2.", pFC);
-CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell B2", OUString("=$Sheet1.$A$1"), 
getFormula(1, 1, destSheet));
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell B2", OUString("=$Sheet1.$A$1"),
+ m_pDoc->GetFormula(1, 1, destSheet));
 CPPUNIT_ASSERT_EQUAL(1.0, pFC->GetValue());
 
 pFC = m_pDoc->GetFormulaCell(ScAddress(2, 1, destSheet));
 CPPUNIT_ASSERT_MESSAGE("This should be a formula cell.", pFC);
-CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell C2", OUString("=$Sheet1.$A$2"), 
getFormula(2, 1, destSheet));
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell C2", OUString("=$Sheet1.$A$2"),
+ m_pDoc->GetFormula(2, 1, destSheet));
 C

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

2022-11-21 Thread Caolán McNamara (via logerrit)
 source/text/shared/optionen/01010100.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 58d932b2c300b44b2c1807478626a4b3060371b4
Author: Caolán McNamara 
AuthorDate: Mon Nov 21 20:50:04 2022 +
Commit: Caolán McNamara 
CommitDate: Mon Nov 21 21:52:28 2022 +0100

Error: Duplicated entry. ID = par_id3150441  LANG = en-US

in File helpcontent2/source/text/shared/optionen/01010100.xhp

Change-Id: I9a2ecd372885cb09707e6e55e2ec2ab5527181e9
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/143076
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/source/text/shared/optionen/01010100.xhp 
b/source/text/shared/optionen/01010100.xhp
index 63c5ea860b..62ddd79d89 100644
--- a/source/text/shared/optionen/01010100.xhp
+++ b/source/text/shared/optionen/01010100.xhp
@@ -103,7 +103,7 @@
 
 
 State
-Type your state.
+Type your state.
 
 
 


[Libreoffice-commits] core.git: helpcontent2

2022-11-21 Thread Caolán McNamara (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 009e67a1579771e9bb711a2620a4ca71cdba79da
Author: Caolán McNamara 
AuthorDate: Mon Nov 21 20:52:31 2022 +
Commit: Gerrit Code Review 
CommitDate: Mon Nov 21 21:52:31 2022 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to 58d932b2c300b44b2c1807478626a4b3060371b4
  - Error: Duplicated entry. ID = par_id3150441  LANG = en-US

in File helpcontent2/source/text/shared/optionen/01010100.xhp

Change-Id: I9a2ecd372885cb09707e6e55e2ec2ab5527181e9
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/143076
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/helpcontent2 b/helpcontent2
index cd779009d25f..58d932b2c300 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit cd779009d25f499ae7e8af70ac4b110e43efec83
+Subproject commit 58d932b2c300b44b2c1807478626a4b3060371b4


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

2022-11-21 Thread Stephan Bergmann (via logerrit)
 source/text/shared/optionen/01010100.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit bcc251fddf6f5be88dc43fba34573d5e3b51a6dd
Author: Stephan Bergmann 
AuthorDate: Mon Nov 21 21:43:38 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Nov 21 22:05:17 2022 +0100

Fix duplicate ID

...introduced by 175750251cc83397e714586617681414316adf57 "tdf#152127
Change order for Country/State", causing

> [HPX] de/helpcontent2/source/text/shared/optionen
> Error: Duplicated entry. ID = par_id3150441  LANG = en-US in File 
lo/core/helpcontent2/source/text/shared/optionen/01010100.xhp

Change-Id: I28fdbda5b90f235381998c80664c4eb74fcadf7f
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/143074
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/source/text/shared/optionen/01010100.xhp 
b/source/text/shared/optionen/01010100.xhp
index 62ddd79d89..e8f0471d32 100644
--- a/source/text/shared/optionen/01010100.xhp
+++ b/source/text/shared/optionen/01010100.xhp
@@ -97,7 +97,7 @@
 
 
 Country
-Type your country.
+Type your country.
 
 
 


[Libreoffice-commits] core.git: helpcontent2

2022-11-21 Thread Stephan Bergmann (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c84655bf796fe3600f2ee5671b37e4844b129d0d
Author: Stephan Bergmann 
AuthorDate: Mon Nov 21 22:05:20 2022 +0100
Commit: Gerrit Code Review 
CommitDate: Mon Nov 21 22:05:20 2022 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to bcc251fddf6f5be88dc43fba34573d5e3b51a6dd
  - Fix duplicate ID

...introduced by 175750251cc83397e714586617681414316adf57 "tdf#152127
Change order for Country/State", causing

> [HPX] de/helpcontent2/source/text/shared/optionen
> Error: Duplicated entry. ID = par_id3150441  LANG = en-US in File 
lo/core/helpcontent2/source/text/shared/optionen/01010100.xhp

Change-Id: I28fdbda5b90f235381998c80664c4eb74fcadf7f
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/143074
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/helpcontent2 b/helpcontent2
index 58d932b2c300..bcc251fddf6f 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 58d932b2c300b44b2c1807478626a4b3060371b4
+Subproject commit bcc251fddf6f5be88dc43fba34573d5e3b51a6dd


[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - sd/source

2022-11-21 Thread Mike Kaganski (via logerrit)
 sd/source/ui/view/outlview.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e0b2fbd3848d0a8e97872604b6f9dcd2b7be2c63
Author: Mike Kaganski 
AuthorDate: Fri Nov 18 15:37:45 2022 +0300
Commit: Caolán McNamara 
CommitDate: Mon Nov 21 22:11:29 2022 +0100

Fix dynamic_cast after splitting OutputDevice and vcl::Window class 
hierarchies

... in commit 9090dc1f3b27195f5defd35586ac79357992be21 (split OutputDevice
from Window, May 17, 2021), which I desribed in tdf#152103.

Change-Id: I07d2be9a74939ad6a65bb9537bf7390ed4fca6a2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142942
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 2fa426da15a12e2a63554247e3c1c3f8c0ec5c24)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142926
Reviewed-by: Caolán McNamara 

diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index 5e598de483dc..c3b7a57ca81a 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -206,7 +206,7 @@ void OutlineView::AddWindowToPaintView(OutputDevice* pWin, 
vcl::Window* pWindow)
 {
 if (mpOutlinerViews[nView] == nullptr)
 {
-mpOutlinerViews[nView].reset( new OutlinerView(&mrOutliner, 
dynamic_cast< ::sd::Window* >(pWin)) );
+mpOutlinerViews[nView].reset( new OutlinerView(&mrOutliner, 
dynamic_cast< ::sd::Window* >(pWin->GetOwnerWindow())) );
 mpOutlinerViews[nView]->SetBackgroundColor( aWhiteColor );
 mrOutliner.InsertView(mpOutlinerViews[nView].get(), EE_APPEND);
 bAdded = true;


[Libreoffice-commits] core.git: configure.ac

2022-11-21 Thread Christian Lohmaier (via logerrit)
 configure.ac |  127 ---
 1 file changed, 35 insertions(+), 92 deletions(-)

New commits:
commit 97d6185ef18b97ce30206720567fab2994ef2b3d
Author: Christian Lohmaier 
AuthorDate: Mon Nov 21 14:51:32 2022 +0100
Commit: Christian Lohmaier 
CommitDate: Mon Nov 21 22:27:19 2022 +0100

macOS: simplify SDK handling, remove the upper limit of SDK

…both for building as well as for min-required version
The newer versions of XCode/the corresponding SDK it comes with didn't cause
any problems in the last years, and checking for a max-sdk version just 
causes
more work when working on a newer system, either forcing to have multiple
versions of Xcode around and switching between those for no reason, or 
always
patching configure to accept the currently used version when bisecting 
stuff.

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

diff --git a/configure.ac b/configure.ac
index 52476b46d14a..5e2fe435a222 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3430,60 +3430,34 @@ if test $_os = Darwin; then
 # The SDK in the currently selected Xcode should be found.
 
 AC_MSG_CHECKING([what macOS SDK to use])
-for macosx_sdk in 13.0 12.3 12.1 12.0 11.3 11.1 11.0 10.15 10.14; do
-MACOSX_SDK_PATH=`xcrun --sdk macosx${macosx_sdk} --show-sdk-path 2> 
/dev/null`
-if test -d "$MACOSX_SDK_PATH"; then
-break
-else
-MACOSX_SDK_PATH="`xcode-select 
-print-path`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${macosx_sdk}.sdk"
-if test -d "$MACOSX_SDK_PATH"; then
-break
-fi
-fi
-done
+# XCode only ships with a single SDK for a while now, and using older SDKs 
alongside is not
+# really supported anymore, instead you'd use different copies of Xcode, 
each with their own
+# SDK, and thus xcrun will pick the SDK that matches the currently 
selected Xcode version
+# also restricting the SDK version to "known good" versions doesn't seem 
necessary anyomre, the
+# problems that existed in the PPC days with target versions not being 
respected or random
+# failures seems to be a thing of the past or rather: limiting either the 
Xcode version or the
+# SDK version is enough, no need to do both...
+MACOSX_SDK_PATH=`xcrun --sdk macosx --show-sdk-path 2> /dev/null`
 if test ! -d "$MACOSX_SDK_PATH"; then
 AC_MSG_ERROR([Could not find an appropriate macOS SDK])
 fi
-
-AC_MSG_RESULT([macOS SDK $macosx_sdk at $MACOSX_SDK_PATH])
-MACOSX_SDK_BUILD_VERSION=$(xcodebuild -version -sdk "$MACOSX_SDK_PATH" 
ProductBuildVersion) 
-case $macosx_sdk in
-10.14)
-MACOSX_SDK_VERSION=101400
-;;
-10.15)
-MACOSX_SDK_VERSION=101500
-;;
-11.0)
-MACOSX_SDK_VERSION=11
-;;
-11.1)
-MACOSX_SDK_VERSION=110100
-;;
-11.3)
-MACOSX_SDK_VERSION=110300
-;;
-12.0)
-MACOSX_SDK_VERSION=12
-;;
-12.1)
-MACOSX_SDK_VERSION=120100
-;;
-12.3)
-MACOSX_SDK_VERSION=120300
-;;
-13.0)
-MACOSX_SDK_VERSION=13
-;;
-*)
-AC_MSG_ERROR([macOS SDK $macosx_sdk is not supported])
-;;
-esac
-
+macosx_sdk=`xcodebuild -version -sdk "$MACOSX_SDK_PATH" SDKVersion`
+MACOSX_SDK_BUILD_VERSION=$(xcodebuild -version -sdk "$MACOSX_SDK_PATH" 
ProductBuildVersion)
+# format changed between 10.9 and 10.10 - up to 10.9 it was just four 
digits (1090), starting
+# with macOS 10.10 it was switched to account for x.y.z with six digits, 
10.10 is 101000,
+# 10.10.2 is 101002
+# we don't target the lower versions anymore, so it doesn't matter that we 
don't generate the
+# correct version in case such an old SDK is specified, it will be 
rejected later anyway
+MACOSX_SDK_VERSION=$(echo $macosx_sdk | $AWK -F. '{ print 
$1*1+$2*100+$3 }')
+if test $MACOSX_SDK_VERSION -lt 101400; then
+AC_MSG_ERROR([macOS SDK $macosx_sdk is not supported, lowest supported 
version is 10.14])
+fi
 if test "$host_cpu" = arm64 -a $MACOSX_SDK_VERSION -lt 11; then
-AC_MSG_ERROR([macOS SDK $macosx_sdk is not supported for Apple 
Silicon])
+AC_MSG_ERROR([macOS SDK $macosx_sdk is not supported for Apple Silicon 
(need at least 11.0)])
 fi
+AC_MSG_RESULT([macOS SDK $macosx_sdk at $MACOSX_SDK_PATH])
 
+AC_MSG_CHECKING([what minimum version of macOS to require])
 if test "$with_macosx_version_min_required" = "" ; then
 if test "$host_cpu" = x86_64; then
 with_macosx_version_min_required="10.14";
@@ -3491,6 +3465,19 @@ if test $_os = Darwin; then
 with_macosx_version_min_required="11.0";
 fi
 fi
+# see same not

[Libreoffice-commits] core.git: configure.ac external/firebird external/libpng external/python3

2022-11-21 Thread Christian Lohmaier (via logerrit)
 configure.ac  |5 -
 external/firebird/ExternalProject_firebird.mk |5 -
 external/libpng/UnpackedTarball_libpng.mk |4 
 external/libpng/libpng-osx.patch.1|   16 
 external/python3/ExternalProject_python3.mk   |1 -
 5 files changed, 31 deletions(-)

New commits:
commit a7a766aa4119bf9616223d0de6587a3f30549eac
Author: Christian Lohmaier 
AuthorDate: Mon Nov 21 16:16:29 2022 +0100
Commit: Christian Lohmaier 
CommitDate: Mon Nov 21 22:35:33 2022 +0100

macOS (janitor): remove workarounds for no longer supported SDKs

since we won't accept anything lower than 10.14 on master (and 10.13 on
libreoffice-7-4 branch), we don't need those quirks anymore.

Change-Id: Ibc71a2ce7a0dc60769d03d477991b48fc99d534d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143040
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/configure.ac b/configure.ac
index 5e2fe435a222..26641bbc23ce 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12172,11 +12172,6 @@ if test "$enable_skia" != "no" -a "$build_skia" = 
"yes" -a -z "$DISABLE_GUI"; th
 SKIA_GPU=VULKAN
 AC_SUBST(SKIA_GPU)
 fi
-
-if test -n "$MAC_OS_X_VERSION_MIN_REQUIRED" && test 
"$MAC_OS_X_VERSION_MIN_REQUIRED" -lt "101200"; then
-SKIA_DISABLE_VMA_USE_STL_SHARED_MUTEX=1
-AC_SUBST(SKIA_DISABLE_VMA_USE_STL_SHARED_MUTEX)
-fi
 else
 AC_MSG_RESULT([no (freetype too old)])
 add_warning "freetype version is too old for Skia library, at least 
2.8.1 required, Skia support disabled"
diff --git a/external/firebird/ExternalProject_firebird.mk 
b/external/firebird/ExternalProject_firebird.mk
index 0419109e7156..29a71763600f 100644
--- a/external/firebird/ExternalProject_firebird.mk
+++ b/external/firebird/ExternalProject_firebird.mk
@@ -84,11 +84,6 @@ $(call gb_ExternalProject_get_state_target,firebird,build):
, \
--enable-shared --disable-static \
) \
-   $(if $(filter MACOSX,$(OS)), \
-   $(if $(filter 1, \
-   $(shell expr 
'$(MAC_OS_X_VERSION_MIN_REQUIRED)' \
-   '<' 101200)), \
-   ac_cv_func_clock_gettime=no)) \
$(if $(HAVE_LIBCPP),CXX='$(CXX) 
-D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR') \
&& LC_ALL=C $(MAKE) \
$(if $(ENABLE_DEBUG),Debug) SHELL='$(SHELL)' $(if 
$(filter LINUX,$(OS)),CXXFLAGS="$$CXXFLAGS -std=gnu++11") \
diff --git a/external/libpng/UnpackedTarball_libpng.mk 
b/external/libpng/UnpackedTarball_libpng.mk
index 2a8ad3f84406..dca4e4b5cfe9 100644
--- a/external/libpng/UnpackedTarball_libpng.mk
+++ b/external/libpng/UnpackedTarball_libpng.mk
@@ -15,8 +15,4 @@ $(eval $(call gb_UnpackedTarball_add_files,libpng,.,\
external/libpng/configs/pnglibconf.h \
 ))
 
-$(eval $(call gb_UnpackedTarball_add_patches,libpng,\
-   external/libpng/libpng-osx.patch.1 \
-))
-
 # vim: set noet sw=4 ts=4:
diff --git a/external/libpng/libpng-osx.patch.1 
b/external/libpng/libpng-osx.patch.1
deleted file mode 100644
index 387b3a8cc613..
--- a/external/libpng/libpng-osx.patch.1
+++ /dev/null
@@ -1,16 +0,0 @@
--*- Mode: Diff -*-
-
-Avoid warning: 'inflateValidate' is only available on macOS 10.13 or newer 
[-Wunguarded-availability-new]
-
 a/pngrutil.c
-+++ b/pngrutil.c
-@@ -422,7 +422,8 @@
-   }
- 
- #if ZLIB_VERNUM >= 0x1290 && \
--   defined(PNG_SET_OPTION_SUPPORTED) && defined(PNG_IGNORE_ADLER32)
-+   defined(PNG_SET_OPTION_SUPPORTED) && defined(PNG_IGNORE_ADLER32) && \
-+   !(defined(MAC_OS_X_VERSION_MIN_REQUIRED) && MAC_OS_X_VERSION_MIN_REQUIRED 
< 101300)
-   if (((png_ptr->options >> PNG_IGNORE_ADLER32) & 3) == PNG_OPTION_ON)
-  /* Turn off validation of the ADLER32 checksum in IDAT chunks */
-  ret = inflateValidate(&png_ptr->zstream, 0);
diff --git a/external/python3/ExternalProject_python3.mk 
b/external/python3/ExternalProject_python3.mk
index f1b71a037b4a..faa8e97387d4 100644
--- a/external/python3/ExternalProject_python3.mk
+++ b/external/python3/ExternalProject_python3.mk
@@ -100,7 +100,6 @@ $(call gb_ExternalProject_get_state_target,python3,build) :
 ) \

--enable-framework=/@__OOO 
--with-framework-name=LibreOfficePython, \
--enable-shared \
-   $(if $(filter 1090 101000 101100 
101200,$(MAC_OS_X_VERSION_MIN_REQUIRED)),ac_cv_func_utimensat=no) \
) \
$(if $(ENABLE_OPENSSL),$(if $(SYSTEM_OPENSSL),,\
--with-openssl=$(call 
gb_UnpackedTarball_get_dir,openssl) \


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

2022-11-21 Thread Andrea Gelmini (via logerrit)
 sw/qa/extras/uiwriter/uiwriter6.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5116d6ad85d804e7b7897bc57a4a4bf9d5bed4f1
Author: Andrea Gelmini 
AuthorDate: Mon Nov 21 21:36:42 2022 +0100
Commit: Julien Nabet 
CommitDate: Mon Nov 21 23:09:17 2022 +0100

Fix typo

Change-Id: I4fadd8781881dffb9f012da29e241b8d189eff85
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143053
Tested-by: Julien Nabet 
Reviewed-by: Julien Nabet 

diff --git a/sw/qa/extras/uiwriter/uiwriter6.cxx 
b/sw/qa/extras/uiwriter/uiwriter6.cxx
index 2c0900fe0797..ad883c5defe0 100644
--- a/sw/qa/extras/uiwriter/uiwriter6.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter6.cxx
@@ -2251,7 +2251,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, 
testTdf151828_Comment2)
 
 CPPUNIT_ASSERT_EQUAL(1, getShapes());
 
-// it is required to get the shape objet again after paste
+// it is required to get the shape object again after paste
 xBasicShape = getShape(1);
 pObject = SdrObject::getSdrObjectFromXShape(xBasicShape);
 


Jonas Eyov license statement

2022-11-21 Thread jeyov
All of my past & future contributions to LibreOffice may be licensed under the 
MPLv2/LGPLv3+ dual license.


[Libreoffice-commits] core.git: Branch 'private/tvajngerl/staging' - 8 commits - basctl/source basegfx/test chart2/source cui/source editeng/source filter/source include/basegfx include/editeng includ

2022-11-21 Thread Tomaž Vajngerl (via logerrit)
Rebased ref, commits from common ancestor:
commit 0fc07542518da908684aaeb9c00e5d30f55a30e3
Author: Tomaž Vajngerl 
AuthorDate: Fri Nov 18 16:37:33 2022 +0900
Commit: Tomaž Vajngerl 
CommitDate: Fri Nov 18 22:26:53 2022 +0900

basegfx: add setSize, setPosition to range classes, add tests

Change-Id: Idf01d1254e7327f1816e7b58d882bcc5ec9efae2

diff --git a/basegfx/test/B1DRangeTest.cxx b/basegfx/test/B1DRangeTest.cxx
index 22cf662defe5..9c3c12e37684 100644
--- a/basegfx/test/B1DRangeTest.cxx
+++ b/basegfx/test/B1DRangeTest.cxx
@@ -25,72 +25,115 @@
 
 namespace basegfx
 {
-class b1Xrange : public CppUnit::TestFixture
+class B1DRangeTest : public CppUnit::TestFixture
 {
 public:
-template  void implCheck()
+void checkIntervalAxioms()
 {
 // test interval axioms
 // (http://en.wikipedia.org/wiki/Interval_%28mathematics%29)
-Type aRange;
+B1DRange aRange;
 CPPUNIT_ASSERT_MESSAGE("default ctor - empty range", aRange.isEmpty());
-CPPUNIT_ASSERT_MESSAGE("center - get cop-out value since range is 
empty",
-   aRange.getCenter() == 0);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("center - get cop-out value since range 
is empty", 0.0,
+ aRange.getCenter());
 
 // degenerate interval
 aRange.expand(1);
+CPPUNIT_ASSERT_EQUAL(B1DRange(1.0, 1.0), aRange);
 CPPUNIT_ASSERT_MESSAGE("degenerate range - still, not empty!", 
!aRange.isEmpty());
-CPPUNIT_ASSERT_MESSAGE("degenerate range - size of 0", 
aRange.getRange() == 0);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("degenerate range - size of 0", 0.0, 
aRange.getRange());
 CPPUNIT_ASSERT_MESSAGE("same value as degenerate range - is inside 
range",
-   aRange.isInside(1));
-CPPUNIT_ASSERT_MESSAGE("center - must be the single range value", 
aRange.getCenter() == 1);
+   aRange.isInside(1.0));
+CPPUNIT_ASSERT_EQUAL_MESSAGE("center - must be the single range 
value", 1.0,
+ aRange.getCenter());
 
 // proper interval
-aRange.expand(2);
-CPPUNIT_ASSERT_MESSAGE("proper range - size of 1", aRange.getRange() 
== 1);
+aRange.expand(2.0);
+CPPUNIT_ASSERT_EQUAL(B1DRange(1.0, 2.0), aRange);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("proper range - size of 1", 1.0, 
aRange.getRange());
 CPPUNIT_ASSERT_MESSAGE("smaller value of range - is inside *closed* 
range",
aRange.isInside(1));
 CPPUNIT_ASSERT_MESSAGE("larger value of range - is inside *closed* 
range",
aRange.isInside(2));
 
 // center for proper interval that works for ints, too
-aRange.expand(3);
-CPPUNIT_ASSERT_MESSAGE("center - must be half of the range", 
aRange.getCenter() == 2);
+aRange.expand(3.0);
+CPPUNIT_ASSERT_EQUAL(B1DRange(1.0, 3.0), aRange);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("center - must be half of the range", 
2.0, aRange.getCenter());
+}
+
+void checkOverlap()
+{
+B1DRange aRange(1.0, 3.0);
+B1DRange aRange2(0.0, 1.0);
 
-// check overlap
-Type aRange2(0, 1);
 CPPUNIT_ASSERT_MESSAGE("range overlapping *includes* upper bound",
aRange.overlaps(aRange2));
 CPPUNIT_ASSERT_MESSAGE("range overlapping *includes* upper bound, but 
only barely",
!aRange.overlapsMore(aRange2));
 
-Type aRange3(0, 2);
+B1DRange aRange3(0.0, 2.0);
 CPPUNIT_ASSERT_MESSAGE("range overlapping is fully overlapping now",
aRange.overlapsMore(aRange3));
+}
 
-// check intersect
-Type aRange4(3, 4);
-aRange.intersect(aRange4);
+void checkIntersect()
+{
+B1DRange aRange(1.0, 3.0);
+B1DRange aRange2(3.0, 4.0);
+aRange.intersect(aRange2);
 CPPUNIT_ASSERT_MESSAGE("range intersection is yielding empty range!", 
!aRange.isEmpty());
 
-Type aRange5(5, 6);
-aRange.intersect(aRange5);
+B1DRange aRange3(5.0, 6.0);
+aRange.intersect(aRange3);
 CPPUNIT_ASSERT_MESSAGE("range intersection is yielding nonempty 
range!", aRange.isEmpty());
 }
 
-void check() { implCheck(); }
+void checkShift()
+{
+B1DRange aRange(1.0, 3.0);
+aRange.shift(2.0);
+CPPUNIT_ASSERT_EQUAL(B1DRange(3.0, 5.0), aRange);
+
+B1DRange aRange2(-1.0, -3.0);
+aRange2.shift(2.0);
+CPPUNIT_ASSERT_EQUAL(B1DRange(1.0, -1.0), aRange2);
+}
+
+void checkSetSize()
+{
+B1DRange aRange(1.0, 3.0);
+aRange.setSize(5.0);
+CPPUNIT_ASSERT_EQUAL(B1DRange(1.0, 6.0), aRange);
+
+B1DRange aRange2(-1.0, -3.0);
+aRange2.setSize(3.0);
+CPPUNIT_ASSERT_EQUAL(B1DRange(-3.0, 0.0),

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

2022-11-21 Thread Eike Rathke (via logerrit)
 source/text/shared/00/0001.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7fa50f5c2f7280129f856f3f9fab85ac047a3e2c
Author: Eike Rathke 
AuthorDate: Mon Nov 21 14:32:42 2022 +0100
Commit: Eike Rathke 
CommitDate: Tue Nov 22 02:45:46 2022 +0100

Regex: precede every metacharacter or operator with "\"

... not every character.

Change-Id: I2c09f164c8b48c5ac4f39203319411aa5c73b490
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/143032
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/source/text/shared/00/0001.xhp 
b/source/text/shared/00/0001.xhp
index 97f683853e..8cad44d154 100644
--- a/source/text/shared/00/0001.xhp
+++ b/source/text/shared/00/0001.xhp
@@ -277,7 +277,7 @@
 
 See also the following functions:
 
-The search 
supports wildcards or regular expressions. With regular expressions enabled, you 
can enter "all.*", for example to find the first location of "all" followed by 
any characters. If you want to search for a text that is also a regular 
expression, you must either precede every character with a "\" character, or 
enclose the text into \Q...\E. You can switch the automatic evaluation of 
wildcards or regular expression on and off in %PRODUCTNAME - 
PreferencesTools - 
Options - %PRODUCTNAME Calc 
- Calculate.
+The search 
supports wildcards or regular expressions. With regular expressions enabled, you 
can enter "all.*", for example to find the first location of "all" followed by 
any characters. If you want to search for a text that is also a regular 
expression, you must either precede every regular expression metacharacter or 
operator with a "\" character, or enclose the text into \Q...\E. You can switch 
the automatic evaluation of wildcards or regular expression on and off in %PRODUCTNAME - 
PreferencesTools - 
Options - %PRODUCTNAME Calc 
- Calculate.
 
 When using functions where one or 
more arguments are search criteria strings that represents a regular 
expression, the first attempt is to convert the string criteria to numbers. For 
example, ".0" will convert to 0.0 and so on. If successful, the match will not 
be a regular expression match but a numeric match. However, when switching to a 
locale where the decimal separator is not the dot makes the regular expression 
conversion work. To force the evaluation of the regular expression instead of a 
numeric expression, use some expression that can not be misread as numeric, 
such as ".[0]" or ".\0" or "(?i).0". 
 


[Libreoffice-commits] core.git: helpcontent2

2022-11-21 Thread Eike Rathke (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a41c82407bbb73a4d87070326485ec4b4e954a65
Author: Eike Rathke 
AuthorDate: Tue Nov 22 02:45:48 2022 +0100
Commit: Gerrit Code Review 
CommitDate: Tue Nov 22 02:45:48 2022 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to 7fa50f5c2f7280129f856f3f9fab85ac047a3e2c
  - Regex: precede every metacharacter or operator with "\"

... not every character.

Change-Id: I2c09f164c8b48c5ac4f39203319411aa5c73b490
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/143032
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/helpcontent2 b/helpcontent2
index bcc251fddf6f..7fa50f5c2f72 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit bcc251fddf6f5be88dc43fba34573d5e3b51a6dd
+Subproject commit 7fa50f5c2f7280129f856f3f9fab85ac047a3e2c


Tarcísio Ladeia de Oliveira license statement

2022-11-21 Thread Tarcísio Ladeia de Oliveira

   All of my past & future contributions to LibreOffice may be
   licensed under the MPLv2/LGPLv3+ dual license.



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

2022-11-21 Thread Noel Grandin (via logerrit)
 sw/source/ui/config/mailconfigpage.cxx |4 
 sw/source/ui/config/optpage.cxx|1 -
 sw/source/ui/dbui/mmaddressblockpage.hxx   |4 
 sw/source/ui/dbui/mmgreetingspage.cxx  |1 -
 sw/source/ui/dbui/mmgreetingspage.hxx  |1 -
 sw/source/ui/dbui/mmoutputtypepage.cxx |1 -
 sw/source/ui/dbui/mmresultdialogs.cxx  |4 
 sw/source/ui/fldui/fldfunc.cxx |3 ---
 sw/source/ui/fldui/fldfunc.hxx |3 ---
 sw/source/ui/frmdlg/cption.cxx |1 -
 sw/source/ui/frmdlg/frmpage.cxx|3 ---
 sw/source/ui/inc/mmresultdialogs.hxx   |5 -
 sw/source/ui/misc/docfnote.cxx |1 -
 sw/source/ui/misc/impfnote.hxx |1 -
 sw/source/ui/table/splittbl.cxx|1 -
 sw/source/uibase/dbui/dbui.cxx |1 -
 sw/source/uibase/inc/conttree.hxx  |1 -
 sw/source/uibase/inc/cption.hxx|1 -
 sw/source/uibase/inc/dbui.hxx  |1 -
 sw/source/uibase/inc/frmpage.hxx   |3 ---
 sw/source/uibase/inc/optpage.hxx   |1 -
 sw/source/uibase/inc/splittbl.hxx  |2 --
 sw/source/uibase/utlui/content.cxx |1 -
 uui/source/unknownauthdlg.cxx  |1 -
 uui/source/unknownauthdlg.hxx  |1 -
 vcl/inc/printdlg.hxx   |1 -
 vcl/source/window/printdlg.cxx |1 -
 writerperfect/inc/WPFTEncodingDialog.hxx   |1 -
 writerperfect/source/common/WPFTEncodingDialog.cxx |1 -
 29 files changed, 51 deletions(-)

New commits:
commit ef6684337a3a99d6a1620e6cdb569888a77cacf8
Author: Noel Grandin 
AuthorDate: Mon Nov 21 15:44:08 2022 +0200
Commit: Noel Grandin 
CommitDate: Tue Nov 22 05:38:48 2022 +0100

loplugin:unusedfields

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

diff --git a/sw/source/ui/config/mailconfigpage.cxx 
b/sw/source/ui/config/mailconfigpage.cxx
index 14160f27eb41..89091dfe7f35 100644
--- a/sw/source/ui/config/mailconfigpage.cxx
+++ b/sw/source/ui/config/mailconfigpage.cxx
@@ -46,8 +46,6 @@ class SwTestAccountSettingsDialog : public SfxDialogController
 
 std::unique_ptr m_xStopPB;
 std::unique_ptr m_xErrorsED;
-std::unique_ptr m_xEstablish;
-std::unique_ptr m_xFind;
 std::unique_ptr m_xResult1;
 std::unique_ptr m_xResult2;
 std::unique_ptr m_xImage1;
@@ -210,8 +208,6 @@ 
SwTestAccountSettingsDialog::SwTestAccountSettingsDialog(SwMailConfigPage* pPare
 , m_pParent(pParent)
 , m_xStopPB(m_xBuilder->weld_button("stop"))
 , m_xErrorsED(m_xBuilder->weld_text_view("errors"))
-, m_xEstablish(m_xBuilder->weld_label("establish"))
-, m_xFind(m_xBuilder->weld_label("find"))
 , m_xResult1(m_xBuilder->weld_label("result1"))
 , m_xResult2(m_xBuilder->weld_label("result2"))
 , m_xImage1(m_xBuilder->weld_image("image1"))
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index d0ecb19a357e..6fb406ba2953 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -100,7 +100,6 @@ SwContentOptPage::SwContentOptPage(weld::Container* pPage, 
weld::DialogControlle
 , m_xMetricLabel(m_xBuilder->weld_label("measureunitlabel"))
 , m_xMetricLB(m_xBuilder->weld_combo_box("measureunit"))
 , m_xShowInlineTooltips(m_xBuilder->weld_check_button("changestooltip"))
-, m_xOutlineLabel(m_xBuilder->weld_label("outlinelabel"))
 , 
m_xShowOutlineContentVisibilityButton(m_xBuilder->weld_check_button("outlinecontentvisibilitybutton"))
 , 
m_xTreatSubOutlineLevelsAsContent(m_xBuilder->weld_check_button("suboutlinelevelsascontent"))
 , m_xShowChangesInMargin(m_xBuilder->weld_check_button("changesinmargin"))
diff --git a/sw/source/ui/dbui/mmaddressblockpage.hxx 
b/sw/source/ui/dbui/mmaddressblockpage.hxx
index 48bdbbb680f6..3aaad88fe736 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.hxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.hxx
@@ -260,10 +260,6 @@ class SwAssignFieldsDialog : public SfxDialogController
 std::unique_ptr m_xPreviewWin;
 std::unique_ptr m_xFieldsControl;
 
-std::unique_ptr m_xLabelGroup;
-std::unique_ptr m_xComboGroup;
-std::unique_ptr m_xPreviewGroup;
-
 css::uno::Sequence< OUString > CreateAssignments();
 DECL_LINK(OkHdl_Impl, weld::Button&, void);
 DECL_LINK(AssignmentModifyHdl_Impl, LinkParamNone*, void);
diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx 
b/sw/source/ui/dbui/mmgreetingspage.cxx
index bf6bf5558f97..c75a01ee8dfe 100644
--- a/sw/source/ui/dbui/mmgreetingspage.cxx
+++ b/sw/source/ui/dbui/mmgree

[Libreoffice-commits] core.git: 2 commits - scripting/source sd/source sfx2/inc sfx2/source svx/source

2022-11-21 Thread Noel Grandin (via logerrit)
 scripting/source/stringresource/stringresource.cxx|8 
+++-
 sd/source/ui/animations/CustomAnimationDialog.cxx |8 

 sd/source/ui/dlg/BulletAndPositionDlg.cxx |1 -
 sd/source/ui/dlg/custsdlg.cxx |4 

 sd/source/ui/inc/BulletAndPositionDlg.hxx |1 -
 sd/source/ui/inc/custsdlg.hxx |4 

 sfx2/inc/autoredactdialog.hxx |1 -
 sfx2/source/dialog/mgetempl.cxx   |1 -
 sfx2/source/dialog/mgetempl.hxx   |1 -
 sfx2/source/dialog/templdlg.cxx   |1 -
 sfx2/source/dialog/versdlg.cxx|4 

 sfx2/source/doc/autoredactdialog.cxx  |1 -
 sfx2/source/inc/templdgi.hxx  |2 --
 sfx2/source/inc/versdlg.hxx   |4 

 sfx2/source/view/viewfrm.cxx  |6 
--
 svx/source/dialog/SafeModeDialog.cxx  |1 -
 svx/source/dialog/SafeModeDialog.hxx  |1 -
 svx/source/form/datanavi.cxx  |3 
---
 svx/source/inc/datanavi.hxx   |2 --
 svx/source/sidebar/EmptyPanel.cxx |1 -
 svx/source/sidebar/EmptyPanel.hxx |3 
---
 svx/source/sidebar/graphic/GraphicPropertyPanel.hxx   |4 

 svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx |3 
---
 svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx |3 
---
 24 files changed, 3 insertions(+), 65 deletions(-)

New commits:
commit c91ec113a24ecc2bf883b1620f4e900f713dc996
Author: Noel Grandin 
AuthorDate: Mon Nov 21 10:59:56 2022 +0200
Commit: Noel Grandin 
CommitDate: Tue Nov 22 05:39:20 2022 +0100

loplugin:unusedfields

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

diff --git a/scripting/source/stringresource/stringresource.cxx 
b/scripting/source/stringresource/stringresource.cxx
index b99a512d1168..e1fc4729176c 100644
--- a/scripting/source/stringresource/stringresource.cxx
+++ b/scripting/source/stringresource/stringresource.cxx
@@ -1246,14 +1246,13 @@ namespace {
 class BinaryInput
 {
 Sequence< sal_Int8 >m_aData;
-Reference< XComponentContext >  m_xContext;
 
 const sal_Int8* m_pData;
 sal_Int32   m_nCurPos;
 sal_Int32   m_nSize;
 
 public:
-BinaryInput( const Sequence< ::sal_Int8 >& aData, Reference< 
XComponentContext > const & xContext );
+BinaryInput( const Sequence< ::sal_Int8 >& aData );
 
 Reference< io::XInputStream > getInputStreamForSection( sal_Int32 nSize );
 
@@ -1269,9 +1268,8 @@ public:
 
 }
 
-BinaryInput::BinaryInput( const Sequence< ::sal_Int8 >& aData, Reference< 
XComponentContext > const & xContext )
+BinaryInput::BinaryInput( const Sequence< ::sal_Int8 >& aData )
 : m_aData( aData )
-, m_xContext( xContext )
 {
 m_pData = m_aData.getConstArray();
 m_nCurPos = 0;
@@ -1384,7 +1382,7 @@ void StringResourcePersistenceImpl::importBinary( const 
Sequence< ::sal_Int8 >&
 while( nOldLocaleCount > 0 );
 
 // Import data
-BinaryInput aIn( Data, m_xContext );
+BinaryInput aIn( Data );
 
 aIn.readInt16(); // version
 sal_Int32 nLocaleCount = aIn.readInt16();
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx 
b/sd/source/ui/animations/CustomAnimationDialog.cxx
index 83a57efb0ad4..625a3049695e 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -902,7 +902,6 @@ private:
 std::unique_ptr mxFTSound;
 std::unique_ptr mxLBSound;
 std::unique_ptr mxPBSoundPreview;
-std::unique_ptr mxFTAfterEffect;
 std::unique_ptr mxLBAfterEffect;
 std::unique_ptr mxFTDimColor;
 std::unique_ptr mxCLBDimColor;
@@ -927,7 +926,6 @@ 
CustomAnimationEffectTabPage::CustomAnimationEffectTabPage(weld::Container* pPar
 , mxFTSound(mxBuilder->weld_label("sound_label"))
 , mxLBSound(mxBuilder->weld_combo_box("sound_list"))
 , mxPBSoundPreview(mxBuilder->weld_button("sound_preview"))
-, mxFTAfterEffect(mxBuilder->weld_label("aeffect_label"))
 , mxLBAfterEffect(mxBuilder->weld_combo_box("aeffect_list"))
 , mxFTDimColor(mxBuilder->weld_label("dim_color_label"))
 , mxCLBDimColor(ne

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

2022-11-21 Thread Noel Grandin (via logerrit)
 sc/source/ui/StatisticsDialogs/RegressionDialog.cxx |1 -
 sc/source/ui/condformat/colorformat.cxx |1 -
 sc/source/ui/dbgui/PivotLayoutDialog.cxx|2 --
 sc/source/ui/dbgui/consdlg.cxx  |1 -
 sc/source/ui/dbgui/dbnamdlg.cxx |1 -
 sc/source/ui/dbgui/pvfundlg.cxx |1 -
 sc/source/ui/dbgui/scuiimoptdlg.cxx |1 -
 sc/source/ui/inc/PivotLayoutDialog.hxx  |3 ---
 sc/source/ui/inc/RegressionDialog.hxx   |1 -
 sc/source/ui/inc/colorformat.hxx|1 -
 sc/source/ui/inc/consdlg.hxx|1 -
 sc/source/ui/inc/crdlg.hxx  |1 -
 sc/source/ui/inc/dbnamdlg.hxx   |1 -
 sc/source/ui/inc/instbdlg.hxx   |1 -
 sc/source/ui/inc/namedefdlg.hxx |1 -
 sc/source/ui/inc/namedlg.hxx|2 --
 sc/source/ui/inc/optsolver.hxx  |1 -
 sc/source/ui/inc/pvfundlg.hxx   |1 -
 sc/source/ui/inc/scuiimoptdlg.hxx   |1 -
 sc/source/ui/miscdlgs/crdlg.cxx |1 -
 sc/source/ui/miscdlgs/instbdlg.cxx  |1 -
 sc/source/ui/miscdlgs/optsolver.cxx |1 -
 sc/source/ui/namedlg/namedefdlg.cxx |1 -
 sc/source/ui/namedlg/namedlg.cxx|1 -
 24 files changed, 28 deletions(-)

New commits:
commit 8288d2e3061327fd91e241c0b514cd973e3fcea8
Author: Noel Grandin 
AuthorDate: Mon Nov 21 11:04:53 2022 +0200
Commit: Noel Grandin 
CommitDate: Tue Nov 22 05:39:37 2022 +0100

loplugin:unusedfields

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

diff --git a/sc/source/ui/StatisticsDialogs/RegressionDialog.cxx 
b/sc/source/ui/StatisticsDialogs/RegressionDialog.cxx
index ad4adb1fe238..547866cf010c 100644
--- a/sc/source/ui/StatisticsDialogs/RegressionDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/RegressionDialog.cxx
@@ -148,7 +148,6 @@ ScRegressionDialog::ScRegressionDialog(
 , mxWithLabelsCheckBox(m_xBuilder->weld_check_button("withlabels-check"))
 , mxLinearRadioButton(m_xBuilder->weld_radio_button("linear-radio"))
 , 
mxLogarithmicRadioButton(m_xBuilder->weld_radio_button("logarithmic-radio"))
-, mxPowerRadioButton(m_xBuilder->weld_radio_button("power-radio"))
 , mxErrorMessage(m_xBuilder->weld_label("error-message"))
 , 
mxConfidenceLevelField(m_xBuilder->weld_spin_button("confidencelevel-spin"))
 , 
mxCalcResidualsCheckBox(m_xBuilder->weld_check_button("calcresiduals-check"))
diff --git a/sc/source/ui/condformat/colorformat.cxx 
b/sc/source/ui/condformat/colorformat.cxx
index 920fee3c0813..d97f53fe680c 100644
--- a/sc/source/ui/condformat/colorformat.cxx
+++ b/sc/source/ui/condformat/colorformat.cxx
@@ -74,7 +74,6 @@ ScDataBarSettingsDlg::ScDataBarSettingsDlg(weld::Window* 
pParent, const ScDataBa
 , mpDoc(pDoc)
 , maPos(rPos)
 , mxBtnOk(m_xBuilder->weld_button("ok"))
-, mxBtnCancel(m_xBuilder->weld_button("cancel"))
 , mxLbPos(new 
ColorListBox(m_xBuilder->weld_menu_button("positive_colour"), [this]{ return 
m_xDialog.get(); }))
 , mxLbNeg(new 
ColorListBox(m_xBuilder->weld_menu_button("negative_colour"), [this]{ return 
m_xDialog.get(); }))
 , mxLbAxisCol(new 
ColorListBox(m_xBuilder->weld_menu_button("axis_colour"), [this]{ return 
m_xDialog.get(); }))
diff --git a/sc/source/ui/dbgui/PivotLayoutDialog.cxx 
b/sc/source/ui/dbgui/PivotLayoutDialog.cxx
index bd42fab6af47..42fe539ec0f1 100644
--- a/sc/source/ui/dbgui/PivotLayoutDialog.cxx
+++ b/sc/source/ui/dbgui/PivotLayoutDialog.cxx
@@ -109,8 +109,6 @@ ScPivotLayoutDialog::ScPivotLayoutDialog(
 , mxSourceLabel(mxSourceFrame->weld_label_widget())
 , mxDestFrame(m_xBuilder->weld_frame("frame1"))
 , mxDestLabel(mxDestFrame->weld_label_widget())
-, mxOptions(m_xBuilder->weld_expander("options"))
-, mxMore(m_xBuilder->weld_expander("more"))
 {
 // Source UI
 Link aLink2 = LINK(this, ScPivotLayoutDialog, 
ToggleSource);
diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx
index 1dde53c1866e..d0921f3eb96e 100644
--- a/sc/source/ui/dbgui/consdlg.cxx
+++ b/sc/source/ui/dbgui/consdlg.cxx
@@ -88,7 +88,6 @@ ScConsolidateDlg::ScConsolidateDlg(SfxBindings* pB, 
SfxChildWindow* pCW, weld::W
 , m_xLbDestArea(m_xBuilder->weld_combo_box("lbdestarea"))
 , m_xEdDestArea(new formula::RefEdit(m_xBuilder->weld_entry("eddestarea")))
 , m_xRbDestArea(new 
formula::RefButton(m_xBuilder->weld_button("rbdestarea")))
-, m_xExpander(m_xBuilder->weld_expander("more"))
 , m_xBtnByRow(m_xBuilder->weld_check_button("byrow"))
 , m_xBtnByCol(m_xBuilder->weld_check_button("bycol"))
 , m_xBtnRefs(m_

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

2022-11-21 Thread Julien Nabet (via logerrit)
 basctl/source/basicide/ObjectCatalog.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit aa29d9f8b141cbb513769dd8b14435f9164a5654
Author: Julien Nabet 
AuthorDate: Mon Nov 21 22:43:04 2022 +0100
Commit: Noel Grandin 
CommitDate: Tue Nov 22 05:41:36 2022 +0100

tdf#152154: Crash when Object Catalog undocked and BASIC IDE closed

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

diff --git a/basctl/source/basicide/ObjectCatalog.cxx 
b/basctl/source/basicide/ObjectCatalog.cxx
index 89b3f4e2b824..13069ed46621 100644
--- a/basctl/source/basicide/ObjectCatalog.cxx
+++ b/basctl/source/basicide/ObjectCatalog.cxx
@@ -67,7 +67,9 @@ void ObjectCatalog::ToggleFloatingMode()
 DockingWindow::ToggleFloatingMode();
 
 bool const bFloating = IsFloatingMode();
-m_xTitle->set_visible(!bFloating);
+// tdf#152154: m_xTitle will be null during disposing
+if (m_xTitle)
+m_xTitle->set_visible(!bFloating);
 }
 
 void ObjectCatalog::SetCurrentEntry(BaseWindow* pCurWin)


[Libreoffice-commits] core.git: Branch 'private/tvajngerl/staging' - 4 commits - basegfx/test include/basegfx include/svx svx/source tools/qa

2022-11-21 Thread Tomaž Vajngerl (via logerrit)
 basegfx/test/LengthUnitTest.cxx|   77 ---
 include/basegfx/units/Length.hxx   |  111 +++
 include/basegfx/utils/RectangleWrapper.hxx |   77 +++
 include/svx/svdotext.hxx   |   28 +-
 svx/source/svdraw/svdocirc.cxx |2 
 svx/source/svdraw/svdotext.cxx |   31 ++-
 svx/source/svdraw/svdotxtr.cxx |7 -
 tools/qa/cppunit/test_rectangle.cxx|  117 +++--
 8 files changed, 319 insertions(+), 131 deletions(-)

New commits:
commit e08d574336b1e53073d53f0b2e24466c409cd0c1
Author: Tomaž Vajngerl 
AuthorDate: Tue Nov 22 13:33:30 2022 +0900
Commit: Tomaž Vajngerl 
CommitDate: Tue Nov 22 13:44:44 2022 +0900

svx: use RectangleWrapper for maRectangle on SdrTextObj

This is needed so we can now transition to use gfx::Length and
gfx::Range2DL to define the object position and size.

Change-Id: Ie683a869ba061f53d437bd1dfbe72fe454011730

diff --git a/include/basegfx/utils/RectangleWrapper.hxx 
b/include/basegfx/utils/RectangleWrapper.hxx
new file mode 100644
index ..00586d6eae71
--- /dev/null
+++ b/include/basegfx/utils/RectangleWrapper.hxx
@@ -0,0 +1,77 @@
+/* -*- 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/.
+ */
+
+#pragma once
+
+#include 
+#include 
+
+namespace gfx
+{
+/**
+ * Wrapps tools::Rectangle and Range2DL, to make it easier to incrementally
+ * transition to use Range2DL.
+ */
+class RectangleWrapper
+{
+private:
+gfx::Range2DL m_aRange;
+mutable tools::Rectangle m_aRectangle;
+
+public:
+RectangleWrapper() = default;
+
+RectangleWrapper(gfx::Length x1, gfx::Length y1, gfx::Length x2, 
gfx::Length y2)
+: m_aRange(x1, y1, x2, y2)
+{
+}
+
+gfx::Range2DL const& getRange() const { return m_aRange; }
+
+void setRange(gfx::Range2DL const& rRange) { m_aRange = rRange; }
+
+tools::Rectangle const& getRectangle() const
+{
+m_aRectangle = gfx::length::toRectangleHmm(m_aRange);
+return m_aRectangle;
+}
+
+void setRectangle(tools::Rectangle const& rRectangle)
+{
+m_aRange = gfx::length::fromRectangleHmm(rRectangle);
+}
+
+void setSize(sal_Int32 nWidth, sal_Int32 nHeight)
+{
+auto width = gfx::Length::hmm(nWidth - 1);
+auto height = gfx::Length::hmm(nHeight - 1);
+
+m_aRange.setSize(width, height);
+}
+
+void move(sal_Int32 nXDelta, sal_Int32 nYDelta)
+{
+auto deltaX = gfx::Length::hmm(nXDelta);
+auto deltaY = gfx::Length::hmm(nYDelta);
+
+m_aRange.shift(deltaX, deltaY);
+}
+
+void setPosition(sal_Int32 nX, sal_Int32 nY)
+{
+auto x = gfx::Length::hmm(nX);
+auto y = gfx::Length::hmm(nY);
+
+m_aRange.setPosition(x, y);
+}
+};
+
+} // end namespace gfx
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdotext.hxx b/include/svx/svdotext.hxx
index a1cccb0804a4..5ac836e03b6d 100644
--- a/include/svx/svdotext.hxx
+++ b/include/svx/svdotext.hxx
@@ -32,6 +32,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -165,32 +166,17 @@ protected:
 // The "aRect" is also the rect of RectObj and CircObj.
 // When mbTextFrame=true the text will be formatted into this rect
 // When mbTextFrame=false the text will be centered around its middle
-tools::Rectangle maRectangle;
+gfx::RectangleWrapper maRectangle;
 
-tools::Rectangle const& getRectangle() const
-{
-return maRectangle;
-}
+tools::Rectangle const& getRectangle() const;
 
-void setRectangle(tools::Rectangle const& rRectangle)
-{
-maRectangle = rRectangle;
-}
+void setRectangle(tools::Rectangle const& rRectangle);
 
-void setRectangleSize(sal_Int32 nWidth, sal_Int32 nHeight)
-{
-maRectangle.SetSize(Size(nWidth, nHeight));
-}
+void setRectangleSize(sal_Int32 nWidth, sal_Int32 nHeight);
 
-void moveRectangle(sal_Int32 nXDelta, sal_Int32 nYDelta)
-{
-maRectangle.Move(nXDelta, nYDelta);
-}
+void moveRectangle(sal_Int32 nXDelta, sal_Int32 nYDelta);
 
-void moveRectanglePosition(sal_Int32 nX, sal_Int32 nY)
-{
-maRectangle.SetPos(Point(nX, nY));
-}
+void moveRectanglePosition(sal_Int32 nX, sal_Int32 nY);
 
 // The GeoStat contains the rotation and shear angles
 GeoStat maGeo;
diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx
index ab8bc58ddf85..d8b47be4fbba 100644
--- a/svx/source/svdraw/svdocirc.cxx
+++ b/svx/source/svdraw/svdocirc.cxx
@@ -707,7 +707,6 @@ bool SdrCircObj::MovCreate(SdrDr

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

2022-11-21 Thread Bogdan B (via logerrit)
 vcl/osx/DataFlavorMapping.hxx |5 +
 vcl/osx/DragSource.hxx|5 +
 vcl/osx/DragSourceContext.hxx |5 +
 vcl/osx/DropTarget.hxx|5 +
 4 files changed, 4 insertions(+), 16 deletions(-)

New commits:
commit b813326ac01b8c8773b499afc9c5ec7dafcbf44f
Author: Bogdan B 
AuthorDate: Mon Nov 21 20:13:34 2022 +0100
Commit: Ilmari Lauhakangas 
CommitDate: Tue Nov 22 07:43:28 2022 +0100

tdf#143148 Use pragma once instead of include guards

Change-Id: Ifa8ad8539ad2fb828b45b9242b9e8196c48f5a74
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143061
Tested-by: Jenkins
Tested-by: Ilmari Lauhakangas 
Reviewed-by: Ilmari Lauhakangas 

diff --git a/vcl/osx/DataFlavorMapping.hxx b/vcl/osx/DataFlavorMapping.hxx
index 4720a7f73423..fb5c8070025f 100644
--- a/vcl/osx/DataFlavorMapping.hxx
+++ b/vcl/osx/DataFlavorMapping.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_VCL_OSX_DATAFLAVORMAPPING_HXX
-#define INCLUDED_VCL_OSX_DATAFLAVORMAPPING_HXX
+#pragma once
 
 #include 
 #include 
@@ -124,6 +123,4 @@ private:
 
 typedef std::shared_ptr DataFlavorMapperPtr_t;
 
-#endif // INCLUDED_VCL_OSX_DATAFLAVORMAPPING_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/osx/DragSource.hxx b/vcl/osx/DragSource.hxx
index 9027ac455a7c..96a8fb48a833 100644
--- a/vcl/osx/DragSource.hxx
+++ b/vcl/osx/DragSource.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_VCL_OSX_DRAGSOURCE_HXX
-#define INCLUDED_VCL_OSX_DRAGSOURCE_HXX
+#pragma once
 
 #include 
 #include 
@@ -123,6 +122,4 @@ public:
 
 };
 
-#endif // INCLUDED_VCL_OSX_DRAGSOURCE_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/osx/DragSourceContext.hxx b/vcl/osx/DragSourceContext.hxx
index 3ebeb362b4d9..e1f986d3d476 100644
--- a/vcl/osx/DragSourceContext.hxx
+++ b/vcl/osx/DragSourceContext.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_VCL_OSX_DRAGSOURCECONTEXT_HXX
-#define INCLUDED_VCL_OSX_DRAGSOURCECONTEXT_HXX
+#pragma once
 
 #include 
 #include 
@@ -48,6 +47,4 @@ public:
   virtual void SAL_CALL transferablesFlavorsChanged(  ) override;
 };
 
-#endif // INCLUDED_VCL_OSX_DRAGSOURCECONTEXT_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/osx/DropTarget.hxx b/vcl/osx/DropTarget.hxx
index aafb6449599f..ffc53a4e17ec 100644
--- a/vcl/osx/DropTarget.hxx
+++ b/vcl/osx/DropTarget.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_VCL_OSX_DROPTARGET_HXX
-#define INCLUDED_VCL_OSX_DROPTARGET_HXX
+#pragma once
 
 #include "DataFlavorMapping.hxx"
 #include 
@@ -152,6 +151,4 @@ private:
   sal_Int8 mDefaultActions;
 };
 
-#endif // INCLUDED_VCL_OSX_DROPTARGET_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


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

2022-11-21 Thread Bogdan B (via logerrit)
 vcl/source/filter/FilterConfigCache.hxx  |5 +
 vcl/source/filter/egif/giflzwc.hxx   |5 +
 vcl/source/filter/graphicfilter_internal.hxx |5 +
 3 files changed, 3 insertions(+), 12 deletions(-)

New commits:
commit 08e163864fb48c5299518e98ddff57f192a1ba2a
Author: Bogdan B 
AuthorDate: Mon Nov 21 20:05:13 2022 +0100
Commit: Ilmari Lauhakangas 
CommitDate: Tue Nov 22 07:46:50 2022 +0100

tdf#143148 Use pragma once instead of include guards

Change-Id: I64a379e62e63e92fb7093df71f3ccd99a8cd69b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143058
Tested-by: Jenkins
Tested-by: Ilmari Lauhakangas 
Reviewed-by: Ilmari Lauhakangas 

diff --git a/vcl/source/filter/FilterConfigCache.hxx 
b/vcl/source/filter/FilterConfigCache.hxx
index f398a58ff70a..95e52d80ecaf 100644
--- a/vcl/source/filter/FilterConfigCache.hxx
+++ b/vcl/source/filter/FilterConfigCache.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_VCL_SOURCE_FILTER_FILTERCONFIGCACHE_HXX
-#define INCLUDED_VCL_SOURCE_FILTER_FILTERCONFIGCACHE_HXX
+#pragma once
 
 #include 
 #include 
@@ -95,6 +94,4 @@ public:
 ~FilterConfigCache();
 };
 
-#endif // INCLUDED_VCL_SOURCE_FILTER_FILTERCONFIGCACHE_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/filter/egif/giflzwc.hxx 
b/vcl/source/filter/egif/giflzwc.hxx
index 057710c85230..13ef3f4ba532 100644
--- a/vcl/source/filter/egif/giflzwc.hxx
+++ b/vcl/source/filter/egif/giflzwc.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_FILTER_SOURCE_GRAPHICFILTER_EGIF_GIFLZWC_HXX
-#define INCLUDED_FILTER_SOURCE_GRAPHICFILTER_EGIF_GIFLZWC_HXX
+#pragma once
 
 #include 
 
@@ -50,6 +49,4 @@ public:
 voidEndCompression();
 };
 
-#endif // INCLUDED_FILTER_SOURCE_GRAPHICFILTER_EGIF_GIFLZWC_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/filter/graphicfilter_internal.hxx 
b/vcl/source/filter/graphicfilter_internal.hxx
index 7e71d8c6d16e..e7afbaf8cb79 100644
--- a/vcl/source/filter/graphicfilter_internal.hxx
+++ b/vcl/source/filter/graphicfilter_internal.hxx
@@ -17,14 +17,11 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_VCL_SOURCE_FILTER_GRAPHICFILTER_INTERNAL_HXX
-#define INCLUDED_VCL_SOURCE_FILTER_GRAPHICFILTER_INTERNAL_HXX
+#pragma once
 
 #include 
 #include 
 
 sal_uInt8* ImplSearchEntry(sal_uInt8*, sal_uInt8 const*, sal_uLong, sal_uLong);
 
-#endif // INCLUDED_VCL_SOURCE_FILTER_GRAPHICFILTER_INTERNAL_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


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

2022-11-21 Thread Bogdan B (via logerrit)
 vcl/source/filter/idxf/dxfvec.hxx  |6 +-
 vcl/source/filter/igif/gifread.hxx |5 +
 vcl/source/filter/ipict/shape.hxx  |5 +
 3 files changed, 3 insertions(+), 13 deletions(-)

New commits:
commit 39490a5a07db543f681fcd6e59083d5c72dc9927
Author: Bogdan B 
AuthorDate: Mon Nov 21 19:56:35 2022 +0100
Commit: Ilmari Lauhakangas 
CommitDate: Tue Nov 22 07:47:16 2022 +0100

tdf#143148 Use pragma once instead of include guards

Change-Id: I20add5a23520c54425174959b4757720639413e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143055
Tested-by: Jenkins
Tested-by: Ilmari Lauhakangas 
Reviewed-by: Ilmari Lauhakangas 

diff --git a/vcl/source/filter/idxf/dxfvec.hxx 
b/vcl/source/filter/idxf/dxfvec.hxx
index 59b6babc2965..2aed6ef0ddf8 100644
--- a/vcl/source/filter/idxf/dxfvec.hxx
+++ b/vcl/source/filter/idxf/dxfvec.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_FILTER_SOURCE_GRAPHICFILTER_IDXF_DXFVEC_HXX
-#define INCLUDED_FILTER_SOURCE_GRAPHICFILTER_IDXF_DXFVEC_HXX
+#pragma once
 
 #include 
 #include 
@@ -212,7 +211,4 @@ inline bool DXFVector::operator == (const DXFVector & rV) 
const
 else return false;
 }
 
-
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/filter/igif/gifread.hxx 
b/vcl/source/filter/igif/gifread.hxx
index de9a506f24b9..642921fd0afd 100644
--- a/vcl/source/filter/igif/gifread.hxx
+++ b/vcl/source/filter/igif/gifread.hxx
@@ -17,14 +17,11 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_VCL_SOURCE_FILTER_IGIF_GIFREAD_HXX
-#define INCLUDED_VCL_SOURCE_FILTER_IGIF_GIFREAD_HXX
+#pragma once
 
 #include 
 
 VCL_DLLPUBLIC bool ImportGIF(SvStream& rStream, Graphic& rGraphic);
 bool IsGIFAnimated(SvStream& rStream, Size& rLogicSize);
 
-#endif // INCLUDED_VCL_SOURCE_FILTER_IGIF_GIFREAD_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/filter/ipict/shape.hxx 
b/vcl/source/filter/ipict/shape.hxx
index bccd39e63c26..446d564e9590 100644
--- a/vcl/source/filter/ipict/shape.hxx
+++ b/vcl/source/filter/ipict/shape.hxx
@@ -16,8 +16,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_FILTER_SOURCE_GRAPHICFILTER_IPICT_SHAPE_HXX
-#define INCLUDED_FILTER_SOURCE_GRAPHICFILTER_IPICT_SHAPE_HXX
+#pragma once
 
 #include 
 
@@ -52,6 +51,4 @@ void drawPolygon(VirtualDevice *dev, bool drawFrame, 
tools::Polygon const &rect,
   void drawArc(VirtualDevice *dev, bool drawFrame, tools::Rectangle const 
&orig, const double& angle1, const double& angle2, Size const &pSize);
 }
 
-#endif // INCLUDED_FILTER_SOURCE_GRAPHICFILTER_IPICT_SHAPE_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


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

2022-11-21 Thread Bogdan B (via logerrit)
 vcl/source/filter/ixbm/xbmread.hxx |5 +
 vcl/source/filter/ixpm/rgbtable.hxx|5 +
 vcl/source/filter/svm/SvmConverter.hxx |5 +
 3 files changed, 3 insertions(+), 12 deletions(-)

New commits:
commit b43d4e1d220b333b7eb17e8a7d914e2cab72985f
Author: Bogdan B 
AuthorDate: Mon Nov 21 19:52:31 2022 +0100
Commit: Ilmari Lauhakangas 
CommitDate: Tue Nov 22 07:47:36 2022 +0100

tdf#143148 Use pragma once instead of include guards

Change-Id: I1e542a5fce00e1c07019a828a7f45f1b7d2fe7c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143054
Tested-by: Jenkins
Tested-by: Ilmari Lauhakangas 
Reviewed-by: Ilmari Lauhakangas 

diff --git a/vcl/source/filter/ixbm/xbmread.hxx 
b/vcl/source/filter/ixbm/xbmread.hxx
index bee3eadc9406..ce8d3d159d56 100644
--- a/vcl/source/filter/ixbm/xbmread.hxx
+++ b/vcl/source/filter/ixbm/xbmread.hxx
@@ -17,13 +17,10 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_VCL_SOURCE_FILTER_IXBM_XBMREAD_HXX
-#define INCLUDED_VCL_SOURCE_FILTER_IXBM_XBMREAD_HXX
+#pragma once
 
 #include 
 
 VCL_DLLPUBLIC bool ImportXBM(SvStream& rStream, Graphic& rGraphic);
 
-#endif // INCLUDED_VCL_SOURCE_FILTER_IXBM_XBMREAD_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/filter/ixpm/rgbtable.hxx 
b/vcl/source/filter/ixpm/rgbtable.hxx
index 1ded061e79db..f8b36ed98a55 100644
--- a/vcl/source/filter/ixpm/rgbtable.hxx
+++ b/vcl/source/filter/ixpm/rgbtable.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_VCL_SOURCE_FILTER_IXPM_RGBTABLE_HXX
-#define INCLUDED_VCL_SOURCE_FILTER_IXPM_RGBTABLE_HXX
+#pragma once
 
 #include 
 
@@ -691,6 +690,4 @@ const XPMRGBTab pRGBTable[] = {
 { nullptr,   0 ,   0,   0}
 };
 
-#endif // INCLUDED_VCL_SOURCE_FILTER_IXPM_RGBTABLE_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/filter/svm/SvmConverter.hxx 
b/vcl/source/filter/svm/SvmConverter.hxx
index 23185dc04b4b..cde32b31fe90 100644
--- a/vcl/source/filter/svm/SvmConverter.hxx
+++ b/vcl/source/filter/svm/SvmConverter.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_VCL_INC_SVMCONVERTER_HXX
-#define INCLUDED_VCL_INC_SVMCONVERTER_HXX
+#pragma once
 
 #include 
 #include 
@@ -87,6 +86,4 @@ private:
 
 extern "C" SAL_DLLPUBLIC_EXPORT bool TestImportSVM(SvStream& rStream);
 
-#endif // INCLUDED_VCL_INC_SVMCONVERTER_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


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

2022-11-21 Thread Bogdan B (via logerrit)
 vcl/source/filter/jpeg/JpegReader.hxx|5 +
 vcl/source/filter/jpeg/JpegTransform.hxx |5 +
 vcl/source/filter/jpeg/jpeg.hxx  |5 +
 3 files changed, 3 insertions(+), 12 deletions(-)

New commits:
commit e1562ac3d7821cee90db383db5734b86691a3887
Author: Bogdan B 
AuthorDate: Mon Nov 21 19:01:51 2022 +0100
Commit: Ilmari Lauhakangas 
CommitDate: Tue Nov 22 07:49:25 2022 +0100

tdf#143148 Use pragma once instead of include guards

Change-Id: I894e3a67b9312b99ac2fd7290dfa73a0dafb28a7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142932
Tested-by: Ilmari Lauhakangas 
Reviewed-by: Ilmari Lauhakangas 

diff --git a/vcl/source/filter/jpeg/JpegReader.hxx 
b/vcl/source/filter/jpeg/JpegReader.hxx
index f9a2eb2929aa..5766ef9a61d9 100644
--- a/vcl/source/filter/jpeg/JpegReader.hxx
+++ b/vcl/source/filter/jpeg/JpegReader.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_VCL_SOURCE_FILTER_JPEG_JPEGREADER_HXX
-#define INCLUDED_VCL_SOURCE_FILTER_JPEG_JPEGREADER_HXX
+#pragma once
 
 #include 
 #include 
@@ -69,6 +68,4 @@ public:
 Bitmap& GetBitmap() { return *mpBitmap; }
 };
 
-#endif // INCLUDED_VCL_SOURCE_FILTER_JPEG_JPEGREADER_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/filter/jpeg/JpegTransform.hxx 
b/vcl/source/filter/jpeg/JpegTransform.hxx
index 2b5c6dfd66ce..09dfe773d12a 100644
--- a/vcl/source/filter/jpeg/JpegTransform.hxx
+++ b/vcl/source/filter/jpeg/JpegTransform.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_VCL_SOURCE_FILTER_JPEG_JPEGTRANSFORM_HXX
-#define INCLUDED_VCL_SOURCE_FILTER_JPEG_JPEGTRANSFORM_HXX
+#pragma once
 
 #include 
 
@@ -35,6 +34,4 @@ public:
 void perform();
 };
 
-#endif // INCLUDED_VCL_SOURCE_FILTER_JPEG_JPEGTRANSFORM_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/filter/jpeg/jpeg.hxx b/vcl/source/filter/jpeg/jpeg.hxx
index 96c9280c2483..1ef39f97903c 100644
--- a/vcl/source/filter/jpeg/jpeg.hxx
+++ b/vcl/source/filter/jpeg/jpeg.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_VCL_SOURCE_FILTER_JPEG_JPEG_HXX
-#define INCLUDED_VCL_SOURCE_FILTER_JPEG_JPEG_HXX
+#pragma once
 
 #include 
 #include 
@@ -34,6 +33,4 @@ bool ExportJPEG(SvStream& rOutputStream,
 const css::uno::Sequence< css::beans::PropertyValue >* 
pFilterData,
 bool* pExportWasGrey);
 
-#endif // INCLUDED_VCL_SOURCE_FILTER_JPEG_JPEG_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


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

2022-11-21 Thread Miklos Vajna (via logerrit)
 sw/qa/filter/ww8/ww8.cxx |   20 
 sw/source/filter/ww8/docxattributeoutput.cxx |   11 ---
 2 files changed, 28 insertions(+), 3 deletions(-)

New commits:
commit 017c38a9702da0566ac1ce5d758444e5ff25df9d
Author: Miklos Vajna 
AuthorDate: Mon Nov 21 20:05:11 2022 +0100
Commit: Miklos Vajna 
CommitDate: Tue Nov 22 08:05:18 2022 +0100

tdf#152045 DOCX export: fix empty display text for content control list 
items

Regression from commit f726fbc2699b05199a8dec3055710a7131e0aad6
(tdf#151261 DOCX import: fix dropdown SDT when the item display text is
missing, 2022-10-10), the problem was that the correct way to represent
"no display value" is not an attribute with empty value but a missing
attribute.

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

diff --git a/sw/qa/filter/ww8/ww8.cxx b/sw/qa/filter/ww8/ww8.cxx
index 1057939d993d..0810a15a54c3 100644
--- a/sw/qa/filter/ww8/ww8.cxx
+++ b/sw/qa/filter/ww8/ww8.cxx
@@ -139,6 +139,26 @@ CPPUNIT_TEST_FIXTURE(Test, testDocxHyperlinkShape)
 // assertion failure for not-well-formed XML output):
 save("Office Open XML Text");
 }
+
+CPPUNIT_TEST_FIXTURE(Test, testDocxContentControlDropdownEmptyDisplayText)
+{
+// Given a document with a dropdown content control, the only list item 
has no display text
+// (only a value):
+mxComponent = loadFromDesktop("private:factory/swriter");
+SwDoc* pDoc = getSwDoc();
+SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+pWrtShell->InsertContentControl(SwContentControlType::DROP_DOWN_LIST);
+
+// When saving to DOCX:
+save("Office Open XML Text");
+
+// Then make sure that no display text attribute is written:
+xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+// Without the accompanying fix in place, this test would have failed with:
+// - XPath '//w:sdt/w:sdtPr/w:dropDownList/w:listItem' unexpected 
'displayText' attribute
+// i.e. we wrote an empty attribute instead of omitting it.
+assertXPathNoAttribute(pXmlDoc, 
"//w:sdt/w:sdtPr/w:dropDownList/w:listItem", "displayText");
+}
 }
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 4a0e4325d580..26ed9d57a95b 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -2415,9 +2415,14 @@ void DocxAttributeOutput::WriteContentControlStart()
 }
 for (const auto& rItem : m_pContentControl->GetListItems())
 {
-m_pSerializer->singleElementNS(XML_w, XML_listItem,
-FSNS(XML_w, XML_displayText), rItem.m_aDisplayText,
-FSNS(XML_w, XML_value), rItem.m_aValue);
+rtl::Reference xAttributes = 
FastSerializerHelper::createAttrList();
+if (!rItem.m_aDisplayText.isEmpty())
+{
+// If there is no display text, need to omit the attribute, 
not write an empty one.
+xAttributes->add(FSNS(XML_w, XML_displayText), 
rItem.m_aDisplayText);
+}
+xAttributes->add(FSNS(XML_w, XML_value), rItem.m_aValue);
+m_pSerializer->singleElementNS(XML_w, XML_listItem, xAttributes);
 }
 if (m_pContentControl->GetComboBox())
 {


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

2022-11-21 Thread Stephan Bergmann (via logerrit)
 l10ntools/inc/xmlparse.hxx|2 +-
 l10ntools/source/xmlparse.cxx |   12 +++-
 2 files changed, 4 insertions(+), 10 deletions(-)

New commits:
commit 337691db0e3f928ed6dff489fc6305a9a5e0b493
Author: Stephan Bergmann 
AuthorDate: Mon Nov 21 11:51:35 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Nov 22 08:14:09 2022 +0100

Simplify previous fix

...e735de2051143347b7283c85ad80b0e2412522dc "Avoid some unnecessary, wrong
downcasts during `make translations"

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

diff --git a/l10ntools/inc/xmlparse.hxx b/l10ntools/inc/xmlparse.hxx
index 0495883a5311..8e7d320affc5 100644
--- a/l10ntools/inc/xmlparse.hxx
+++ b/l10ntools/inc/xmlparse.hxx
@@ -161,7 +161,7 @@ public:
 void Write( OString const &rFilename );
 void Write( std::ofstream &rStream, XMLNode *pCur = nullptr );
 
-bool CheckExportStatus( XMLParentNode *pCur = nullptr );
+bool CheckExportStatus( XMLChildNode *pCur = nullptr );
 
 XMLFile& operator=(const XMLFile& rObj);
 
diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx
index bcf5d37154cb..30da2bebf509 100644
--- a/l10ntools/source/xmlparse.cxx
+++ b/l10ntools/source/xmlparse.cxx
@@ -473,7 +473,7 @@ void XMLFile::SearchL10NElements( XMLChildNode *pCur )
 }
 }
 
-bool XMLFile::CheckExportStatus( XMLParentNode *pCur )
+bool XMLFile::CheckExportStatus( XMLChildNode *pCur )
 {
 static bool bStatusExport = true;
 
@@ -489,7 +489,7 @@ bool XMLFile::CheckExportStatus( XMLParentNode *pCur )
 for ( size_t i = 0; i < GetChildList()->size(); i++ )
 {
 XMLChildNode* pElement = (*GetChildList())[ i ];
-if( pElement->GetNodeType() ==  XMLNodeType::ELEMENT ) 
CheckExportStatus( static_cast(pElement) );//, i);
+if( pElement->GetNodeType() ==  XMLNodeType::ELEMENT ) 
CheckExportStatus( pElement );//, i);
 }
 }
 }
@@ -520,13 +520,7 @@ bool XMLFile::CheckExportStatus( XMLParentNode *pCur )
 else if ( pElement->GetChildList() )
 {
 for (size_t k = 0; k < pElement->GetChildList()->size(); 
++k)
-{
-auto const child = (*pElement->GetChildList())[k];
-auto const type = child->GetNodeType();
-if (type != XMLNodeType::DATA && type != 
XMLNodeType::COMMENT) {
-CheckExportStatus( 
static_cast(child) );
-}
-}
+CheckExportStatus( (*pElement->GetChildList())[k] );
 }
 }
 break;


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

2022-11-21 Thread László Németh (via logerrit)
 sw/qa/extras/layout/data/tdf152106.odt |binary
 sw/qa/extras/layout/layout.cxx |   11 +++
 sw/source/core/layout/fly.cxx  |8 
 3 files changed, 19 insertions(+)

New commits:
commit 9300c36361426e724b28c25a7729543b316b258b
Author: László Németh 
AuthorDate: Fri Nov 18 14:11:30 2022 +0100
Commit: László Németh 
CommitDate: Tue Nov 22 08:23:36 2022 +0100

tdf#152106 sw layout: fix freezing of multicol sections with flys

Loading documents with multicol sections with flys could
freeze Writer. Add loop control for multicol sections to fix it.

Regression from commit 8feac9601cfe35ee0966776bab15d122206f154e
"tdf#138518 sw: layout: avoid moving flys forward prematurely".

Follow-up to ed12269c42f75f553bb8a8770923406f7824e473
"tdf#142080 sw: layout: fix infinite loop in CalcContent()".

Change-Id: I06eb3f5a26b2d2ac3999b98a9661112b8bf7738f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142950
Tested-by: Jenkins
Reviewed-by: László Németh 
(cherry picked from commit 6f0736c2981042f90e83cdd71b3f9c91dbe77661)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142922

diff --git a/sw/qa/extras/layout/data/tdf152106.odt 
b/sw/qa/extras/layout/data/tdf152106.odt
new file mode 100644
index ..49ef5e50b8bd
Binary files /dev/null and b/sw/qa/extras/layout/data/tdf152106.odt differ
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 431bd5a2cca2..9747fd022e30 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -1990,6 +1990,17 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, TestTdf142080)
 "top", OUString::number(nPage9Top + 1460));
 }
 
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf152106)
+{
+// this caused an infinite loop
+load(DATA_DIRECTORY, "tdf152106.odt");
+
+xmlDocUniquePtr pLayout = parseLayoutDump();
+
+// frame on page 3
+assertXPath(pLayout, "/root/page[3]/sorted_objs/fly", 1);
+}
+
 CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf128198)
 {
 SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf128198-1.docx");
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index afe143f158a9..9c61e5590e0a 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -1472,6 +1472,8 @@ void CalcContent( SwLayoutFrame *pLay, bool bNoColl )
 
 // FME 2007-08-30 #i81146# new loop control
 int nLoopControlRuns = 0;
+// tdf#152106 loop control for multi-column sections
+int nLoopControlRunsInMultiCol = 0;
 const int nLoopControlMax = 20;
 const SwFrame* pLoopControlCond = nullptr;
 
@@ -1624,10 +1626,16 @@ void CalcContent( SwLayoutFrame *pLay, bool bNoColl )
 // #i28701# - restart layout process, if
 // requested by floating screen object formatting
 if (bRestartLayoutProcess
+// tdf#152106 loop control in multi-column sections to 
avoid of freezing
+&& nLoopControlRunsInMultiCol < nLoopControlMax
 // tdf#142080 if it was already on next page, and still is,
 // ignore restart, as restart could cause infinite loop
 && (wasFrameLowerOfLay || pLay->IsAnLower(pFrame)))
 {
+bool bIsMultiColumn = pSect && pSect->GetSection() && 
pSect->Lower() &&
+pSect->Lower()->IsColumnFrame() && 
pSect->Lower()->GetNext();
+if ( bIsMultiColumn )
+++nLoopControlRunsInMultiCol;
 pFrame = pLay->ContainsAny();
 pAgainObj1 = nullptr;
 pAgainObj2 = nullptr;


[Libreoffice-commits] core.git: helpcontent2

2022-11-21 Thread Stéphane Guillou (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b8758f3919f99c454cf957b93e6f5394b61d0478
Author: Stéphane Guillou 
AuthorDate: Tue Nov 22 08:53:38 2022 +0100
Commit: Gerrit Code Review 
CommitDate: Tue Nov 22 08:53:38 2022 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to 758a4b21158ff828a95de8d3b441fee792ee6cb6
  - replace "Function" string with correct button name "Formula"

Change-Id: I1abb41a4677e570b2224a2841b699220d3dc7f03
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/142929
Tested-by: Jenkins
Tested-by: Ilmari Lauhakangas 
Reviewed-by: Ilmari Lauhakangas 

diff --git a/helpcontent2 b/helpcontent2
index 7fa50f5c2f72..758a4b21158f 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 7fa50f5c2f7280129f856f3f9fab85ac047a3e2c
+Subproject commit 758a4b21158ff828a95de8d3b441fee792ee6cb6


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

2022-11-21 Thread Stéphane Guillou (via logerrit)
 source/text/scalc/guide/formula_enter.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 758a4b21158ff828a95de8d3b441fee792ee6cb6
Author: Stéphane Guillou 
AuthorDate: Mon Nov 21 16:35:22 2022 +0100
Commit: Ilmari Lauhakangas 
CommitDate: Tue Nov 22 08:53:35 2022 +0100

replace "Function" string with correct button name "Formula"

Change-Id: I1abb41a4677e570b2224a2841b699220d3dc7f03
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/142929
Tested-by: Jenkins
Tested-by: Ilmari Lauhakangas 
Reviewed-by: Ilmari Lauhakangas 

diff --git a/source/text/scalc/guide/formula_enter.xhp 
b/source/text/scalc/guide/formula_enter.xhp
index 1ea5acb80d..7e9eddb68e 100644
--- a/source/text/scalc/guide/formula_enter.xhp
+++ b/source/text/scalc/guide/formula_enter.xhp
@@ -42,7 +42,7 @@
 Click the cell 
in which you want to enter the formula.
 
 
-Click the 
Function icon on the Formula Bar.
+Click the 
Formula icon on the Formula Bar.
 You will now 
see an equals sign in the input line and you can begin to input the 
formula.