[Libreoffice-commits] core.git: Branch 'private/tvajngerl/staging' - 2 commits - include/vcl vcl/inc vcl/Library_vcl.mk vcl/qa vcl/source
Rebased ref, commits from common ancestor: commit b8e5e3d0482f7fb84031896d9b75795b7201545e Author: Tomaž Vajngerl AuthorDate: Thu Mar 18 15:59:20 2021 +0900 Commit: Tomaž Vajngerl CommitDate: Thu Mar 18 16:03:33 2021 +0900 vcl: bring back RGB565 scanline transformer While we don't support this as a Bitmap format anymore, we still need to transform a buffer that is in RGB565 format in some cases. For example backwards compatibility or if a certain bitmap format supports such pixel format. This change also simplifies some scanline transformers by removing code duplication. Change-Id: I64aa258b8b1fbebf0ed174c0d5fdd2f75f382b28 diff --git a/vcl/inc/bitmap/ScanlineTools.hxx b/vcl/inc/bitmap/ScanlineTools.hxx index 98e702549f2b..fcb243e72014 100644 --- a/vcl/inc/bitmap/ScanlineTools.hxx +++ b/vcl/inc/bitmap/ScanlineTools.hxx @@ -16,7 +16,7 @@ namespace vcl::bitmap { -class ScanlineTransformer +class IScanlineTransformer { public: virtual void startLine(sal_uInt8* pLine) = 0; @@ -24,127 +24,163 @@ public: virtual Color readPixel() = 0; virtual void writePixel(Color nColor) = 0; -virtual ~ScanlineTransformer() = default; +virtual ~IScanlineTransformer() = default; }; -class ScanlineTransformer_ARGB final : public ScanlineTransformer +class ScanlineTransformer_RGB565 : public IScanlineTransformer { -private: -sal_uInt8* pData; +protected: +sal_uInt16* mpData; public: -virtual void startLine(sal_uInt8* pLine) override { pData = pLine; } +void startLine(sal_uInt8* pLine) override { mpData = reinterpret_cast(pLine); } -virtual void skipPixel(sal_uInt32 nPixel) override { pData += nPixel << 2; } +void skipPixel(sal_uInt32 nPixel) override { mpData += nPixel; } -virtual Color readPixel() override +Color readPixel() override { -const Color aColor(ColorTransparency, pData[4], pData[1], pData[2], pData[3]); -pData += 4; -return aColor; +sal_uInt8 R = sal_uInt8((*mpData & 0xf800) >> 8); +sal_uInt8 G = sal_uInt8((*mpData & 0x07e0) >> 3); +sal_uInt8 B = sal_uInt8((*mpData & 0x001f) << 3); +mpData++; +return Color(R, G, B); } -virtual void writePixel(Color nColor) override +void writePixel(Color nColor) override { -*pData++ = nColor.GetAlpha(); -*pData++ = nColor.GetRed(); -*pData++ = nColor.GetGreen(); -*pData++ = nColor.GetBlue(); +sal_uInt16 R = (nColor.GetRed() & 0xf8) << 8; +sal_uInt16 G = (nColor.GetGreen() & 0xfc) << 3; +sal_uInt16 B = (nColor.GetBlue() & 0xf8) >> 3; + +*mpData++ = R | G | B; } }; -class ScanlineTransformer_BGR final : public ScanlineTransformer +class ScanlineTransformerBase : public IScanlineTransformer { -private: -sal_uInt8* pData; +protected: +sal_uInt8* mpData; public: -virtual void startLine(sal_uInt8* pLine) override { pData = pLine; } +ScanlineTransformerBase() +: mpData(nullptr) +{ +} -virtual void skipPixel(sal_uInt32 nPixel) override { pData += (nPixel << 1) + nPixel; } +void startLine(sal_uInt8* pLine) override { mpData = pLine; } +}; -virtual Color readPixel() override +class ScanlineTransformer_ARGB final : public ScanlineTransformerBase +{ +public: +void skipPixel(sal_uInt32 nPixel) override { mpData += nPixel << 2; } + +Color readPixel() override { -const Color aColor(pData[2], pData[1], pData[0]); -pData += 3; +const Color aColor(ColorTransparency, mpData[4], mpData[1], mpData[2], mpData[3]); +mpData += 4; return aColor; } -virtual void writePixel(Color nColor) override +void writePixel(Color nColor) override { -*pData++ = nColor.GetBlue(); -*pData++ = nColor.GetGreen(); -*pData++ = nColor.GetRed(); +*mpData++ = nColor.GetAlpha(); +*mpData++ = nColor.GetRed(); +*mpData++ = nColor.GetGreen(); +*mpData++ = nColor.GetBlue(); } }; -class ScanlineTransformer_8BitPalette final : public ScanlineTransformer +class ScanlineTransformer_BGR final : public ScanlineTransformerBase { -private: -sal_uInt8* pData; +public: +void skipPixel(sal_uInt32 nPixel) override { mpData += (nPixel << 1) + nPixel; } + +Color readPixel() override +{ +const Color aColor(mpData[2], mpData[1], mpData[0]); +mpData += 3; +return aColor; +} + +void writePixel(Color nColor) override +{ +*mpData++ = nColor.GetBlue(); +*mpData++ = nColor.GetGreen(); +*mpData++ = nColor.GetRed(); +} +}; + +class ScanlineTransformerPaletteBase : public ScanlineTransformerBase +{ +protected: const BitmapPalette& mrPalette; public: -explicit ScanlineTransformer_8BitPalette(const BitmapPalette& rPalette) -: pData(nullptr) +ScanlineTransformerPaletteBase(const BitmapPa
Minutes from the UX/design meeting 2020-Mar-11
Present: Sascha, Heiko Comments: Regina, Dieter Tickets/Topic * Measurement settings are separate for each module - make it to one setting LibreOffice -wide (edit) + https://bugs.documentfoundation.org/show_bug.cgi?id=40656 + move Tools > Options > (Module) > Measurement Unit to Tools > Option > Language (Heiko) + keep separate since modules might need special units (Regina) + agree with Regina (Sascha), sane default used via locale + cannot follow the idea to specify the page size in Draw in pt and in Writer in cm, for example (Heiko) + would prefer one default and individual settings for each control, see bug 72662 (Heiko) (see also bug 44267 and bug 134448) => comment with recommendation to make it a duplicate * Keyboard accelerator & shortcut assignments -- review divergence from MS Word for reasonable common use cases [accessibility] + https://bugs.documentfoundation.org/show_bug.cgi?id=65911 + we neither have a shortcut for character style (CS) nor the paragraph style (PS); MSO has no shortcut defined for PS + using D makes no sense neither having no shortcut for PS (Heiko) + ctrl+D is occupied by double underline, which is not needed shift+ctrl+D Right-To-Left + Using it quite often with Alt+P for paragraph style, Shift+Alt+P for page style, and Alt+C for character style (Sascha) => go for it as easyhack * Change default pen color and width for presentation + https://bugs.documentfoundation.org/show_bug.cgi?id=135364 + store the last setting is the way to go (and we do so) but do we need to change the default? => no need to change the red and normal * Mark the page gutter area in the preview in the page layout dialog + https://bugs.documentfoundation.org/show_bug.cgi?id=140581 + draw the gutter area with hatching like MSO? + requires to pimp the preview so document canvas and document content are shown as such => no objection to adopt the MSO solution * Feature request: Collapsible objects in Normal view + https://bugs.documentfoundation.org/show_bug.cgi?id=140569 + not a good idea in normal mode (Dieter) + don't see need for a special handling beyond outline content visibility (Heiko) => comment OpenPGP_signature Description: OpenPGP digital signature ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: Branch 'private/tvajngerl/staging' - 751 commits - accessibility/inc accessibility/source android/source avmedia/source basctl/inc basctl/source basegfx/CppunitTest_bas
Rebased ref, commits from common ancestor: commit 6786f4761f211d1beb0471da1ddfe5c51cec23fc Author: Tomaž Vajngerl AuthorDate: Thu Mar 18 15:59:20 2021 +0900 Commit: Tomaž Vajngerl CommitDate: Thu Mar 18 16:20:52 2021 +0900 vcl: bring back RGB565 scanline transformer While we don't support this as a Bitmap format anymore, we still need to transform a buffer that is in RGB565 format in some cases. For example backwards compatibility or if a certain bitmap format supports such pixel format. This change also simplifies some scanline transformers by removing code duplication. Change-Id: I64aa258b8b1fbebf0ed174c0d5fdd2f75f382b28 diff --git a/vcl/inc/bitmap/ScanlineTools.hxx b/vcl/inc/bitmap/ScanlineTools.hxx index 98e702549f2b..fcb243e72014 100644 --- a/vcl/inc/bitmap/ScanlineTools.hxx +++ b/vcl/inc/bitmap/ScanlineTools.hxx @@ -16,7 +16,7 @@ namespace vcl::bitmap { -class ScanlineTransformer +class IScanlineTransformer { public: virtual void startLine(sal_uInt8* pLine) = 0; @@ -24,127 +24,163 @@ public: virtual Color readPixel() = 0; virtual void writePixel(Color nColor) = 0; -virtual ~ScanlineTransformer() = default; +virtual ~IScanlineTransformer() = default; }; -class ScanlineTransformer_ARGB final : public ScanlineTransformer +class ScanlineTransformer_RGB565 : public IScanlineTransformer { -private: -sal_uInt8* pData; +protected: +sal_uInt16* mpData; public: -virtual void startLine(sal_uInt8* pLine) override { pData = pLine; } +void startLine(sal_uInt8* pLine) override { mpData = reinterpret_cast(pLine); } -virtual void skipPixel(sal_uInt32 nPixel) override { pData += nPixel << 2; } +void skipPixel(sal_uInt32 nPixel) override { mpData += nPixel; } -virtual Color readPixel() override +Color readPixel() override { -const Color aColor(ColorTransparency, pData[4], pData[1], pData[2], pData[3]); -pData += 4; -return aColor; +sal_uInt8 R = sal_uInt8((*mpData & 0xf800) >> 8); +sal_uInt8 G = sal_uInt8((*mpData & 0x07e0) >> 3); +sal_uInt8 B = sal_uInt8((*mpData & 0x001f) << 3); +mpData++; +return Color(R, G, B); } -virtual void writePixel(Color nColor) override +void writePixel(Color nColor) override { -*pData++ = nColor.GetAlpha(); -*pData++ = nColor.GetRed(); -*pData++ = nColor.GetGreen(); -*pData++ = nColor.GetBlue(); +sal_uInt16 R = (nColor.GetRed() & 0xf8) << 8; +sal_uInt16 G = (nColor.GetGreen() & 0xfc) << 3; +sal_uInt16 B = (nColor.GetBlue() & 0xf8) >> 3; + +*mpData++ = R | G | B; } }; -class ScanlineTransformer_BGR final : public ScanlineTransformer +class ScanlineTransformerBase : public IScanlineTransformer { -private: -sal_uInt8* pData; +protected: +sal_uInt8* mpData; public: -virtual void startLine(sal_uInt8* pLine) override { pData = pLine; } +ScanlineTransformerBase() +: mpData(nullptr) +{ +} -virtual void skipPixel(sal_uInt32 nPixel) override { pData += (nPixel << 1) + nPixel; } +void startLine(sal_uInt8* pLine) override { mpData = pLine; } +}; -virtual Color readPixel() override +class ScanlineTransformer_ARGB final : public ScanlineTransformerBase +{ +public: +void skipPixel(sal_uInt32 nPixel) override { mpData += nPixel << 2; } + +Color readPixel() override { -const Color aColor(pData[2], pData[1], pData[0]); -pData += 3; +const Color aColor(ColorTransparency, mpData[4], mpData[1], mpData[2], mpData[3]); +mpData += 4; return aColor; } -virtual void writePixel(Color nColor) override +void writePixel(Color nColor) override { -*pData++ = nColor.GetBlue(); -*pData++ = nColor.GetGreen(); -*pData++ = nColor.GetRed(); +*mpData++ = nColor.GetAlpha(); +*mpData++ = nColor.GetRed(); +*mpData++ = nColor.GetGreen(); +*mpData++ = nColor.GetBlue(); } }; -class ScanlineTransformer_8BitPalette final : public ScanlineTransformer +class ScanlineTransformer_BGR final : public ScanlineTransformerBase { -private: -sal_uInt8* pData; +public: +void skipPixel(sal_uInt32 nPixel) override { mpData += (nPixel << 1) + nPixel; } + +Color readPixel() override +{ +const Color aColor(mpData[2], mpData[1], mpData[0]); +mpData += 3; +return aColor; +} + +void writePixel(Color nColor) override +{ +*mpData++ = nColor.GetBlue(); +*mpData++ = nColor.GetGreen(); +*mpData++ = nColor.GetRed(); +} +}; + +class ScanlineTransformerPaletteBase : public ScanlineTransformerBase +{ +protected: const BitmapPalette& mrPalette; public: -explicit ScanlineTransformer_8BitPalette(const BitmapPalette& rPalette) -: pData(nullptr) +ScanlineTransformerPaletteBase(const BitmapPa
[Libreoffice-commits] core.git: solenv/sanitizers sw/source sw/uiconfig
solenv/sanitizers/ui/modules/swriter.suppr |4 sw/source/uibase/docvw/FrameControlsManager.cxx|4 sw/source/uibase/docvw/OutlineContentVisibilityWin.cxx | 83 - sw/source/uibase/inc/OutlineContentVisibilityWin.hxx | 15 ++- sw/uiconfig/swriter/ui/outlinebutton.ui|8 - 5 files changed, 62 insertions(+), 52 deletions(-) New commits: commit 48570b9b5e4939069f8a1a2541fd4efe6f2bb0aa Author: Jim Raykowski AuthorDate: Sat Mar 13 09:49:59 2021 -0900 Commit: Jim Raykowski CommitDate: Thu Mar 18 08:29:11 2021 +0100 tdf#140892 Outline Content Visibility Window button improvements - Makes the horizontal position of the button near to the first character horizontal position in the frame. - For RTL frames places the button to the right. - Changes the button symbol for show/expand content from a right-arrow to a down-arrow and for hide/collapse content from a down-arrow to an up-arrow. - SymbolType enums are replaced with ButtonSymbol enums to represent the button symbol for the outline content visibility state. Change-Id: Ie5d94b0dec0690c0798098ed19e38cc13d9d2682 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112463 Tested-by: Jenkins Reviewed-by: Jim Raykowski diff --git a/solenv/sanitizers/ui/modules/swriter.suppr b/solenv/sanitizers/ui/modules/swriter.suppr index c828774ca825..a3a2bbd9c799 100644 --- a/solenv/sanitizers/ui/modules/swriter.suppr +++ b/solenv/sanitizers/ui/modules/swriter.suppr @@ -122,8 +122,8 @@ sw/uiconfig/swriter/ui/notebookbar_groups.ui://GtkLabel[@id='formatgrouplabel'] sw/uiconfig/swriter/ui/notebookbar_groups.ui://GtkLabel[@id='insertgrouplabel'] orphan-label sw/uiconfig/swriter/ui/notebookbar_groups.ui://GtkLabel[@id='tablegrouplabel'] orphan-label sw/uiconfig/swriter/ui/notebookbar_groups.ui://GtkLabel[@id='imagegrouplabel'] orphan-label -sw/uiconfig/swriter/ui/outlinebutton.ui://GtkButton[@id='right'] button-no-label -sw/uiconfig/swriter/ui/outlinebutton.ui://GtkButton[@id='down'] button-no-label +sw/uiconfig/swriter/ui/outlinebutton.ui://GtkButton[@id='show'] button-no-label +sw/uiconfig/swriter/ui/outlinebutton.ui://GtkButton[@id='hide'] button-no-label sw/uiconfig/swriter/ui/pagemargincontrol.ui://GtkSpinButton[@id='hidden'] no-labelled-by sw/uiconfig/swriter/ui/pagesizecontrol.ui://GtkSpinButton[@id='metric'] no-labelled-by sw/uiconfig/swriter/ui/printmonitordialog.ui://GtkLabel[@id='docname'] orphan-label diff --git a/sw/source/uibase/docvw/FrameControlsManager.cxx b/sw/source/uibase/docvw/FrameControlsManager.cxx index aaf7aefd1302..622d5fced30b 100644 --- a/sw/source/uibase/docvw/FrameControlsManager.cxx +++ b/sw/source/uibase/docvw/FrameControlsManager.cxx @@ -269,7 +269,7 @@ void SwFrameControlsManager::SetOutlineContentVisibilityButton(const SwTextNode* assert(pWin != nullptr) ; pWin->Set(); -if (pWin->GetSymbol() == SymbolType::ARROW_RIGHT) +if (pWin->GetSymbol() == ButtonSymbol::SHOW) { // show expand button immediately pWin->Show(); @@ -308,7 +308,7 @@ void SwFrameControlsManager::SetOutlineContentVisibilityButton(const SwTextNode* } } } -else if (!pWin->IsVisible() && pWin->GetSymbol() == SymbolType::ARROW_DOWN) +else if (!pWin->IsVisible() && pWin->GetSymbol() == ButtonSymbol::HIDE) pWin->ShowAll(true); } diff --git a/sw/source/uibase/docvw/OutlineContentVisibilityWin.cxx b/sw/source/uibase/docvw/OutlineContentVisibilityWin.cxx index 07f5122d1800..3a8284fd4398 100644 --- a/sw/source/uibase/docvw/OutlineContentVisibilityWin.cxx +++ b/sw/source/uibase/docvw/OutlineContentVisibilityWin.cxx @@ -26,8 +26,8 @@ SwOutlineContentVisibilityWin::SwOutlineContentVisibilityWin(SwEditWin* pEditWin, const SwFrame* pFrame) : InterimItemWindow(pEditWin, "modules/swriter/ui/outlinebutton.ui", "OutlineButton") -, m_xRightBtn(m_xBuilder->weld_button("right")) -, m_xDownBtn(m_xBuilder->weld_button("down")) +, m_xShowBtn(m_xBuilder->weld_button("show")) +, m_xHideBtn(m_xBuilder->weld_button("hide")) , m_pEditWin(pEditWin) , m_pFrame(pFrame) , m_nDelayAppearing(0) @@ -38,19 +38,19 @@ SwOutlineContentVisibilityWin::SwOutlineContentVisibilityWin(SwEditWin* pEditWin SetPaintTransparent(false); SetBackground(rStyleSettings.GetFaceColor()); -Size aBtnsSize(m_xRightBtn->get_preferred_size()); +Size aBtnsSize(m_xShowBtn->get_preferred_size()); auto nDim = std::max(aBtnsSize.Width(), aBtnsSize.Height()); -m_xRightBtn->set_size_request(nDim, nDim); -m_xDownBtn->set_size_request(nDim, nDim); +m_xShowBtn->set_size_request(nDim, nDim); +m_xHideBtn->set_size_request(nDim, nDim); SetSizePixel(get_preferred_size()); -SetSymbol(SymbolType::DONTKNOW); +SetSymbol(ButtonSymbol::NONE);
[Libreoffice-commits] core.git: sot/source
sot/source/base/formats.cxx | 14 -- 1 file changed, 14 deletions(-) New commits: commit c08271500f6a13e80f739e2609b86ca8351f681e Author: Miklos Vajna AuthorDate: Wed Mar 17 21:04:16 2021 +0100 Commit: Miklos Vajna CommitDate: Thu Mar 18 09:07:30 2021 +0100 sot: clean up not needed HAVE_FEATURE_PDFIUM ifdefs Now that pdfium is an impl detail of vcl, sot can just assume pdfium is always there. If the build disabled pdfium (which would lead to e.g. broken pdf signatures, so it's more just a debug option), then we can still call into the pdf import filter, it will just fail. Towards completely avoiding the HAVE_FEATURE_PDFIUM ifdef forest. Change-Id: I6479644d97c48161bb01e2a7dc5b865adeaebfa1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112657 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/sot/source/base/formats.cxx b/sot/source/base/formats.cxx index ac1f5e5c550d..8901064d6901 100644 --- a/sot/source/base/formats.cxx +++ b/sot/source/base/formats.cxx @@ -17,8 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include - #include #include #include @@ -335,9 +333,7 @@ SotAction_Impl const aEXCHG_DEST_DOC_GRAPHOBJ_Def[] = { { SotClipboardFormatId::GDIMETAFILE, EXCHG_IN_ACTION_COPY }, { SotClipboardFormatId::DRAWING, EXCHG_IN_ACTION_COPY }, -#if HAVE_FEATURE_PDFIUM { SotClipboardFormatId::PDF, EXCHG_IN_ACTION_COPY }, -#endif { SotClipboardFormatId::PNG, EXCHG_IN_ACTION_COPY }, { SotClipboardFormatId::JPEG, EXCHG_IN_ACTION_COPY }, { SotClipboardFormatId::BITMAP, EXCHG_IN_ACTION_COPY }, @@ -358,9 +354,7 @@ SotAction_Impl const aEXCHG_DEST_DOC_GRAPHOBJ_Move[] = { SotClipboardFormatId::DRAWING, EXCHG_OUT_ACTION_REPLACE_DRAWOBJ, SotExchangeActionFlags::InsertImageMap | SotExchangeActionFlags::InsertTargetUrl, 0 }, { SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_REPLACE_SVXB, SotExchangeActionFlags::InsertImageMap | SotExchangeActionFlags::InsertTargetUrl, 0 }, { SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_REPLACE_GDIMETAFILE, SotExchangeActionFlags::InsertImageMap | SotExchangeActionFlags::InsertTargetUrl, 0 }, -#if HAVE_FEATURE_PDFIUM { SotClipboardFormatId::PDF, EXCHG_OUT_ACTION_INSERT_GRAPH, SotExchangeActionFlags::InsertImageMap | SotExchangeActionFlags::InsertTargetUrl, 0 }, -#endif { SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_REPLACE_BITMAP, SotExchangeActionFlags::InsertImageMap | SotExchangeActionFlags::InsertTargetUrl, 0 }, { SotClipboardFormatId::JPEG, EXCHG_OUT_ACTION_REPLACE_BITMAP, SotExchangeActionFlags::InsertImageMap | SotExchangeActionFlags::InsertTargetUrl, 0 }, { SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_REPLACE_BITMAP, SotExchangeActionFlags::InsertImageMap | SotExchangeActionFlags::InsertTargetUrl, 0 }, @@ -376,9 +370,7 @@ SotAction_Impl const aEXCHG_DEST_DOC_GRAPHOBJ_Copy[] = { SotClipboardFormatId::DRAWING, EXCHG_OUT_ACTION_INSERT_DRAWOBJ, SotExchangeActionFlags::InsertImageMap | SotExchangeActionFlags::InsertTargetUrl, 0 }, { SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_INSERT_SVXB, SotExchangeActionFlags::InsertImageMap | SotExchangeActionFlags::InsertTargetUrl, 0 }, { SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE, SotExchangeActionFlags::InsertImageMap | SotExchangeActionFlags::InsertTargetUrl, 0 }, -#if HAVE_FEATURE_PDFIUM { SotClipboardFormatId::PDF, EXCHG_OUT_ACTION_INSERT_GRAPH, SotExchangeActionFlags::InsertImageMap | SotExchangeActionFlags::InsertTargetUrl, 0 }, -#endif { SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_INSERT_BITMAP, SotExchangeActionFlags::InsertImageMap | SotExchangeActionFlags::InsertTargetUrl, 0 }, { SotClipboardFormatId::JPEG, EXCHG_OUT_ACTION_INSERT_BITMAP, SotExchangeActionFlags::InsertImageMap | SotExchangeActionFlags::InsertTargetUrl, 0 }, { SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP, SotExchangeActionFlags::InsertImageMap | SotExchangeActionFlags::InsertTargetUrl, 0 }, @@ -836,9 +828,7 @@ SotAction_Impl const aEXCHG_DEST_SWDOC_FREE_AREA_Def[] = { SotClipboardFormatId::DRAWING, EXCHG_IN_ACTION_COPY }, { SotClipboardFormatId::SVXB, EXCHG_IN_ACTION_COPY }, { SotClipboardFormatId::GDIMETAFILE, EXCHG_IN_ACTION_COPY }, -#if HAVE_FEATURE_PDFIUM { SotClipboardFormatId::PDF, EXCHG_IN_ACTION_COPY }, -#endif { SotClipboardFormatId::PNG, EXCHG_IN_ACTION_COPY }, { SotClipboardFormatId::JPEG, EXCHG_IN_ACTION_COPY }, { SotClipboardFormatId::BITMAP, EXCHG_IN_ACTION_COPY }, @@ -869,9 +859,7 @@ SotAction_Impl const aEXCHG_DEST_SWDOC_FREE_AREA_Move[] = { SotClipboardFormatId::RICHTEXT, EXCHG_IN_ACTION_COPY, SotExchangeActionFlags::InsertTargetUrl, 0 }, { SotClipboardFormatId::STRING, EXCHG_OUT_ACTION_INSERT_STRING }, { SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE, SotExchangeAc
[Libreoffice-commits] core.git: oox/source sw/qa
oox/source/drawingml/shape.cxx |9 -- sw/qa/extras/ooxmlimport/data/tdf118693.docx |binary sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 12 +--- sw/qa/extras/ooxmlimport/ooxmlimport2.cxx| 37 +++ 4 files changed, 40 insertions(+), 18 deletions(-) New commits: commit c9e5640c8fcad7beb42a66f9bee0252eee9fe323 Author: Xisco Fauli AuthorDate: Thu Mar 18 00:48:49 2021 +0100 Commit: Miklos Vajna CommitDate: Thu Mar 18 09:15:32 2021 +0100 tdf#118693: no need to use convertMm100ToTwip() for line shapes anymore It was introduced in 11129d89b152db54c86bb2bda58c24b8abb6c5a8 < tdf#85232 WPG import: fix handling of line shapes > and later in 36bade04d3780bc54c51b46bb0b63e69789658a5 < tdf106792 Get rid of SvxShapePolyPolygonBezier > ForceMetricToItemPoolMetric was added to SvxShapePolyPolygon::setPropertyValueImpl to convert from 100thmm to twips as can be read in the comment in testTdf85232 With this change, xShape->getPosition().X in testTdf85232 is 2267, which was already in twips Change-Id: I30b757885327a477213f96f8f84541971f435164 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112663 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index 469dc7c30c17..45a7a7e64307 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -852,7 +852,6 @@ Reference< XShape > const & Shape::createAndInsert( uno::Sequence< awt::Point > aPointSequence( nNumPoints ); awt::Point* pPoints = aPointSequence.getArray(); uno::Reference xModelInfo(rFilterBase.getModel(), uno::UNO_QUERY); -bool bIsWriter = xModelInfo->supportsService("com.sun.star.text.TextDocument"); for( i = 0; i < nNumPoints; ++i ) { const basegfx::B2DPoint aPoint( aPoly.getB2DPoint( i ) ); @@ -860,13 +859,7 @@ Reference< XShape > const & Shape::createAndInsert( // tdf#106792 Not needed anymore due to the change in SdrPathObj::NbcResize: // tdf#96674: Guard against zero width or height. -if (bIsWriter && bNoTranslation) -// Writer's draw page is in twips, and these points get passed -// to core without any unit conversion when Writer -// postprocesses only the group shape itself. -pPoints[i] = awt::Point(static_cast(convertMm100ToTwip(aPoint.getX())), static_cast(convertMm100ToTwip(aPoint.getY(; -else -pPoints[i] = awt::Point(static_cast(aPoint.getX()), static_cast(aPoint.getY())); +pPoints[i] = awt::Point(static_cast(aPoint.getX()), static_cast(aPoint.getY())); } uno::Sequence< uno::Sequence< awt::Point > > aPolyPolySequence( 1 ); aPolyPolySequence.getArray()[ 0 ] = aPointSequence; diff --git a/sw/qa/extras/ooxmlimport/data/tdf118693.docx b/sw/qa/extras/ooxmlimport/data/tdf118693.docx new file mode 100644 index ..4e832398bcd5 Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/tdf118693.docx differ diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 16351d9fcb35..8163c0c10377 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -1346,16 +1346,8 @@ DECLARE_OOXMLIMPORT_TEST(testTdf85232, "tdf85232.docx") // Make sure we're not testing the ellipse child. CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.drawing.LineShape"), xShapeDescriptor->getShapeType()); -// tdf#106792 checked that during load of tdf85232.docx the method -// SvxShapePolyPolygon::setPropertyValueImpl is used three times. In -// that method, a call to ForceMetricToItemPoolMetric was missing so -// that the import did not convert the input values from 100thmm -// to twips what is needed due to the object residing in Writer. The -// UNO API by definition is in 100thmm. Result is that in SwXShape::getPosition -// the offset (aOffset) now is (0, 0) instead of an existing offset in -// the load of the document before (what is plausible for a GroupObject). -// Thus, I will adapt the result value here to the now (hopefully) correct one. -CPPUNIT_ASSERT_EQUAL(static_cast(1630), xShape->getPosition().X); // was: 2267 +// This was 2900: horizontal position of the line was incorrect, the 3 children were not connected visually. +CPPUNIT_ASSERT_EQUAL(static_cast(2267), xShape->getPosition().X); } DECLARE_OOXMLIMPORT_TEST(testTdf95755, "tdf95755.docx") diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx index 474cfbe2b13d..fcfaccafb774 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx @@ -196,6 +196,43 @@ DECLARE_OOXMLIMPORT_TEST(testTdf120547, "tdf12054
Subject: Mani Kumar license statement
Hi LbireOffice Please find my license statement below. *All of my past & future contributions to LibreOffice may belicensed under the MPLv2/LGPLv3+ dual license.* Regards Mani ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: starmath/inc starmath/source
starmath/inc/edit.hxx|1 starmath/inc/node.hxx| 23 -- starmath/inc/parse5.hxx |1 starmath/inc/token.hxx | 18 --- starmath/source/edit.cxx |2 starmath/source/node.cxx |4 - starmath/source/parse5.cxx | 98 +++ starmath/source/view.cxx |9 --- starmath/source/visitors.cxx | 27 +++ 9 files changed, 132 insertions(+), 51 deletions(-) New commits: commit b3b1936ecdf5396892849d0e90d94324fad609ac Author: dante AuthorDate: Sun Mar 14 19:11:58 2021 +0100 Commit: Noel Grandin CommitDate: Thu Mar 18 09:48:25 2021 +0100 Use ESelection to locate code on node instead of SmToken Will allow to use different input sources besides starmath code. Also, for adopting mathml standar the purpose is to make smnodes separate from the starmath code. Change-Id: Iefab5943cf59a8d2e31f5d59406c253fbe680ead Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112477 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/starmath/inc/edit.hxx b/starmath/inc/edit.hxx index 78ab94bbd702..279c06867dc2 100644 --- a/starmath/inc/edit.hxx +++ b/starmath/inc/edit.hxx @@ -22,7 +22,6 @@ #include #include #include -#include class SmDocShell; class SmViewShell; diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx index acbedccc7c2a..7014f7c2363f 100644 --- a/starmath/inc/node.hxx +++ b/starmath/inc/node.hxx @@ -67,6 +67,8 @@ #include "format.hxx" #include "nodetype.hxx" +#include + enum class FontAttribute { None = 0x, Bold = 0x0001, @@ -120,9 +122,12 @@ enum class SmScaleMode class SmNode : public SmRect { - +// Rendering info for SmRect SmFace maFace; +// Anclage to the code SmToken maNodeToken; +ESelection m_aESelection; +// Node information SmNodeType meType; SmScaleMode meScaleMode; RectHorAlignmeRectHorAlign; @@ -340,14 +345,14 @@ public: * It is used to do the visual <-> text correspondence. * @return line */ -sal_uInt16 GetRow() const { return sal::static_int_cast(maNodeToken.nRow); } +sal_uInt16 GetRow() const { return sal::static_int_cast(m_aESelection.nStartPara); } /** * Gets the column of the line in the text where the node is located. * It is used to do the visual <-> text correspondence. * @return column */ -sal_uInt16 GetColumn() const { return sal::static_int_cast(maNodeToken.nCol); } +sal_uInt16 GetColumn() const { return sal::static_int_cast(m_aESelection.nStartPos); } /** * Gets the scale mode. @@ -381,6 +386,18 @@ public: const SmToken & GetToken() const { return maNodeToken; } SmToken & GetToken() { return maNodeToken; } +/** + * Gets node position in input text. + * @return node position in input text + */ +ESelection GetSelection() const { return m_aESelection; } + +/** + * Gets node position in input text. + * @param aESelection + */ +void SetSelection(ESelection aESelection) { m_aESelection = aESelection; } + /** * Finds the node from the position in the text. * It is used to do the visual <-> text correspondence. diff --git a/starmath/inc/parse5.hxx b/starmath/inc/parse5.hxx index 1d312351fb36..bfc09a139e5a 100644 --- a/starmath/inc/parse5.hxx +++ b/starmath/inc/parse5.hxx @@ -29,6 +29,7 @@ class SmParser5 : public AbstractSmParser { OUString m_aBufferString; SmToken m_aCurToken; +ESelection m_aCurESelection; std::vector m_aErrDescList; int m_nCurError; sal_Int32 m_nBufferIndex, m_nTokenIndex; diff --git a/starmath/inc/token.hxx b/starmath/inc/token.hxx index 8555d745fc72..e38b3e5afb5a 100644 --- a/starmath/inc/token.hxx +++ b/starmath/inc/token.hxx @@ -223,17 +223,11 @@ struct SmToken TG nGroup; sal_uInt16 nLevel; -// token position -sal_Int32 nRow; // 1-based -sal_Int32 nCol; // 1-based - SmToken() : eType(TUNKNOWN) , cMathChar('\0') , nGroup(TG::NONE) , nLevel(0) -, nRow(0) -, nCol(0) { } @@ -244,8 +238,6 @@ struct SmToken , cMathChar(cMath) , nGroup(nTokenGroup) , nLevel(nTokenLevel) -, nRow(0) -, nCol(0) { } @@ -256,8 +248,6 @@ struct SmToken cMathChar = OUString(&aTokenTableEntry.cMathChar, 1); nGroup = aTokenTableEntry.nGroup; nLevel = aTokenTableEntry.nLevel; -nRow = 0; -nCol = 0; } void operator=(const SmTokenTableEntry* aTokenTableEntry) @@ -267,8 +257,6 @@ struct SmToken cMathChar = OUString(&aTokenTableEntry->cMathChar, 1); nGroup = aTokenTableEntry->nGroup; nLevel = aTokenTableEntry->nLevel; -nRow = 0; -nCol = 0; } void operator=(const SmColorTokenTableEnt
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - include/xmloff xmloff/source xmlsecurity/source
include/xmloff/xmlimp.hxx|6 include/xmloff/xmlnmspe.hxx |7 include/xmloff/xmltoken.hxx | 13 xmloff/source/core/xmlimp.cxx| 26 xmloff/source/core/xmltoken.cxx | 13 xmloff/source/token/tokens.txt | 10 xmlsecurity/source/helper/xsecparser.cxx | 1634 --- xmlsecurity/source/helper/xsecparser.hxx | 99 - 8 files changed, 1427 insertions(+), 381 deletions(-) New commits: commit ad5930e87e788780a255523f106deb1dde5d7b37 Author: Michael Stahl AuthorDate: Fri Feb 12 16:42:51 2021 +0100 Commit: Caolán McNamara CommitDate: Thu Mar 18 09:50:20 2021 +0100 xmlsecurity: replace XSecParser implementation Implement Namespaces in XML and follow xmldsig-core and XAdES schemas. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110833 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 12b15be8f4f930a04d8056b9219ac969b42a9784) xmlsecurity: move XSecParser state into contexts Reviewed-on: https://gerrit.libreoffice.org/c/core/+/58 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 59df9e70ce1a7ec797b836bda7f9642912febc53) xmlsecurity: move XSecParser Reference state into contexts Reviewed-on: https://gerrit.libreoffice.org/c/core/+/59 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit cfeb89a758b5f0ec406f0d72444e52ed2f47b85e) Change-Id: I03537b51bb757ecbfa63a826b38de543c70ba032 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111907 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/include/xmloff/xmlimp.hxx b/include/xmloff/xmlimp.hxx index 7f08609189ab..86871b7df445 100644 --- a/include/xmloff/xmlimp.hxx +++ b/include/xmloff/xmlimp.hxx @@ -240,8 +240,12 @@ class XMLOFF_DLLPUBLIC SvXMLImport : public cppu::WeakImplHelper< static void initializeNamespaceMaps(); void registerNamespaces(); -std::unique_ptr processNSAttributes( +public: +static std::unique_ptr processNSAttributes( +std::unique_ptr & rpNamespaceMap, +SvXMLImport *const pImport, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList); +private: void Characters(const OUString& aChars); css::uno::Reference< css::task::XStatusIndicator > mxStatusIndicator; diff --git a/include/xmloff/xmlnmspe.hxx b/include/xmloff/xmlnmspe.hxx index d45832f02d81..cabdcc7578e2 100644 --- a/include/xmloff/xmlnmspe.hxx +++ b/include/xmloff/xmlnmspe.hxx @@ -69,6 +69,13 @@ constexpr sal_uInt16 XML_NAMESPACE_TCD = 34; // text conversion di constexpr sal_uInt16 XML_NAMESPACE_DLG = 35; constexpr sal_uInt16 XML_NAMESPACE_REPORT = 36; constexpr sal_uInt16 XML_NAMESPACE_VERSIONS_LIST = 37; +// OOo extension digital signatures, used in ODF 1.1 +constexpr sal_uInt16 XML_NAMESPACE_DSIG_OOO =38; +// ODF 1.2 digital signature namespaces +constexpr sal_uInt16 XML_NAMESPACE_DSIG =39; +constexpr sal_uInt16 XML_NAMESPACE_DS = 40; +constexpr sal_uInt16 XML_NAMESPACE_XADES132 =41; +constexpr sal_uInt16 XML_NAMESPACE_XADES141 =42; // namespaces for ODF extended formats constexpr sal_uInt16 XML_NAMESPACE_EXT_BASE = 50; diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx index 49178ebdc996..b6956245ed17 100644 --- a/include/xmloff/xmltoken.hxx +++ b/include/xmloff/xmltoken.hxx @@ -135,6 +135,19 @@ namespace xmloff::token { XML_NP_GRDDL, XML_N_GRDDL, +// OOo extension digital signatures, used in ODF 1.1 +XML_NP_DSIG_OOO, +XML_N_DSIG_OOO, +// ODF 1.2 digital signatures +XML_NP_DSIG, +XML_N_DSIG, +XML_NP_DS, +XML_N_DS, +XML_NP_XADES132, +XML_N_XADES132, +XML_NP_XADES141, +XML_N_XADES141, + // ODF Enhanced namespaces XML_NP_OFFICE_EXT, XML_N_OFFICE_EXT, diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index 0c9e9d06cfd4..18429cc4860f 100644 --- a/xmloff/source/core/xmlimp.cxx +++ b/xmloff/source/core/xmlimp.cxx @@ -665,6 +665,8 @@ void SAL_CALL SvXMLImport::endDocument() } std::unique_ptr SvXMLImport::processNSAttributes( +std::unique_ptr & rpNamespaceMap, +SvXMLImport *const pImport, // TODO??? const uno::Reference< xml::sax::XAttributeList >& xAttrList) { std::unique_ptr pRewindMap; @@ -672,12 +674,13 @@ std::unique_ptr SvXMLImport::processNSAttributes( for( sal_Int16 i=0; i < nAttrCount; i++ ) { const OUString& rAttrName = xAttrList->getNameByIndex( i ); -if ( rAttrName == "office:version" ) +if (pImport && rAttrName == "office:version") { -mpImpl->aODFVersion = xAttrList->getValueByIndex( i ); +pImport->mpImpl->a
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - include/svl xmlsecurity/inc xmlsecurity/source
include/svl/sigstruct.hxx|7 +- xmlsecurity/inc/xsecctl.hxx |5 - xmlsecurity/source/helper/ooxmlsecparser.cxx |4 - xmlsecurity/source/helper/xsecctl.cxx|2 xmlsecurity/source/helper/xsecparser.cxx | 81 +-- xmlsecurity/source/helper/xsecparser.hxx |6 -- xmlsecurity/source/helper/xsecsign.cxx |4 - xmlsecurity/source/helper/xsecverify.cxx | 39 + 8 files changed, 68 insertions(+), 80 deletions(-) New commits: commit abe77c4fcb9ea97d9fff07eaea6d8863bcba5b02 Author: Michael Stahl AuthorDate: Thu Feb 18 19:22:31 2021 +0100 Commit: Caolán McNamara CommitDate: Thu Mar 18 09:50:39 2021 +0100 xmlsecurity: XSecParser confused about multiple timestamps LO writes timestamp both to dc:date and xades:SigningTime elements. The parser tries to avoid reading multiple dc:date, preferring the first one, but doesn't care about multiple xades:SigningTime, for undocumented reasons. Ideally something should check all read values for consistency. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/60 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 4ab8d9c09a5873ca0aea56dafa1ab34758d52ef7) xmlsecurity: remove XSecController::setPropertyId() Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111252 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit d2a345e1163616fe3201ef1d6c758e2e819214e0) Change-Id: Ic018ee89797a1c8a4f870ae102af48006de930ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111908 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/include/svl/sigstruct.hxx b/include/svl/sigstruct.hxx index 38c1ee5ed142..d62ecb09634c 100644 --- a/include/svl/sigstruct.hxx +++ b/include/svl/sigstruct.hxx @@ -103,6 +103,9 @@ struct SignatureInformation // XAdES EncapsulatedX509Certificate values std::set maEncapsulatedX509Certificates; +OUString ouSignatureId; +// signature may contain multiple time stamps - check they're consistent +bool hasInconsistentSigningTime = false; //We also keep the date and time as string. This is done when this //structure is created as a result of a XML signature being read. //When then a signature is added or another removed, then the original @@ -115,8 +118,8 @@ struct SignatureInformation //and the converted time is written back, then the string looks different //and the signature is broken. OUString ouDateTime; -OUString ouSignatureId; -OUString ouPropertyId; +/// The Id attribute of the element that contains the . +OUString ouDateTimePropertyId; /// Characters of the element inside the signature. OUString ouDescription; /// The Id attribute of the element that contains the . diff --git a/xmlsecurity/inc/xsecctl.hxx b/xmlsecurity/inc/xsecctl.hxx index 324f1c43388b..759a660d90ad 100644 --- a/xmlsecurity/inc/xsecctl.hxx +++ b/xmlsecurity/inc/xsecctl.hxx @@ -271,8 +271,8 @@ private: void setGpgCertificate( OUString const & ouGpgCert ); void setGpgOwner( OUString const & ouGpgOwner ); -void setDate( OUString const & ouDate ); -void setDescription(const OUString& rDescription); +void setDate(OUString const& rId, OUString const& ouDate); +void setDescription(OUString const& rId, OUString const& rDescription); void setCertDigest(const OUString& rCertDigest); void setValidSignatureImage(const OUString& rValidSigImg); void setInvalidSignatureImage(const OUString& rInvalidSigImg); @@ -283,7 +283,6 @@ public: private: void setId( OUString const & ouId ); -void setPropertyId( OUString const & ouPropertyId ); css::uno::Reference< css::xml::crypto::sax::XReferenceResolvedListener > prepareSignatureToRead( sal_Int32 nSecurityId ); diff --git a/xmlsecurity/source/helper/ooxmlsecparser.cxx b/xmlsecurity/source/helper/ooxmlsecparser.cxx index c22e8c2261bf..a200de60c07a 100644 --- a/xmlsecurity/source/helper/ooxmlsecparser.cxx +++ b/xmlsecurity/source/helper/ooxmlsecparser.cxx @@ -192,12 +192,12 @@ void SAL_CALL OOXMLSecParser::endElement(const OUString& rName) } else if (rName == "mdssi:Value") { -m_pXSecController->setDate(m_aMdssiValue); +m_pXSecController->setDate("", m_aMdssiValue); m_bInMdssiValue = false; } else if (rName == "SignatureComments") { -m_pXSecController->setDescription(m_aSignatureComments); +m_pXSecController->setDescription("", m_aSignatureComments); m_bInSignatureComments = false; } else if (rName == "X509IssuerName") diff --git a/xmlsecurity/source/helper/xsecctl.cxx b/xmlsecurity/source/helper/xsecctl.cxx index cac30006b6a7..e3df9a85f6da 100644 --- a/xmlsecurity/source/helper/xsecctl.cxx +++ b/xmlsecurity/source/helper/xsecc
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - xmlsecurity/inc xmlsecurity/source
xmlsecurity/inc/xsecctl.hxx |1 xmlsecurity/source/helper/xsecparser.cxx | 290 +-- xmlsecurity/source/helper/xsecparser.hxx |1 xmlsecurity/source/helper/xsecverify.cxx | 19 ++ 4 files changed, 221 insertions(+), 90 deletions(-) New commits: commit 94ce59dd02fcfcaa1eb4f195b45a9a2edbd58242 Author: Michael Stahl AuthorDate: Fri Feb 19 17:56:21 2021 +0100 Commit: Caolán McNamara CommitDate: Thu Mar 18 09:50:59 2021 +0100 xmlsecurity: ignore elements in ds:Object that aren't signed Change-Id: I2e4411f0907b89e7ad6e0185cee8f12b600515e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111253 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 2bfa00e6bf4b2a310a8b8f5060acec85b5f7a3ce) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111909 Reviewed-by: Caolán McNamara diff --git a/xmlsecurity/inc/xsecctl.hxx b/xmlsecurity/inc/xsecctl.hxx index 759a660d90ad..ec3669128d24 100644 --- a/xmlsecurity/inc/xsecctl.hxx +++ b/xmlsecurity/inc/xsecctl.hxx @@ -252,6 +252,7 @@ private: /// Sets algorithm from . void setSignatureMethod(svl::crypto::SignatureMethodAlgorithm eAlgorithmID); void switchGpgSignature(); +bool haveReferenceForId(OUString const& rId) const; void addReference( const OUString& ouUri, sal_Int32 nDigestID, diff --git a/xmlsecurity/source/helper/xsecparser.cxx b/xmlsecurity/source/helper/xsecparser.cxx index 1418b7b43b46..f46277f96ea1 100644 --- a/xmlsecurity/source/helper/xsecparser.cxx +++ b/xmlsecurity/source/helper/xsecparser.cxx @@ -95,6 +95,42 @@ auto XSecParser::Context::CreateChildContext( return std::make_unique(m_rParser, std::move(pOldNamespaceMap)); } +/** +note: anything in ds:Object should be trusted *only* if there is a ds:Reference + to it so it is signed (exception: the xades:EncapsulatedX509Certificate). + ds:SignedInfo precedes all ds:Object. + + There may be multiple ds:Signature for purpose of counter-signatures + but the way XAdES describes these, only the ds:SignatureValue element + would be referenced, so requiring a ds:Reference for anything in + ds:Object shouldn't cause issues. + */ +class XSecParser::ReferencedContextImpl +: public XSecParser::Context +{ +protected: +bool m_isReferenced; + +public: +ReferencedContextImpl(XSecParser & rParser, +std::unique_ptr pOldNamespaceMap, +bool const isReferenced) +: XSecParser::Context(rParser, std::move(pOldNamespaceMap)) +, m_isReferenced(isReferenced) +{ +} + +OUString CheckIdAttrReferenced(css::uno::Reference const& xAttrs) +{ +OUString const id(m_rParser.HandleIdAttr(xAttrs)); +if (!id.isEmpty() && m_rParser.m_pXSecController->haveReferenceForId(id)) +{ +m_isReferenced = true; +} +return id; +} +}; + class XSecParser::LoPGPOwnerContext : public XSecParser::Context { @@ -228,21 +264,29 @@ class XSecParser::DsX509CertificateContext }; class XSecParser::DsX509SerialNumberContext -: public XSecParser::Context +: public XSecParser::ReferencedContextImpl { private: OUString m_Value; public: DsX509SerialNumberContext(XSecParser & rParser, -std::unique_ptr pOldNamespaceMap) -: XSecParser::Context(rParser, std::move(pOldNamespaceMap)) +std::unique_ptr pOldNamespaceMap, +bool const isReferenced) +: ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced) { } virtual void EndElement() override { -m_rParser.m_pXSecController->setX509SerialNumber(m_Value); +if (m_isReferenced) +{ +m_rParser.m_pXSecController->setX509SerialNumber(m_Value); +} +else +{ +SAL_INFO("xmlsecurity.helper", "ignoring unsigned X509SerialNumber"); +} } virtual void Characters(OUString const& rChars) override @@ -252,21 +296,29 @@ class XSecParser::DsX509SerialNumberContext }; class XSecParser::DsX509IssuerNameContext -: public XSecParser::Context +: public XSecParser::ReferencedContextImpl { private: OUString m_Value; public: DsX509IssuerNameContext(XSecParser & rParser, -std::unique_ptr pOldNamespaceMap) -: XSecParser::Context(rParser, std::move(pOldNamespaceMap)) +std::unique_ptr pOldNamespaceMap, +bool const isReferenced) +: ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced) { } virtual void EndElement() override { -m_rParser.m_pXSecController->setX509IssuerName(m
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/inc sw/qa sw/source
sw/inc/crsrsh.hxx |2 - sw/qa/extras/uiwriter/uiwriter.cxx | 49 + sw/source/core/crsr/crsrsh.cxx | 10 ++- 3 files changed, 53 insertions(+), 8 deletions(-) New commits: commit 28757ce2246f2598c8ace45f87225eaabbdaf8f0 Author: Xisco Fauli AuthorDate: Wed Mar 3 17:10:40 2021 +0100 Commit: Caolán McNamara CommitDate: Thu Mar 18 09:54:20 2021 +0100 tdf#93441: Revert "Fix fdo#38884 Improve Up/Down movement in writer" This reverts commit d58bea0ffa2a2fe79103ab7aa743aea63e27a0fd it's really unclear to me what the original commit tries to fix. https://bugs.documentfoundation.org/show_bug.cgi?id=38884#c6 gives some information but the behaviour described there is the same with or without the commit applied. The discussion in https://gerrit.libreoffice.org/c/core/+/11500 doesn't give much information either. Change-Id: Iadd8cb6e869fd26654bb0301fbc30ea4f2d39fdf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111932 Tested-by: Jenkins Reviewed-by: Xisco Fauli Signed-off-by: Xisco Fauli Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112535 Reviewed-by: Jim Raykowski Reviewed-by: Caolán McNamara diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index 572afdfd4f51..daf77e04c760 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -341,7 +341,7 @@ public: // start parenthesing, hide SV-Cursor and selected areas void StartAction(); // end parenthesing, show SV-Cursor and selected areas -void EndAction( const bool bIdleEnd = false, const bool DoSetPosX = false ); +void EndAction( const bool bIdleEnd = false ); // basic cursor travelling tools::Long GetUpDownX() const { return m_nUpDownX; } diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index d7e7519acdda..702dc90636fd 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -213,6 +213,9 @@ public: void testCreatePortions(); void testBookmarkUndo(); void testFdo85876(); +void testCaretPositionMovingUp(); +void testTdf93441(); +void testTdf81226(); void testTdf79717(); void testTdf137532(); void testFdo87448(); @@ -445,6 +448,9 @@ public: CPPUNIT_TEST(testCreatePortions); CPPUNIT_TEST(testBookmarkUndo); CPPUNIT_TEST(testFdo85876); +CPPUNIT_TEST(testCaretPositionMovingUp); +CPPUNIT_TEST(testTdf93441); +CPPUNIT_TEST(testTdf81226); CPPUNIT_TEST(testTdf79717); CPPUNIT_TEST(testTdf137532); CPPUNIT_TEST(testFdo87448); @@ -2020,6 +2026,49 @@ void SwUiWriterTest::testFdo85876() } } +void SwUiWriterTest::testCaretPositionMovingUp() +{ +SwDoc* const pDoc = createDoc(); +SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); +pWrtShell->Insert("after"); +pWrtShell->InsertLineBreak(); +pWrtShell->Up(false); +pWrtShell->Insert("before"); + +CPPUNIT_ASSERT_EQUAL(OUString(u"beforeAfter" + OUStringChar(CH_TXTATR_NEWLINE)), getParagraph(1)->getString()); +} + +void SwUiWriterTest::testTdf93441() +{ +SwDoc* const pDoc = createDoc(); +SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); +pWrtShell->Insert("Hello"); +pWrtShell->InsertLineBreak(); +pWrtShell->Insert("Hello World"); +pWrtShell->Up(false); +pWrtShell->Insert(" World"); + +// Without the fix in place, this test would have failed with +// - Expected: Hello World\nHello World +// - Actual : WorldHello\nHello World +CPPUNIT_ASSERT_EQUAL(OUString(u"Hello World" + OUStringChar(CH_TXTATR_NEWLINE) + u"Hello World"), getParagraph(1)->getString()); +} + +void SwUiWriterTest::testTdf81226() +{ +SwDoc* const pDoc = createDoc(); +SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); +pWrtShell->Insert("before"); +pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 4, /*bBasicCall=*/false); +pWrtShell->Down(false); +pWrtShell->Insert("after"); + +// Without the fix in place, this test would have failed with +// - Expected: beforeafter +// - Actual : beafterfore +CPPUNIT_ASSERT_EQUAL(OUString("beforeafter"), getParagraph(1)->getString()); +} + void SwUiWriterTest::testTdf79717() { SwDoc* const pDoc = createDoc(); diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 701e2f16a7e9..861c1f4ea714 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -236,16 +236,11 @@ void SwCursorShell::StartAction() SwViewShell::StartAction(); // to the SwViewShell } -void SwCursorShell::EndAction( const bool bIdleEnd, const bool DoSetPosX ) +void SwCursorShell::EndAction( const bool bIdleEnd ) { comphelper::FlagRestorationGuard g(mbSelectAll, StartsWithTable() && ExtendedSelectedAll()); bool bVis = m_bSVCursorVis; -sal_uInt16 eFlags = SwCursor
Re: Unit Tests failing when built with clang 12
On 17/03/2021 23:47, Luke Benes wrote: Sounds like there is a headless or distro dependent aspect of this bug too. I can reproduce this on both my i686 openSUSE Tumbleweed (32-bit) laptop and on my x86-64 openSUSE Tumbleweed desktop. This issue has not been fixed in clang 13 as today's build 402f2cae7dcab also fails. I also was able to reproduce the failures with this autogen.input: --enable-optimized --disable-debug --disable-dbgutil CC=clang CXX=clang++ What distro is this working on? I can try that in a VM. I'm using Fedora 33. What we'd need to track this down is an --enable-symbols build with debug information, and then a gdb backtrace at the point of SEGV, not just that unhelpfully symbol-less backtrace generated by whatever (--enable-breakpad?). Ideally, gbuild should print gdb backtraces when soffice.bin crashes during a UITest. What's necessary for that to work is (a) that core files are written to CWD (depending on distro settings, you may need something like `sudo sysctl kernel.core_pattern=core`), (b) `ulimit -c unlimited` in the shell where you run `make`, and (c) not getting --enable-breakpad or some other unhelpful thing get in the way, I think. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source
svx/source/sdr/contact/viewobjectcontact.cxx |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) New commits: commit b4296e1b462ddf626fe2ec2f9f5935993759ff86 Author: merttumer AuthorDate: Wed Mar 17 09:01:45 2021 +0300 Commit: Jan Holesovsky CommitDate: Thu Mar 18 10:06:10 2021 +0100 LOK: Fix wrong gridOffset when shape is moved on calc Change-Id: I37501128068943cee8f67a5d91a35ec1a76fe550 Signed-off-by: merttumer Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112599 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tomaž Vajngerl Reviewed-by: Jan Holesovsky diff --git a/svx/source/sdr/contact/viewobjectcontact.cxx b/svx/source/sdr/contact/viewobjectcontact.cxx index 882b911a8fab..89e099da71c3 100644 --- a/svx/source/sdr/contact/viewobjectcontact.cxx +++ b/svx/source/sdr/contact/viewobjectcontact.cxx @@ -234,8 +234,11 @@ void ViewObjectContact::ActionChanged() // invalidate current valid range GetObjectContact().InvalidatePartOfView(maObjectRange); -// reset ObjectRange, it needs to be recalculated -maObjectRange.reset(); +// reset gridOffset, it needs to be recalculated +if (GetObjectContact().supportsGridOffsets()) +resetGridOffset(); +else +maObjectRange.reset(); } // register at OC for lazy invalidate ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: desktop/source officecfg/registry sd/inc sd/Library_sd.mk sd/sdi sd/source sd/uiconfig sfx2/source
desktop/source/lib/init.cxx | 1 officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu | 8 sd/Library_sd.mk | 1 sd/inc/app.hrc | 1 sd/inc/strings.hrc | 1 sd/sdi/SlideSorterController.sdi | 5 sd/sdi/_drvwsh.sdi | 5 sd/sdi/outlnvsh.sdi | 5 sd/sdi/sdraw.sdi | 18 + sd/source/ui/app/scalectrl.cxx | 108 ++ sd/source/ui/app/sddll.cxx | 2 sd/source/ui/dlg/tpoption.cxx| 4 sd/source/ui/func/fuoltext.cxx | 1 sd/source/ui/inc/scalectrl.hxx | 39 +++ sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx | 1 sd/source/ui/slidesorter/controller/SlsSlotManager.cxx | 5 sd/source/ui/view/drviewsa.cxx | 8 sd/uiconfig/sdraw/statusbar/statusbar.xml| 1 sfx2/source/control/unoctitm.cxx | 1 19 files changed, 213 insertions(+), 2 deletions(-) New commits: commit 951b243f10a7c184e635ce1d84f69683d8e7abde Author: Heiko Tietze AuthorDate: Thu Mar 4 09:41:55 2021 +0100 Commit: Heiko Tietze CommitDate: Thu Mar 18 10:13:26 2021 +0100 Resolves tdf#66470 - Scaling value in statusbar Changes also the sort order at the options Change-Id: I61c231fb94d4b4c66358a17e7585609e31eb6a70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111947 Tested-by: Jenkins Reviewed-by: Mike Kaganski Reviewed-by: Heiko Tietze diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 6275bf691946..12eff83a4bc3 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -2731,6 +2731,7 @@ static void doc_iniUnoCommands () OUString(".uno:SelectionMode"), OUString(".uno:PageStatus"), OUString(".uno:LayoutStatus"), +OUString(".uno:Scale"), OUString(".uno:Context"), OUString(".uno:WrapText"), OUString(".uno:ToggleMergeCells"), diff --git a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu index 97970ec450a9..deb4676df411 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu @@ -1180,6 +1180,14 @@ Layout + + + Scale + + + Scaling at the current document + + Set in Circle (perspective) diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk index fe2dfc3d7617..092dc70da1ef 100644 --- a/sd/Library_sd.mk +++ b/sd/Library_sd.mk @@ -199,6 +199,7 @@ $(eval $(call gb_Library_add_exception_objects,sd,\ sd/source/ui/app/sdpopup \ sd/source/ui/app/sdxfer \ sd/source/ui/app/tmplctrl \ + sd/source/ui/app/scalectrl \ sd/source/ui/controller/slidelayoutcontroller \ sd/source/ui/controller/displaymodecontroller \ sd/source/ui/dlg/AnimationChildWindow \ diff --git a/sd/inc/app.hrc b/sd/inc/app.hrc index 450bc35195fa..4a20807138b9 100644 --- a/sd/inc/app.hrc +++ b/sd/inc/app.hrc @@ -152,6 +152,7 @@ #define SID_DELETE_LAYER(SID_SD_START+81) #define SID_DISMANTLE (SID_SD_START+82) // FREE +#define SID_SCALE (SID_SD_START+85) #define SID_STATUS_PAGE (SID_SD_START+86) #define SID_STATUS_LAYOUT (SID_SD_START+87) #define SID_STATUS_SELMODE (SID_SD_START+88) diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc index 183324d2679a..751b576ec0ec 100644 --- a/sd/inc/strings.hrc +++ b/sd/inc/strings.hrc @@ -104,6 +104,7 @@ #define STR_DLG_INSERT_PAGES_FROM_FILE NC_("STR_DLG_INSERT_PAGES_FROM_FILE", "Insert File") #define STR_READ_DATA_ERROR NC_("STR_READ_DATA_ERROR", "The file could not be loaded!") #define STR_SCALE_OBJECTS NC_("STR_SCALE_OBJECTS", "The page size of the target document is different than the source document.\n\nDo you want to scale the copied objects to fit the new page size?") +#define STR_SCALE_TOOLTIP NC_("STR_SCAL
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java | 32 +- 1 file changed, 31 insertions(+), 1 deletion(-) New commits: commit a7c0039542fb015e34c56ec25f92f59a4c6ba1fa Author: Michael Weghorn AuthorDate: Wed Mar 17 14:52:26 2021 +0100 Commit: Michael Weghorn CommitDate: Thu Mar 18 10:20:34 2021 +0100 android: Show original instead of temp file name When a temporary file is created in Android Viewer (e.g. when a file is passed from another app, like a file explorer or an email app), still show the original file name in the toolbar, instead of the name of the temporary file (like "LibreOffice1588848072959345750.tmp"). Change-Id: I86f5cebfa8e2986fe812ace16c0df324d1420955 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112643 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java index cbc628e94e48..a9a192099008 100644 --- a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java +++ b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java @@ -11,12 +11,14 @@ import android.content.Intent; import android.content.SharedPreferences; import android.content.res.AssetFileDescriptor; import android.content.res.AssetManager; +import android.database.Cursor; import android.graphics.RectF; import android.net.Uri; import android.os.AsyncTask; import android.os.Build; import android.os.Bundle; import android.preference.PreferenceManager; +import android.provider.OpenableColumns; import android.support.design.widget.BottomSheetBehavior; import android.support.design.widget.Snackbar; import android.support.v4.widget.DrawerLayout; @@ -192,7 +194,13 @@ public class LibreOfficeMainActivity extends AppCompatActivity implements Settin if (copyFileToTemp() && mTempFile != null) { mInputFile = mTempFile; Log.d(LOGTAG, "SCHEME_CONTENT: getPath(): " + getIntent().getData().getPath()); -toolbarTop.setTitle(mInputFile.getName()); + +String displayName = extractDisplayNameFromIntent(); +if (displayName.isEmpty()) { +// fall back to using temp file name +displayName = mInputFile.getName(); +} +toolbarTop.setTitle(displayName); } else { // TODO: can't open the file Log.e(LOGTAG, "couldn't create temporary file from " + getIntent().getData()); @@ -490,6 +498,28 @@ public class LibreOfficeMainActivity extends AppCompatActivity implements Settin } +/** + * Tries to retrieve display name for data in Intent, + * which should be the file name. + */ +private String extractDisplayNameFromIntent() { +String displayName = ""; +// try to retrieve original file name +Cursor cursor = null; +try { +String[] columns = {OpenableColumns.DISPLAY_NAME}; +cursor = getContentResolver().query(getIntent().getData(), columns, null, null); +if (cursor != null && cursor.moveToFirst()) { +displayName = cursor.getString(cursor.getColumnIndex(OpenableColumns.DISPLAY_NAME)); +} +} finally { +if (cursor != null) { +cursor.close(); +} +} +return displayName; +} + public List getDocumentPartView() { return mDocumentPartView; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-7-1+backports' - android/source
android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java | 32 +- 1 file changed, 31 insertions(+), 1 deletion(-) New commits: commit e2d2c38d06dc514ee417ed006ed0f13173d186d6 Author: Michael Weghorn AuthorDate: Wed Mar 17 14:52:26 2021 +0100 Commit: Michael Weghorn CommitDate: Thu Mar 18 10:21:38 2021 +0100 android: Show original instead of temp file name When a temporary file is created in Android Viewer (e.g. when a file is passed from another app, like a file explorer or an email app), still show the original file name in the toolbar, instead of the name of the temporary file (like "LibreOffice1588848072959345750.tmp"). Change-Id: I86f5cebfa8e2986fe812ace16c0df324d1420955 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112643 Tested-by: Jenkins Reviewed-by: Michael Weghorn (cherry picked from commit a7c0039542fb015e34c56ec25f92f59a4c6ba1fa) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112621 Tested-by: Michael Weghorn diff --git a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java index cbc628e94e48..a9a192099008 100644 --- a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java +++ b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java @@ -11,12 +11,14 @@ import android.content.Intent; import android.content.SharedPreferences; import android.content.res.AssetFileDescriptor; import android.content.res.AssetManager; +import android.database.Cursor; import android.graphics.RectF; import android.net.Uri; import android.os.AsyncTask; import android.os.Build; import android.os.Bundle; import android.preference.PreferenceManager; +import android.provider.OpenableColumns; import android.support.design.widget.BottomSheetBehavior; import android.support.design.widget.Snackbar; import android.support.v4.widget.DrawerLayout; @@ -192,7 +194,13 @@ public class LibreOfficeMainActivity extends AppCompatActivity implements Settin if (copyFileToTemp() && mTempFile != null) { mInputFile = mTempFile; Log.d(LOGTAG, "SCHEME_CONTENT: getPath(): " + getIntent().getData().getPath()); -toolbarTop.setTitle(mInputFile.getName()); + +String displayName = extractDisplayNameFromIntent(); +if (displayName.isEmpty()) { +// fall back to using temp file name +displayName = mInputFile.getName(); +} +toolbarTop.setTitle(displayName); } else { // TODO: can't open the file Log.e(LOGTAG, "couldn't create temporary file from " + getIntent().getData()); @@ -490,6 +498,28 @@ public class LibreOfficeMainActivity extends AppCompatActivity implements Settin } +/** + * Tries to retrieve display name for data in Intent, + * which should be the file name. + */ +private String extractDisplayNameFromIntent() { +String displayName = ""; +// try to retrieve original file name +Cursor cursor = null; +try { +String[] columns = {OpenableColumns.DISPLAY_NAME}; +cursor = getContentResolver().query(getIntent().getData(), columns, null, null); +if (cursor != null && cursor.moveToFirst()) { +displayName = cursor.getString(cursor.getColumnIndex(OpenableColumns.DISPLAY_NAME)); +} +} finally { +if (cursor != null) { +cursor.close(); +} +} +return displayName; +} + public List getDocumentPartView() { return mDocumentPartView; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: officecfg/registry
officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) New commits: commit 7d76581ed37851ba1e588ecb919738e1d33784d6 Author: Seth Chaiklin AuthorDate: Fri Mar 12 10:42:51 2021 +0100 Commit: Seth Chaiklin CommitDate: Thu Mar 18 10:27:30 2021 +0100 tdf#140579 "Continue previous numbering" -> "Add to List" + make "A" the accelerator key, because it does not conflict with other keys in the Format - Lists menu. + add Tooltip, mostly for sake of Customize dialog, but the tooltip will also appear in the toolbar, where this command was recently made visible by default ( https://gerrit.libreoffice.org/c/core/+/112420 ) so tooltip is formulated compactly to give the main idea (for those who are not willing to read the documentation that exists and/or want the UI to tell them what to do). Not ideal, but feasible. A better solution would require changing the source code to show the "Label" as tooltip for the icon, so that the "tooltip" would only appear in the Customize dialog. Change-Id: Ie0c80381d008d2ed7e6d51ad55942c5ac6d7272c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112309 Reviewed-by: Heiko Tietze Reviewed-by: Seth Chaiklin Tested-by: Seth Chaiklin diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu index 3bab821f6381..ad6175d3facc 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu @@ -3149,9 +3149,12 @@ - Continue previous numbering + ~Add to List - + + “Add to List” adds selected paragraphs to an immediately preceding list. + + 1 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] help.git: AllLangHelp_swriter.mk source/text
AllLangHelp_swriter.mk|1 source/text/swriter/02/add_to_list.xhp| 83 ++ source/text/swriter/02/continue_numbering.xhp | 54 source/text/swriter/main0206.xhp |2 4 files changed, 140 insertions(+) New commits: commit cf21df79f4499a4836adbb0e2c448048b5be418b Author: Seth Chaiklin AuthorDate: Tue Feb 23 09:52:00 2021 +0100 Commit: Seth Chaiklin CommitDate: Thu Mar 18 10:34:22 2021 +0100 tdf#140579 add "add to list" help page add swriter/02/add_to_list.xhp with help on "Add to List" (previously called "Continue previous numbering") and embed heading and icon for this page into help for "Bullet and Numbering bar" ( swriter/main0206.xhp ) Change-Id: I4e39b625d7d80f483520996703c4b584ca1153c2 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/111325 Reviewed-by: Seth Chaiklin Tested-by: Jenkins diff --git a/AllLangHelp_swriter.mk b/AllLangHelp_swriter.mk index 6afdbc718..07ec0ed3d 100644 --- a/AllLangHelp_swriter.mk +++ b/AllLangHelp_swriter.mk @@ -248,6 +248,7 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,swriter,\ helpcontent2/source/text/swriter/02/1903 \ helpcontent2/source/text/swriter/02/1904 \ helpcontent2/source/text/swriter/02/1905 \ +helpcontent2/source/text/swriter/02/add_to_list \ helpcontent2/source/text/swriter/02/word_count_stb \ helpcontent2/source/text/swriter/04/0102 \ helpcontent2/source/text/swriter/guide/anchor_object \ diff --git a/source/text/swriter/02/add_to_list.xhp b/source/text/swriter/02/add_to_list.xhp new file mode 100644 index 0..69ba5a3d4 --- /dev/null +++ b/source/text/swriter/02/add_to_list.xhp @@ -0,0 +1,83 @@ + + + + + + +Add to List +/text/swriter/02/add_to_list.xhp + + + + + +Add to List +Lists;merging + +Add to List +Include selected paragraphs, whether a list item or not, as part of a list. + + +Choose Format - Lists - Add to List. +Right-click a paragraph, choose Lists - Add to List. +On Bullets and Numbering bar, click Add to List icon. + + + + + Add to List Icon + + + Add to List + + + + + +The list labeling and indent formatting are applied to the selected paragraphs. The position of the paragraphs in the document does not change. + +Add Selected Paragraphs to a List + + + Select paragraphs, whether in a list or not, to be added to a list. + For multiple selections, press and hold the Ctrl key after the first selection. The Ctrl key can be released without losing the selections, but must be pressed when clicking in the document. + + + Press and hold the Ctrl key, then place cursor in the list. + + +Do one of the following: + + + + + + + + + + + Right-click, choose List - Add to List. To preserve the selection, at least one character must be selected in the list. + + +This procedure works for ordered and unordered lists. +Add Consecutive List Entries to an Immediately Prior List + + +Select one or more consecutive list entries, starting from the first entry, that you want to add to the immediately prior list. + + + + + +Use this procedure to combine two lists. + + + \ No newline at end of file diff --git a/source/text/swriter/02/continue_numbering.xhp b/source/text/swriter/02/continue_numbering.xhp new file mode 100644 index 0..ecc2e62b8 --- /dev/null +++ b/source/text/swriter/02/continue_numbering.xhp @@ -0,0 +1,54 @@ + + + + + + +Add to Previous List +/text/swriter/02/continue_numbering.xhp + + + + +Add to Previous List +Include selected paragraphs as part of a previous list. + + +Choose Format - Lists - Add to Previous List. +Right-click a paragraph, choose Lists - Add to Previous List. + +The command is active in the menubar and visible in the context menu when at least one list is prior to the current cursor position. +Merge Two Ordered Lists + + +Press the CommandCtrl key and select paragraphs to be included from the first list. + + +Select any item in the second list, except for the first item. + + +Right-click, choose List - Add to Previous List. + + +Add Selected Paragraphs to a List + + + Choose the list to get additional list items. + + +Select desired paragraphs that follow anywhere after the list. + + +Right-click, choose List - Add to Previous List to add the selected paragraphs as list items to the first list that preceded the paragraphs. + + +This technique works for ordered and unordered lists, and with paragraphs that are already list items. + + \ No newline at end of file diff --git a/source/text/swriter/main0206.xhp b/source/text/swriter/main0206.xhp index 3de9c5ebf..164614f02 100644 --- a/source/t
[Libreoffice-commits] core.git: helpcontent2
helpcontent2 |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit a558c9391783dccf9504b981f97ccc819d1bfcfd Author: Seth Chaiklin AuthorDate: Thu Mar 18 10:34:22 2021 +0100 Commit: Gerrit Code Review CommitDate: Thu Mar 18 10:34:22 2021 +0100 Update git submodules * Update helpcontent2 from branch 'master' to cf21df79f4499a4836adbb0e2c448048b5be418b - tdf#140579 add "add to list" help page add swriter/02/add_to_list.xhp with help on "Add to List" (previously called "Continue previous numbering") and embed heading and icon for this page into help for "Bullet and Numbering bar" ( swriter/main0206.xhp ) Change-Id: I4e39b625d7d80f483520996703c4b584ca1153c2 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/111325 Reviewed-by: Seth Chaiklin Tested-by: Jenkins diff --git a/helpcontent2 b/helpcontent2 index 367a4f5cf3d7..cf21df79f449 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit 367a4f5cf3d78adaeec36715a37286a6a2cea694 +Subproject commit cf21df79f4499a4836adbb0e2c448048b5be418b ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] help.git: source/text
source/text/swriter/02/continue_numbering.xhp | 54 -- 1 file changed, 54 deletions(-) New commits: commit d13e4f8c6d202feafe4e8669fb4d6ad7b8d991b1 Author: Seth Chaiklin AuthorDate: Thu Mar 18 10:35:43 2021 +0100 Commit: Seth Chaiklin CommitDate: Thu Mar 18 10:37:30 2021 +0100 remove obsolete file that should not have been added Change-Id: If29beac17459bf60973e536b8d8bf6105e73fdd7 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/112622 Reviewed-by: Seth Chaiklin Tested-by: Jenkins diff --git a/source/text/swriter/02/continue_numbering.xhp b/source/text/swriter/02/continue_numbering.xhp deleted file mode 100644 index ecc2e62b8..0 --- a/source/text/swriter/02/continue_numbering.xhp +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - -Add to Previous List -/text/swriter/02/continue_numbering.xhp - - - - -Add to Previous List -Include selected paragraphs as part of a previous list. - - -Choose Format - Lists - Add to Previous List. -Right-click a paragraph, choose Lists - Add to Previous List. - -The command is active in the menubar and visible in the context menu when at least one list is prior to the current cursor position. -Merge Two Ordered Lists - - -Press the CommandCtrl key and select paragraphs to be included from the first list. - - -Select any item in the second list, except for the first item. - - -Right-click, choose List - Add to Previous List. - - -Add Selected Paragraphs to a List - - - Choose the list to get additional list items. - - -Select desired paragraphs that follow anywhere after the list. - - -Right-click, choose List - Add to Previous List to add the selected paragraphs as list items to the first list that preceded the paragraphs. - - -This technique works for ordered and unordered lists, and with paragraphs that are already list items. - - \ No newline at end of file ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: helpcontent2
helpcontent2 |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 86369c712d51738f4179f883b4a24cdbf942e8ab Author: Seth Chaiklin AuthorDate: Thu Mar 18 10:37:30 2021 +0100 Commit: Gerrit Code Review CommitDate: Thu Mar 18 10:37:30 2021 +0100 Update git submodules * Update helpcontent2 from branch 'master' to d13e4f8c6d202feafe4e8669fb4d6ad7b8d991b1 - remove obsolete file that should not have been added Change-Id: If29beac17459bf60973e536b8d8bf6105e73fdd7 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/112622 Reviewed-by: Seth Chaiklin Tested-by: Jenkins diff --git a/helpcontent2 b/helpcontent2 index cf21df79f449..d13e4f8c6d20 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit cf21df79f4499a4836adbb0e2c448048b5be418b +Subproject commit d13e4f8c6d202feafe4e8669fb4d6ad7b8d991b1 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: cui/source
cui/source/dialogs/QrCodeGenDialog.cxx |1 - 1 file changed, 1 deletion(-) New commits: commit e22405c554abe13675b05eae5c8b3e15657b10d4 Author: Mike Kaganski AuthorDate: Thu Mar 18 09:30:33 2021 +0100 Commit: Mike Kaganski CommitDate: Thu Mar 18 10:54:17 2021 +0100 Drop duplicate 'using namespace' directive Change-Id: If235c37cf52cfbfd171a6d1784cf5940c162332a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112618 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/cui/source/dialogs/QrCodeGenDialog.cxx b/cui/source/dialogs/QrCodeGenDialog.cxx index 28bbfabcf845..3de87abae22b 100644 --- a/cui/source/dialogs/QrCodeGenDialog.cxx +++ b/cui/source/dialogs/QrCodeGenDialog.cxx @@ -52,7 +52,6 @@ using namespace css::container; using namespace css::frame; using namespace css::io; using namespace css::lang; -using namespace css::frame; using namespace css::sheet; using namespace css::text; using namespace css::drawing; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Re: ANN: renaming of master branch to "main" for core repository and submodules (dictionaries, help, translations)
On Wednesday 17 of March 2021, Christian Lohmaier wrote: > Hi *, > > as requested and announced in previous ESC-minutes and infra-call > minutes, master branch will be renamed for the LibreOffice core > repositories and the submodules used by LibreOffice (dictionaries, > help, translations). > > Current plan is to do the switchover on April 1st > If you have objections to this date or the plan laid out below (for > current changes please see also > https://redmine.documentfoundation.org/issues/3442 please raise your > concerns ASAP) I disagree with the plan. Git uses master, so we should stick with that. And by 'git uses master' I mean that if you check out the git repo of the git tool, you'll get the master branch, there's no main branch, and if you build it and run 'git init', it'll create a master branch. The option for the default branch name was added 9 months ago, so they have had plenty of time for switching, and if they haven't, then maybe we shouldn't either. We already have this running joke of breaking every tooling, and I don't see a reason why risk it here. And that brings me to the non-technical part of this, because I really don't see the reason for this. Is it written down somewhere? I find the ESC minutes unclear on the motivation. The Redmine motivation link is to some RFC-like document that talks about "master-slave", but it does not mention "master" on its own a single time. Even the recommendations there refer to 'term "master-slave"' and not just "master". The other Redmine ticket links to GitHub, but why should we care what some other repository provider does? (I mean, I understand GitHub is based in a country where they currently have all kinds of problems with this, but do we need to take a part in that?). And presumably the intention is not being compatible with new repositories on GitHub, that wouldn't make much sense. Finally, even if we assume that it would be a good idea to avoid the use of the word 'master' altogether because one of the 20 meanings a dictionary gives is bad, what's the plan for all the other 20059 ('git grep -i master | wc -l') other uses in LibreOffice? We have master passwords, master slides, master styles and so on, and mind you, that goes as far as changing the ODF format, is the plan to change all those too? And if not, is there any plan for when somebody points that out as hypocrisy? And before any of this is done, shouldn't first be something done about those 487 occurences of the actually problematic word, which would be way simpler and actually do something related to the topic? The way I see it, if this is supposed to fix something, then it actually doesn't, and it can create technical problems. If it's supposed to do something else, it's not up to us to solve somebody else's problem, and it can backfire. PS: I can't miss the irony of renaming 'master' in 'git', when it's the latter word that's an actual insult. -- Lubos Lunak ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: cui/inc sw/inc
cui/inc/tipoftheday.hrc|4 ++-- sw/inc/inspectorproperties.hrc |2 +- sw/inc/strings.hrc |2 +- 3 files changed, 4 insertions(+), 4 deletions(-) New commits: commit d652495a0f5626ba02369289c0ad2cb341f9015d Author: Seth Chaiklin AuthorDate: Fri Jan 29 14:25:28 2021 +0100 Commit: Heiko Tietze CommitDate: Thu Mar 18 11:43:27 2021 +0100 tdf#139667 update Styles Inspector and tip of the day to "List Style" For Tip of the Day + add uri to Bullets and Numbering help page for tip about "Insert Unnumbered Entry" + adjust tip for applying List Style to tables, and add link to "List Style" help page. For Styles Inspector * change "Numbering Style" to "List Style" For Customize dialog ( sw/inc/strings.hrc ) * change "Numbering" to "List" for Style_Family Change-Id: Id43988490a61437d0068ea22a2bf3b0841b6ad42 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110139 Tested-by: Jenkins Reviewed-by: Heiko Tietze diff --git a/cui/inc/tipoftheday.hrc b/cui/inc/tipoftheday.hrc index 6483d0335f61..107e39cf803f 100644 --- a/cui/inc/tipoftheday.hrc +++ b/cui/inc/tipoftheday.hrc @@ -74,7 +74,7 @@ const std::tuple TIPOFTHEDAY_STRINGARRAY[] = { NC_("RID_CUI_TIPOFTHEDAY", "Fit the entire page in a Draw window, use * on the number pad."), "", "tipoftheday_d.png"}, { NC_("RID_CUI_TIPOFTHEDAY", "In a Draw page, use “-” to zoom out; “+” to zoom in."), "", "tipoftheday_d.png"}, { NC_("RID_CUI_TIPOFTHEDAY", "Want to show the contents of another document within your document? Use Insert ▸ Section and select Link."), "modules/swriter/ui/editsectiondialog/link", "tipoftheday_w.png"}, // https://help.libreoffice.org/%PRODUCTVERSION/%LANGUAGENAME/text/swriter/guide/section_insert.html#par_id3153404 - { NC_("RID_CUI_TIPOFTHEDAY", "To automatically number table rows in Writer, select the relevant column, then apply a numbering style from List Styles."), "", "tipoftheday_w.png"}, + { NC_("RID_CUI_TIPOFTHEDAY", "To automatically number table rows in Writer, select the relevant column, then apply a List Style."), "https://help.libreoffice.org/%PRODUCTVERSION/%LANGUAGENAME/text/swriter/01/05130004.html";, "tipoftheday_w.png"}, // no local help URI { NC_("RID_CUI_TIPOFTHEDAY", "%PRODUCTNAME allows you to use assistive tools, such as external screen readers, Braille devices or speech recognition input devices."), "https://www.libreoffice.org/get-help/accessibility/";, ""}, { NC_("RID_CUI_TIPOFTHEDAY", "Want to sort a series in %PRODUCTNAME Calc such as A1, A2, A3, A11, A15, not in alphabetical order but on the number? Enable natural sort in the Options tab."), "modules/scalc/ui/sortoptionspage/SortOptionsPage", "tipoftheday_c.png"}, //https://help.libreoffice.org/%PRODUCTVERSION/%LANGUAGENAME/text/scalc/01/12030200.html { NC_("RID_CUI_TIPOFTHEDAY", "You can change the default function in the status bar: right click on the area."), "", "statusbar.png"}, @@ -188,7 +188,7 @@ const std::tuple TIPOFTHEDAY_STRINGARRAY[] = { NC_("RID_CUI_TIPOFTHEDAY", "Want to select a large range of cells without scrolling? Type the range reference (e.g. A1:A1000) in the name box then Enter."), "", "tipoftheday_w.png"}, { NC_("RID_CUI_TIPOFTHEDAY", "Want to know the valid command line parameters? Start soffice with --help or -h or -?"), "https://help.libreoffice.org/%PRODUCTVERSION/%LANGUAGENAME/text/shared/guide/start_parameters.html";, ""}, //local help missing { NC_("RID_CUI_TIPOFTHEDAY", "Fit your sheet or print ranges to a page with Format ▸ Page ▸ Sheet Tab ▸ Scaling Mode."), "", "tipoftheday_c.png"}, - { NC_("RID_CUI_TIPOFTHEDAY", "Need an unnumbered item in a list? Use “Insert Unnumbered Entry” in the Bullets and Numbering toolbar."), "", "tipoftheday_w.png"}, + { NC_("RID_CUI_TIPOFTHEDAY", "Need to include a list item without a bullet or number? Use “Insert Unnumbered Entry” in the Bullets and Numbering toolbar."), "HID_NUM_TOOLBOX", "tipoftheday_w.png"}, { NC_("RID_CUI_TIPOFTHEDAY", "You can rotate cells table orientation with Table ▸ Properties… ▸ Text Flow ▸ Text orientation."), "", "tipoftheday_w.png"}, { NC_("RID_CUI_TIPOFTHEDAY", "In %PRODUCTNAME Draw to change the 0/0 point of the rulers, drag the intersection of the two rulers in the top left corner into the workspace."), "", "tipoftheday_d.png"}, { NC_("RID_CUI_TIPOFTHEDAY", "Move a column in Calc between two others in one step? Click the header then a cell in the column, keep mouse button and move to the target with %MOD2 key."), "", "tipoftheday_c.png"}, diff --git a/sw/inc/inspectorproperties.hrc b/sw/inc/inspectorproperties.hrc index 6ef374a2f857..1de4f7e25c4c 100644 --- a/sw/inc/inspectorproperties.hrc +++ b/sw/inc/inspectorproperties.hrc @@ -178,7 +178,7 @@ #define RID_NUMBERING_LEVEL NC_("RI
[Libreoffice-commits] core.git: Branch 'distro/vector/vector-7.0' - sw/qa sw/source vcl/source
sw/qa/extras/htmlexport/data/ole1-pres-data-wmf.odt |binary sw/qa/extras/htmlexport/htmlexport.cxx | 93 +--- sw/source/filter/html/htmlreqifreader.cxx | 11 +- vcl/source/filter/wmf/wmfwr.cxx |8 + 4 files changed, 80 insertions(+), 32 deletions(-) New commits: commit 42d20c2ab73615a8b43957b9f0203bbe9e879d3d Author: Miklos Vajna AuthorDate: Wed Mar 17 17:30:52 2021 +0100 Commit: Miklos Vajna CommitDate: Thu Mar 18 11:53:56 2021 +0100 sw reqif-xhtml export: make sure OLE1 preview is WMF-only reqif-xhtml has previews for embedded objects at 4 levels: - png preview - RTF preview - OLE1 preview - OLE2 preview The OLE1 preview has to be a WMF one, and in case our WMF export tries to inject EMF into it, Word will refuse to open the embedded object. So add a new flag to allow opting out of the EMF embedding for reqif-xhtml export purposes. The other option would be what Word does to just omit the OLE1 preview, but then this would break reqif-xhtml consumers who take the preview from the OLE1 data. (cherry picked from commit 5c7255d3a98568a2965f840b76371cf03eb0d99a) Change-Id: Ia8d4626aefb6309743c9f4023f289c9a7b872035 diff --git a/sw/qa/extras/htmlexport/data/ole1-pres-data-wmf.odt b/sw/qa/extras/htmlexport/data/ole1-pres-data-wmf.odt new file mode 100644 index ..9bcca729bc52 Binary files /dev/null and b/sw/qa/extras/htmlexport/data/ole1-pres-data-wmf.odt differ diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx index e2a7e5eb6a60..6fdf15730dde 100644 --- a/sw/qa/extras/htmlexport/htmlexport.cxx +++ b/sw/qa/extras/htmlexport/htmlexport.cxx @@ -109,6 +109,43 @@ bool TestReqIfRtfReader::WriteObjectData(SvStream& rOLE) rOLE.WriteStream(aStream); return true; } + +/// Parser for [MS-OLEDS] 2.2.5 EmbeddedObject, aka OLE1. +struct OLE1Reader +{ +sal_uInt32 m_nNativeDataSize; +sal_uInt32 m_nPresentationDataSize; + +OLE1Reader(SvStream& rStream); +}; + +OLE1Reader::OLE1Reader(SvStream& rStream) +{ +// Skip ObjectHeader, see [MS-OLEDS] 2.2.4. +rStream.Seek(0); +sal_uInt32 nData; +rStream.ReadUInt32(nData); // OLEVersion +rStream.ReadUInt32(nData); // FormatID +rStream.ReadUInt32(nData); // ClassName +rStream.SeekRel(nData); +rStream.ReadUInt32(nData); // TopicName +rStream.SeekRel(nData); +rStream.ReadUInt32(nData); // ItemName +rStream.SeekRel(nData); + +rStream.ReadUInt32(m_nNativeDataSize); +rStream.SeekRel(m_nNativeDataSize); + +rStream.ReadUInt32(nData); // OLEVersion for presentation data +CPPUNIT_ASSERT(rStream.good()); +rStream.ReadUInt32(nData); // FormatID +rStream.ReadUInt32(nData); // ClassName +rStream.SeekRel(nData); +rStream.ReadUInt32(nData); // Width +rStream.ReadUInt32(nData); // Height +rStream.ReadUInt32(nData); // PresentationDataSize +m_nPresentationDataSize = nData; +} } class HtmlExportTest : public SwModelTestBase, public HtmlTestTools @@ -1024,25 +1061,14 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqifOle1PDF) ParseOle1FromRtfUrl(aRtfUrl, aOle1); // Check the content of the ole1 data. -// Skip ObjectHeader, see [MS-OLEDS] 2.2.4. -aOle1.Seek(0); -sal_uInt32 nData; -aOle1.ReadUInt32(nData); // OLEVersion -aOle1.ReadUInt32(nData); // FormatID -aOle1.ReadUInt32(nData); // ClassName -aOle1.SeekRel(nData); -aOle1.ReadUInt32(nData); // TopicName -aOle1.SeekRel(nData); -aOle1.ReadUInt32(nData); // ItemName -aOle1.SeekRel(nData); -aOle1.ReadUInt32(nData); // NativeDataSize +OLE1Reader aOle1Reader(aOle1); // Without the accompanying fix in place, this test would have failed with: // - Expected: 39405 // - Actual : 43008 // i.e. we did not work with the Ole10Native stream, rather created an OLE1 wrapper around the // OLE1-in-OLE2 data, resulting in additional size. -CPPUNIT_ASSERT_EQUAL(static_cast(0x99ed), nData); +CPPUNIT_ASSERT_EQUAL(static_cast(0x99ed), aOle1Reader.m_nNativeDataSize); // Now import this back and check the ODT result. mxComponent->dispose(); @@ -1228,26 +1254,33 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqifOle1PresDataNoOle2) ParseOle1FromRtfUrl(aRtfUrl, aOle1); // Check the content of the ole1 data. -// Skip ObjectHeader, see [MS-OLEDS] 2.2.4. -aOle1.Seek(0); -sal_uInt32 nData; -aOle1.ReadUInt32(nData); // OLEVersion -aOle1.ReadUInt32(nData); // FormatID -aOle1.ReadUInt32(nData); // ClassName -aOle1.SeekRel(nData); -aOle1.ReadUInt32(nData); // TopicName -aOle1.SeekRel(nData); -aOle1.ReadUInt32(nData); // ItemName -aOle1.SeekRel(nData); -aOle1.ReadUInt32(nData); // NativeDataSize -aOle1.SeekRel(nData); - -aOle1.ReadUInt32(nData); // OLEVersion for presen
[Libreoffice-commits] core.git: sw/source vcl/source
sw/source/ui/misc/outline.cxx |2 +- vcl/source/app/salvtables.cxx |1 + 2 files changed, 2 insertions(+), 1 deletion(-) New commits: commit 36bc901426163aa38b551865d3dd57a3a3423910 Author: Noel Grandin AuthorDate: Sat Mar 13 18:12:24 2021 +0200 Commit: Noel Grandin CommitDate: Thu Mar 18 12:31:11 2021 +0100 tdf#140590 Writer crash in Tools>Chapter Numbering and an assert in vcl to catch it a little higher up the stack. Change-Id: Iaa2e70f901f93ca9f678118e4f5a8bc1b6eda20a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112459 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx index d9cc0113b696..9b65b575fbc4 100644 --- a/sw/source/ui/misc/outline.cxx +++ b/sw/source/ui/misc/outline.cxx @@ -92,7 +92,7 @@ void SwNumNamesDlg::SetUserNames(const OUString *pList[]) nSelect++; } } -m_xFormBox->select(nSelect); +m_xFormBox->select(std::min(nSelect, static_cast(m_xFormBox->n_children() - 1))); SelectHdl(*m_xFormBox); } diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 7d309a7ebe13..9d47a3ec14a2 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -3942,6 +3942,7 @@ void SalInstanceTreeView::select(int pos) else { SvTreeListEntry* pEntry = m_xTreeView->GetEntry(nullptr, pos); +assert(pEntry && "bad pos?"); m_xTreeView->Select(pEntry, true); m_xTreeView->MakeVisible(pEntry); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'private/tml/Use-the-iOS-French-and-Italian-dictionaries-for-othe'
New branch 'private/tml/Use-the-iOS-French-and-Italian-dictionaries-for-othe' available with the following commits: commit 2802d6f1e7e5cf7dbf47c3d05e6c4dbb0c0e827b Author: Tor Lillqvist Date: Thu Mar 18 13:45:18 2021 +0200 Use the iOS French and Italian dictionaries for other relevant countries, too Fixes https://github.com/CollaboraOnline/online/issues/1463 Change-Id: I9fffd4bc9499aee2098258f5c3a9181330b339a1 Signed-off-by: Tor Lillqvist ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
UX for data transformations for Calc
Hi, I had implemented a bunch of Data transformations for Calc as part of Gsoc 2018 a complete list of which can be found in this blog post along with the gerrit links. http://gettingstartedwithlibreoffice.blogspot.com/2018/08/added-data-tranformations.html I had a discussion with Markus about trying to make it available to users of Libreoffice and so we want to make all transformations accessible from the UI through a shared menu entry. Any input from the UX team on how this can be done would be greatly helpful. Regards, Vikas Mahato ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: ANN: renaming of master branch to "main" for core repository and submodules (dictionaries, help, translations)
Am 17. März 2021 20:45:23 MEZ schrieb Lubos Lunak : >On Wednesday 17 of March 2021, Christian Lohmaier wrote: >> as requested and announced in previous ESC-minutes and infra-call >> minutes, master branch will be renamed for the LibreOffice core >> repositories and the submodules used by LibreOffice (dictionaries, >> help, translations). (...) >I disagree with the plan (rant) Amen. I always said so, too. Regards Rene ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - oox/source sw/qa
oox/source/drawingml/shape.cxx |9 -- sw/qa/extras/ooxmlimport/data/tdf118693.docx |binary sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 12 +--- sw/qa/extras/ooxmlimport/ooxmlimport2.cxx| 37 +++ 4 files changed, 40 insertions(+), 18 deletions(-) New commits: commit b393336817a64f8703607d3f6de37d0b6498d49c Author: Xisco Fauli AuthorDate: Thu Mar 18 00:48:49 2021 +0100 Commit: Xisco Fauli CommitDate: Thu Mar 18 13:35:55 2021 +0100 tdf#118693: no need to use convertMm100ToTwip() for line shapes anymore It was introduced in 11129d89b152db54c86bb2bda58c24b8abb6c5a8 < tdf#85232 WPG import: fix handling of line shapes > and later in 36bade04d3780bc54c51b46bb0b63e69789658a5 < tdf106792 Get rid of SvxShapePolyPolygonBezier > ForceMetricToItemPoolMetric was added to SvxShapePolyPolygon::setPropertyValueImpl to convert from 100thmm to twips as can be read in the comment in testTdf85232 With this change, xShape->getPosition().X in testTdf85232 is 2267, which was already in twips Change-Id: I30b757885327a477213f96f8f84541971f435164 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112663 Tested-by: Jenkins Reviewed-by: Miklos Vajna (cherry picked from commit c9e5640c8fcad7beb42a66f9bee0252eee9fe323) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112619 Reviewed-by: Xisco Fauli diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index e711a3261bb3..5f3204bf64f2 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -844,7 +844,6 @@ Reference< XShape > const & Shape::createAndInsert( uno::Sequence< awt::Point > aPointSequence( nNumPoints ); awt::Point* pPoints = aPointSequence.getArray(); uno::Reference xModelInfo(rFilterBase.getModel(), uno::UNO_QUERY); -bool bIsWriter = xModelInfo->supportsService("com.sun.star.text.TextDocument"); for( i = 0; i < nNumPoints; ++i ) { const basegfx::B2DPoint aPoint( aPoly.getB2DPoint( i ) ); @@ -852,13 +851,7 @@ Reference< XShape > const & Shape::createAndInsert( // tdf#106792 Not needed anymore due to the change in SdrPathObj::NbcResize: // tdf#96674: Guard against zero width or height. -if (bIsWriter && bNoTranslation) -// Writer's draw page is in twips, and these points get passed -// to core without any unit conversion when Writer -// postprocesses only the group shape itself. -pPoints[i] = awt::Point(static_cast(convertMm100ToTwip(aPoint.getX())), static_cast(convertMm100ToTwip(aPoint.getY(; -else -pPoints[i] = awt::Point(static_cast(aPoint.getX()), static_cast(aPoint.getY())); +pPoints[i] = awt::Point(static_cast(aPoint.getX()), static_cast(aPoint.getY())); } uno::Sequence< uno::Sequence< awt::Point > > aPolyPolySequence( 1 ); aPolyPolySequence.getArray()[ 0 ] = aPointSequence; diff --git a/sw/qa/extras/ooxmlimport/data/tdf118693.docx b/sw/qa/extras/ooxmlimport/data/tdf118693.docx new file mode 100644 index ..4e832398bcd5 Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/tdf118693.docx differ diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index ec680a69a6ad..2a267e5fb6ed 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -1330,16 +1330,8 @@ DECLARE_OOXMLIMPORT_TEST(testTdf85232, "tdf85232.docx") // Make sure we're not testing the ellipse child. CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.drawing.LineShape"), xShapeDescriptor->getShapeType()); -// tdf#106792 checked that during load of tdf85232.docx the method -// SvxShapePolyPolygon::setPropertyValueImpl is used three times. In -// that method, a call to ForceMetricToItemPoolMetric was missing so -// that the import did not convert the input values from 100thmm -// to twips what is needed due to the object residing in Writer. The -// UNO API by definition is in 100thmm. Result is that in SwXShape::getPosition -// the offset (aOffset) now is (0, 0) instead of an existing offset in -// the load of the document before (what is plausible for a GroupObject). -// Thus, I will adapt the result value here to the now (hopefully) correct one. -CPPUNIT_ASSERT_EQUAL(static_cast(1630), xShape->getPosition().X); // was: 2267 +// This was 2900: horizontal position of the line was incorrect, the 3 children were not connected visually. +CPPUNIT_ASSERT_EQUAL(static_cast(2267), xShape->getPosition().X); } DECLARE_OOXMLIMPORT_TEST(testTdf95755, "tdf95755.docx") diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx index 85317503c90a..f2d81877bdeb 100644
Re: ANN: renaming of master branch to "main" for core repository and submodules (dictionaries, help, translations)
On 17.03.2021 22:45, Lubos Lunak wrote: I disagree with the plan. +1 -- Best regards, Mike Kaganski ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: ANN: renaming of master branch to "main" for core repository and submodules (dictionaries, help, translations)
Hi Lubos, just a quick answer - I think topics like this are best discussed in a call though. Lubos Lunak wrote: > I disagree with the plan. Git uses master, so we should stick with > that. > Hmm. But someone else using outdated names shouldn't per se be a reason for us? Also it appears things are moving there, too. > And that brings me to the non-technical part of this, because I > really don't see the reason for this. > The reason is, that language evolves, and bad habits (or metaphors) of the past shouldn't be persisted, if we know they are offensive to others. Generally, our approach in the community should be - if it doesn't harm us [1], we should be considerate & welcoming. The feedback towards using master/slave (and other established-but-fraught-terms) was that it indeed is taken as offensive for some people. > Finally, even if we assume that it would be a good idea to avoid > the use of the word 'master' altogether because one of the 20 > meanings a dictionary gives is bad, what's the plan for all the > other 20059 ('git grep -i master | wc -l') other uses in > LibreOffice? > You're right, there's more work to do. But that shouldn't stop this one bit from going forward. For parts of what you refer to, see: https://gerrit.libreoffice.org/c/core/+/98617 [1] please do point us to hard technical blockers though, if you're aware of any Cheers, -- Thorsten signature.asc Description: PGP signature ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: Branch 'private/tml/Use-the-iOS-French-and-Italian-dictionaries-for-othe' - 0 commits -
Rebased ref, commits from common ancestor: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - 4 commits - configure.ac download.lst external/python3 postprocess/CustomTarget_signing.mk pyuno/CustomTarget_python_shell.mk pyuno/C
RepositoryExternal.mk |2 configure.ac |4 download.lst |4 external/python3/0001-3.6-bpo-17239-Disable-external-entities-in-SAX-parse.patch.1 | 59 --- external/python3/ExternalPackage_python3.mk | 78 +- external/python3/macos-11.patch.0 | 25 --- external/python3/python-3.3.0-darwin.patch.1 |2 postprocess/CustomTarget_signing.mk |8 - pyuno/CustomTarget_python_shell.mk |2 pyuno/CustomTarget_pyuno_pythonloader_ini.mk |6 scp2/InstallModule_python.mk |2 solenv/gbuild/platform/com_MSC_class.mk |2 solenv/gbuild/platform/solaris.mk |2 solenv/gbuild/platform/unxgcc.mk |2 xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx |4 15 files changed, 61 insertions(+), 141 deletions(-) New commits: commit 7ddbb6bcc69d142f83dad581d077e7219f7a1460 Author: Andras Timar AuthorDate: Tue Mar 16 21:56:04 2021 +0100 Commit: Andras Timar CommitDate: Thu Mar 18 13:58:04 2021 +0100 we have to keep the original python version number 3.7.7 because MSP creation does not tolerate adding/removing files, or renaming directories Change-Id: Ib997d438add82652d570753a749170f207dc3a80 diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index 884bececcf08..8cb8582d2ace 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -3985,7 +3985,7 @@ $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_ else -$(call gb_ExternalExecutable_set_internal,python,$(INSTROOT)/$(LIBO_BIN_FOLDER)/$(if $(filter WNT,$(OS)),python-core-$(PYTHON_VERSION)/bin/python.exe,python.bin)) +$(call gb_ExternalExecutable_set_internal,python,$(INSTROOT)/$(LIBO_BIN_FOLDER)/$(if $(filter WNT,$(OS)),python-core-3.7.7/bin/python.exe,python.bin)) $(call gb_ExternalExecutable_set_precommand,python,$(subst $$,,$(gb_Python_PRECOMMAND))) $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3)) diff --git a/configure.ac b/configure.ac index 15ad78b8b8a4..68025ea51605 100644 --- a/configure.ac +++ b/configure.ac @@ -8945,7 +8945,7 @@ internal) if ! grep -q -i python.*${PYTHON_VERSION} ${SRC_ROOT}/download.lst; then AC_MSG_ERROR([PYTHON_VERSION ${PYTHON_VERSION} but no matching file in download.lst]) fi -AC_DEFINE_UNQUOTED([PYTHON_VERSION_STRING], [L"${PYTHON_VERSION}"]) +AC_DEFINE_UNQUOTED([PYTHON_VERSION_STRING], [L"3.7.7"]) BUILD_TYPE="$BUILD_TYPE PYTHON" if test "$OS" = LINUX; then BUILD_TYPE="$BUILD_TYPE LIBFFI" diff --git a/external/python3/ExternalPackage_python3.mk b/external/python3/ExternalPackage_python3.mk index 4dfc3b196f82..02ba67ffe0dd 100644 --- a/external/python3/ExternalPackage_python3.mk +++ b/external/python3/ExternalPackage_python3.mk @@ -17,12 +17,12 @@ python_arch_subdir=amd64/ else python_arch_subdir=win32/ endif -$(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/bin/python.exe,PCbuild/$(python_arch_subdir)python$(if $(MSVC_USE_DEBUG_RUNTIME),_d).exe)) +$(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python-core-3.7.7/bin/python.exe,PCbuild/$(python_arch_subdir)python$(if $(MSVC_USE_DEBUG_RUNTIME),_d).exe)) $(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if $(MSVC_USE_DEBUG_RUNTIME),_d).dll,PCbuild/$(python_arch_subdir)python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if $(MSVC_USE_DEBUG_RUNTIME),_d).dll)) ifeq ($(MSVC_USE_DEBUG_RUNTIME),) $(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python$(PYTHON_VERSION_MAJOR).dll,PCbuild/$(python_arch_subdir)python$(PYTHON_VERSION_MAJOR).dll)) endif -$(eval $(call gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib,\ +$(eval $(call gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-core-3.7.7/lib,\ PCbuild/$(python_arch_subdir)_asyncio$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \ PCbuild/$(python_arch_subdir)_ctypes$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \ PCbuild/$(python_arch_subdir)_ctypes_test$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \ @@ -55,7 +55,7 @@ $(eval $(call gb_ExternalPackage_add_file,pyth
[Libreoffice-commits] core.git: Branch 'private/timar/pythonupgrademsp' - 0 commits -
Rebased ref, commits from common ancestor: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: writerfilter/source
writerfilter/source/rtftok/rtfsdrimport.cxx |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) New commits: commit 166412cb09eef1a65219f7ba27a219440a5a89ea Author: Xisco Fauli AuthorDate: Thu Mar 18 10:55:14 2021 +0100 Commit: Miklos Vajna CommitDate: Thu Mar 18 14:04:54 2021 +0100 writerfilter: remove another pointless convertMm100ToTwip Similar to c9e5640c8fcad7beb42a66f9bee0252eee9fe323 < tdf#118693: no need to use convertMm100ToTwip() for line shapes anymore > This was added in 6046062719f30849cd97161c6a89d27a0b0d2a20 < tdf#90097 RTF import: handle fRelFlipV property for line shapes > and it's not needed since 36bade04d3780bc54c51b46bb0b63e69789658a5 < tdf106792 Get rid of SvxShapePolyPolygonBezier > when ForceMetricToItemPoolMetric was added to SvxShapePolyPolygon::setPropertyValueImpl to convert from 100thmm to twips as can be read The unittest was rewritten in a7afdcd8d191248fd143743e818aa9985b95743c < tdf#90097 rtfimport: rewrite unit test so it run reliably > so no tweaking is needed there Change-Id: I31bac5a39005054e2b37dc1c76cb2194a3753684 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112665 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx b/writerfilter/source/rtftok/rtfsdrimport.cxx index 2308fdaf54c7..2eeb8598c09f 100644 --- a/writerfilter/source/rtftok/rtfsdrimport.cxx +++ b/writerfilter/source/rtftok/rtfsdrimport.cxx @@ -977,9 +977,8 @@ void RTFSdrImport::resolve(RTFShape& rShape, bool bClose, ShapeOrPict const shap for (sal_Int32 i = 0; i < rPolygon.getLength(); ++i) { basegfx::B2DPoint aPoint(aPoly.getB2DPoint(i)); -rPolygon[i] -= awt::Point(static_cast(convertMm100ToTwip(aPoint.getX())), - static_cast(convertMm100ToTwip(aPoint.getY(; +rPolygon[i] = awt::Point(static_cast(aPoint.getX()), + static_cast(aPoint.getY())); } xPropertySet->setPropertyValue("PolyPolygon", uno::makeAny(aPolyPolySequence)); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/qa sw/source writerfilter/source
sw/qa/extras/ooxmlexport/data/effect-extent-line-width.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport16.cxx | 21 +++ sw/source/filter/ww8/docxsdrexport.cxx | 11 +++ writerfilter/source/dmapper/GraphicImport.cxx | 36 ++-- 4 files changed, 63 insertions(+), 5 deletions(-) New commits: commit ea6193d64c5bed72bfb919b782434a0b3674c525 Author: Miklos Vajna AuthorDate: Tue Mar 16 09:05:57 2021 +0100 Commit: Xisco Fauli CommitDate: Thu Mar 18 14:10:26 2021 +0100 tdf#138895 DOCX filter: fix handling for effect extent vs line width Regression from commit a5a836d8c43dc9cebbbf8af39bf0142de603a7c6 (DOCX filter: effect extent should be part of the margin, 2014-12-04), the problem was that effect extent is OK to be added as an extra margin, but line width is part of that effect extent in Word, so Writer margin should not be increased with the line width. The Word behavior seems to be that half of the line width is part of e.g. the top effect extent, then the other half is part of the bottom one (and so on). The bugdoc's case was that a too large margin shifted the last line below the shape, and this tiny half-line-width extra margin handled correctly puts the line back to its correct place. Change-Id: Ic897926f3d79f979ea84aef3dbda49c46b18a3ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112558 Reviewed-by: Miklos Vajna Tested-by: Jenkins Signed-off-by: Xisco Fauli Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112582 diff --git a/sw/qa/extras/ooxmlexport/data/effect-extent-line-width.docx b/sw/qa/extras/ooxmlexport/data/effect-extent-line-width.docx new file mode 100644 index ..5cc4d4e374ee Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/effect-extent-line-width.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx index f532794e3874..a397bb073ecf 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx @@ -74,6 +74,27 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFooterMarginLost, "footer-margin-lost.do assertXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:pgMar", "footer", "709"); } +CPPUNIT_TEST_FIXTURE(Test, testEffectExtentLineWidth) +{ +auto verify = [this]() { +CPPUNIT_ASSERT_EQUAL(static_cast(508), + getProperty(getShape(1), "TopMargin")); +}; + +// Given a document with a shape that has a non-zero line width and effect extent: +// When loading the document: +load(mpTestDocumentPath, "effect-extent-line-width.docx"); +// Then make sure that the line width is not taken twice (once as part of the margin, and then +// also as the line width): +// Without the accompanying fix in place, this test would have failed with: +// - Expected: 508 +// - Actual : 561 +// i.e. the upper spacing was too large, the last line of the text moved below the shape. +verify(); +reload(mpFilter, "effect-extent-line-width.docx"); +verify(); +} + DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf140572_docDefault_superscript, "tdf140572_docDefault_superscript.docx") { // A round-trip was crashing. diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx index 8d68eb5da6f7..bcf2959dd149 100644 --- a/sw/source/filter/ww8/docxsdrexport.cxx +++ b/sw/source/filter/ww8/docxsdrexport.cxx @@ -35,6 +35,7 @@ #include #include #include +#include using namespace com::sun::star; using namespace oox; @@ -447,22 +448,32 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrameFormat* pFrameFormat, cons } } attrList->add(XML_behindDoc, bOpaque ? "0" : "1"); +sal_Int32 nLineWidth = 0; +if (const SdrObject* pObject = pFrameFormat->FindRealSdrObject()) +{ +nLineWidth = pObject->GetMergedItem(XATTR_LINEWIDTH).GetValue(); +} + // Extend distance with the effect extent if the shape is not rotated, which is the opposite // of the mapping done at import time. // The type of dist* attributes is unsigned, so make sure no negative value is written. sal_Int64 nTopExtDist = nRotation ? 0 : nTopExt; +nTopExtDist -= TwipsToEMU(nLineWidth / 2); sal_Int64 nDistT = std::max(static_cast(0), TwipsToEMU(aULSpaceItem.GetUpper()) - nTopExtDist); attrList->add(XML_distT, OString::number(nDistT).getStr()); sal_Int64 nBottomExtDist = nRotation ? 0 : nBottomExt; +nBottomExtDist -= TwipsToEMU(nLineWidth / 2); sal_Int64 nDistB = std::max(static_cast(0), TwipsToEMU(aULSpaceItem.GetLower()) - nBottomExtDist); attrList->add(XML_distB, OString::number(nDistB).getStr())
[Libreoffice-commits] core.git: vcl/source
vcl/source/bitmap/bitmap.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 3b544a311d6ab22e1e04c45a841d5f24d5c6b325 Author: Luboš Luňák AuthorDate: Thu Jan 21 12:56:48 2021 +0100 Commit: Luboš Luňák CommitDate: Thu Mar 18 14:42:37 2021 +0100 fix incorrect palette color indexes nSrcCount is obviously not supposed to be related to pDstAcc if it's used to index pSrcAcc. And nNextIndex is used to index pDstAcc, so it should be compared to nDstCount. Change-Id: Icc47f316a8c376943c66d1ef6127a6f85c56b624 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112667 Tested-by: Jenkins Reviewed-by: Luboš Luňák diff --git a/vcl/source/bitmap/bitmap.cxx b/vcl/source/bitmap/bitmap.cxx index caf589149382..ab83d18bd004 100644 --- a/vcl/source/bitmap/bitmap.cxx +++ b/vcl/source/bitmap/bitmap.cxx @@ -579,10 +579,10 @@ bool Bitmap::CopyPixel( const tools::Rectangle& rRectDst, if( pSrcAcc && pDstAcc ) { -const int nSrcCount = pDstAcc->GetPaletteEntryCount(); +const int nSrcCount = pSrcAcc->GetPaletteEntryCount(); const int nDstCount = 1 << nDstBitCount; -for (int i = 0; ( i < nSrcCount ) && ( nNextIndex < nSrcCount ); ++i) +for (int i = 0; ( i < nSrcCount ) && ( nNextIndex < nDstCount ); ++i) { const BitmapColor& rSrcCol = pSrcAcc->GetPaletteColor( static_cast(i) ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - lingucomponent/source
lingucomponent/source/spellcheck/macosxspell/macspellimp.mm | 25 1 file changed, 25 insertions(+) New commits: commit c7411af8f56c5120c3571e2bf0bce86e9c6b4559 Author: Tor Lillqvist AuthorDate: Thu Mar 18 13:45:18 2021 +0200 Commit: Tor Lillqvist CommitDate: Thu Mar 18 15:09:08 2021 +0100 Use the iOS fr_FR and it_IT dictionaries for other relevant countries, too Fixes https://github.com/CollaboraOnline/online/issues/1463 Change-Id: I9fffd4bc9499aee2098258f5c3a9181330b339a1 Signed-off-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112670 diff --git a/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm b/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm index ab463e7d43aa..822e7481daac 100644 --- a/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm +++ b/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm @@ -195,11 +195,36 @@ Sequence< Locale > SAL_CALL MacSpellChecker::getLocales() postspdict.push_back( pLangStr ); } } +#ifdef IOS +else if ([pLangStr isEqualToString:@"fr_FR"]) +{ +const std::vector aFR +{ @"BE", @"BF", @"BJ", @"CA", @"CH", @"CI", @"FR", @"LU", @"MC", @"ML", + @"MU", @"NE", @"SN", @"TG" }; +for (auto c: aFR) +{ +pLangStr = [@"fr_" stringByAppendingString: c]; +postspdict.push_back( pLangStr ); +} +} +#endif else if ([pLangStr isEqualToString:@"it"]) { postspdict.push_back( @"it_CH" ); postspdict.push_back( @"it_IT" ); } +#ifdef IOS +else if ([pLangStr isEqualToString:@"it_IT"]) +{ +const std::vector aIT +{ @"CH", @"IT" }; +for (auto c: aIT) +{ +pLangStr = [@"it_" stringByAppendingString: c]; +postspdict.push_back( pLangStr ); +} +} +#endif else if ([pLangStr isEqualToString:@"ko"]) { postspdict.push_back( @"ko_KR" ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: include/sfx2 sd/source sfx2/inc sfx2/source sfx2/uiconfig sfx2/UIConfig_sfx.mk solenv/sanitizers svx/source
include/sfx2/sidebar/Deck.hxx | 47 +--- include/sfx2/sidebar/FocusManager.hxx | 10 include/sfx2/sidebar/Panel.hxx| 47 ++-- include/sfx2/sidebar/PanelLayout.hxx |2 include/sfx2/sidebar/SidebarController.hxx|4 include/sfx2/sidebar/Theme.hxx|7 sd/source/ui/sidebar/SlideBackground.cxx |4 sfx2/UIConfig_sfx.mk |2 sfx2/inc/sidebar/DeckLayouter.hxx | 13 - sfx2/inc/sidebar/DeckTitleBar.hxx |6 sfx2/inc/sidebar/PanelTitleBar.hxx| 11 - sfx2/inc/sidebar/TitleBar.hxx | 32 +-- sfx2/inc/sidebar/UnoPanel.hxx |2 sfx2/source/sidebar/Deck.cxx | 231 -- sfx2/source/sidebar/DeckLayouter.cxx | 214 +--- sfx2/source/sidebar/DeckTitleBar.cxx | 30 -- sfx2/source/sidebar/FocusManager.cxx | 138 - sfx2/source/sidebar/Panel.cxx | 88 +--- sfx2/source/sidebar/PanelLayout.cxx |7 sfx2/source/sidebar/PanelTitleBar.cxx | 14 - sfx2/source/sidebar/SidebarController.cxx | 75 +++ sfx2/source/sidebar/TabBar.cxx|2 sfx2/source/sidebar/Theme.cxx | 62 - sfx2/source/sidebar/TitleBar.cxx | 47 ++-- sfx2/source/sidebar/UnoDeck.cxx |4 sfx2/source/sidebar/UnoPanel.cxx | 25 +- sfx2/uiconfig/ui/deck.ui | 132 sfx2/uiconfig/ui/decktitlebar.ui | 89 sfx2/uiconfig/ui/panel.ui |6 solenv/sanitizers/ui/sfx.suppr|4 svx/source/sidebar/area/AreaPropertyPanelBase.cxx | 32 +-- 31 files changed, 551 insertions(+), 836 deletions(-) New commits: commit f9cf66b39ea00afc66ae79ca46cd9071f3598cb8 Author: Caolán McNamara AuthorDate: Fri Mar 12 14:25:34 2021 + Commit: Caolán McNamara CommitDate: Thu Mar 18 15:17:59 2021 +0100 weld the sidebar deck Change-Id: Idc6710df7e59bcb5f61fca783e0cc0666cb13a1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112404 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/include/sfx2/sidebar/Deck.hxx b/include/sfx2/sidebar/Deck.hxx index 5122d7a63470..76f92f8da88c 100644 --- a/include/sfx2/sidebar/Deck.hxx +++ b/include/sfx2/sidebar/Deck.hxx @@ -19,15 +19,14 @@ #pragma once #include - -#include - -class ScrollBar; +#include +#include namespace sfx2::sidebar { class DeckDescriptor; class DeckTitleBar; +class SidebarDockingWindow; /** This is the parent window of the panels. It displays the deck title. @@ -35,25 +34,25 @@ class DeckTitleBar; A deck consists of multiple panels. E.g. Properties, Styles, Navigator. */ -class Deck final : public vcl::Window +class Deck final : public InterimItemWindow { public: -Deck(const DeckDescriptor& rDeckDescriptor, vcl::Window* pParentWindow, +Deck(const DeckDescriptor& rDeckDescriptor, SidebarDockingWindow* pParentWindow, const std::function& rCloserAction); virtual ~Deck() override; virtual void dispose() override; const OUString& GetId() const { return msId; } -VclPtr const& GetTitleBar() const; +DeckTitleBar* GetTitleBar() const; tools::Rectangle GetContentArea() const; void ResetPanels(const SharedPanelContainer& rPanels); const SharedPanelContainer& GetPanels() const { return maPanels; } -Panel* GetPanel(std::u16string_view panelId); +std::shared_ptr GetPanel(std::u16string_view panelId); void RequestLayout(); -vcl::Window* GetPanelParentWindow(); +weld::Widget* GetPanelParentWindow(); /** Try to make the panel completely visible. When the whole panel does not fit then make its top visible @@ -61,28 +60,15 @@ public: */ void ShowPanel(const Panel& rPanel); -virtual void ApplySettings(vcl::RenderContext& rRenderContext) override; -virtual void Paint(vcl::RenderContext& rRenderContext, - const tools::Rectangle& rUpdateArea) override; virtual void DataChanged(const DataChangedEvent& rEvent) override; -virtual bool EventNotify(NotifyEvent& rEvent) override; + virtual void Resize() override; virtual void DumpAsPropertyTree(tools::JsonWriter&) override; sal_Int32 GetMinimalWidth() const { return mnMinimalWidth; } -class ScrollContainerWindow final : public vcl::Window -{ -public: -ScrollContainerWindow(vcl::Window* pParentWindow); -virtual void Paint(vcl::RenderContext& rRenderContext, - const tools::Rectangle& rUpdateArea) override; -void SetSeparators(const ::std::vector& rSeparators)
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - oox/source sw/qa
oox/source/drawingml/shape.cxx |9 -- sw/qa/extras/ooxmlimport/data/tdf118693.docx |binary sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 12 +--- sw/qa/extras/ooxmlimport/ooxmlimport2.cxx| 37 +++ 4 files changed, 40 insertions(+), 18 deletions(-) New commits: commit ddf13fc815903238c90aa963af7e0ea96fe7280d Author: Xisco Fauli AuthorDate: Thu Mar 18 00:48:49 2021 +0100 Commit: Xisco Fauli CommitDate: Thu Mar 18 15:20:10 2021 +0100 tdf#118693: no need to use convertMm100ToTwip() for line shapes anymore It was introduced in 11129d89b152db54c86bb2bda58c24b8abb6c5a8 < tdf#85232 WPG import: fix handling of line shapes > and later in 36bade04d3780bc54c51b46bb0b63e69789658a5 < tdf106792 Get rid of SvxShapePolyPolygonBezier > ForceMetricToItemPoolMetric was added to SvxShapePolyPolygon::setPropertyValueImpl to convert from 100thmm to twips as can be read in the comment in testTdf85232 With this change, xShape->getPosition().X in testTdf85232 is 2267, which was already in twips Change-Id: I30b757885327a477213f96f8f84541971f435164 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112663 Tested-by: Jenkins Reviewed-by: Miklos Vajna (cherry picked from commit c9e5640c8fcad7beb42a66f9bee0252eee9fe323) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112619 Reviewed-by: Xisco Fauli Signed-off-by: Xisco Fauli Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112671 diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index 567564479846..5aeab36ba880 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -846,7 +846,6 @@ Reference< XShape > const & Shape::createAndInsert( uno::Sequence< awt::Point > aPointSequence( nNumPoints ); awt::Point* pPoints = aPointSequence.getArray(); uno::Reference xModelInfo(rFilterBase.getModel(), uno::UNO_QUERY); -bool bIsWriter = xModelInfo->supportsService("com.sun.star.text.TextDocument"); for( i = 0; i < nNumPoints; ++i ) { const basegfx::B2DPoint aPoint( aPoly.getB2DPoint( i ) ); @@ -854,13 +853,7 @@ Reference< XShape > const & Shape::createAndInsert( // tdf#106792 Not needed anymore due to the change in SdrPathObj::NbcResize: // tdf#96674: Guard against zero width or height. -if (bIsWriter && bNoTranslation) -// Writer's draw page is in twips, and these points get passed -// to core without any unit conversion when Writer -// postprocesses only the group shape itself. -pPoints[i] = awt::Point(static_cast(convertMm100ToTwip(aPoint.getX())), static_cast(convertMm100ToTwip(aPoint.getY(; -else -pPoints[i] = awt::Point(static_cast(aPoint.getX()), static_cast(aPoint.getY())); +pPoints[i] = awt::Point(static_cast(aPoint.getX()), static_cast(aPoint.getY())); } uno::Sequence< uno::Sequence< awt::Point > > aPolyPolySequence( 1 ); aPolyPolySequence.getArray()[ 0 ] = aPointSequence; diff --git a/sw/qa/extras/ooxmlimport/data/tdf118693.docx b/sw/qa/extras/ooxmlimport/data/tdf118693.docx new file mode 100644 index ..4e832398bcd5 Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/tdf118693.docx differ diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index f932e9739800..fe1b4ed5028d 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -1315,16 +1315,8 @@ DECLARE_OOXMLIMPORT_TEST(testTdf85232, "tdf85232.docx") // Make sure we're not testing the ellipse child. CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.drawing.LineShape"), xShapeDescriptor->getShapeType()); -// tdf#106792 checked that during load of tdf85232.docx the method -// SvxShapePolyPolygon::setPropertyValueImpl is used three times. In -// that method, a call to ForceMetricToItemPoolMetric was missing so -// that the import did not convert the input values from 100thmm -// to twips what is needed due to the object residing in Writer. The -// UNO API by definition is in 100thmm. Result is that in SwXShape::getPosition -// the offset (aOffset) now is (0, 0) instead of an existing offset in -// the load of the document before (what is plausible for a GroupObject). -// Thus, I will adapt the result value here to the now (hopefully) correct one. -CPPUNIT_ASSERT_EQUAL(static_cast(1630), xShape->getPosition().X); // was: 2267 +// This was 2900: horizontal position of the line was incorrect, the 3 children were not connected visually. +CPPUNIT_ASSERT_EQUAL(static_cast(2267), xShape->getPosition().X); } DECLARE_OOXMLIMPORT_TEST(testTdf95755, "tdf95755.docx") diff --git a/sw/qa/extras/ooxmlimport/ooxmli
[Libreoffice-commits] core.git: wizards/source
wizards/source/scriptforge/python/scriptforge.py | 63 --- 1 file changed, 33 insertions(+), 30 deletions(-) New commits: commit 83bee81c5228e8950c3c9da46e050936c19858e7 Author: Jean-Pierre Ledure AuthorDate: Thu Mar 18 11:49:25 2021 +0100 Commit: Jean-Pierre Ledure CommitDate: Thu Mar 18 15:39:01 2021 +0100 ScriptForge - (scritforge.py) SF_Basic: review of function signatures The signatures of standard Basic built-in functions were derived from the Help documentation. They appeared to be inexact. They now comply with core/basic/source/runtime/stdobj.cxx Change-Id: I343fb553f5fad5236d75f6b72910714d47b6a289 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112669 Tested-by: Jean-Pierre Ledure Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure diff --git a/wizards/source/scriptforge/python/scriptforge.py b/wizards/source/scriptforge/python/scriptforge.py index ed87679ee99f..14ba1e48c8db 100644 --- a/wizards/source/scriptforge/python/scriptforge.py +++ b/wizards/source/scriptforge/python/scriptforge.py @@ -538,6 +538,9 @@ class SFScriptForge: simulating the exact syntax and behaviour of the identical Basic builtin method. Typical example: SF_Basic.MsgBox('This has to be displayed in a message box') + +The signatures of Basic builtin functions are derived from +core/basic/source/runtime/stdobj.cxx """ # Mandatory class properties for service registration serviceimplementation = 'python' @@ -551,50 +554,50 @@ class SFScriptForge: MB_OK, MB_OKCANCEL, MB_RETRYCANCEL, MB_YESNO, MB_YESNOCANCEL = 0, 1, 5, 4, 3 IDABORT, IDCANCEL, IDIGNORE, IDNO, IDOK, IDRETRY, IDYES = 3, 2, 5, 7, 1, 4, 6 -def ConvertFromUrl(self, filename): -return self.SIMPLEEXEC(self.module + '.PyConvertFromUrl', filename) +def ConvertFromUrl(self, url): +return self.SIMPLEEXEC(self.module + '.PyConvertFromUrl', url) convertFromUrl, convertfromurl = ConvertFromUrl, ConvertFromUrl -def ConvertToUrl(self, filename): -return self.SIMPLEEXEC(self.module + '.PyConvertToUrl', filename) +def ConvertToUrl(self, systempath): +return self.SIMPLEEXEC(self.module + '.PyConvertToUrl', systempath) convertToUrl, converttourl = ConvertToUrl, ConvertToUrl -def CreateUnoService(self, unoservice): -return self.SIMPLEEXEC(self.module + '.PyCreateUnoService', unoservice) +def CreateUnoService(self, servicename): +return self.SIMPLEEXEC(self.module + '.PyCreateUnoService', servicename) createUnoService, createunoservice = CreateUnoService, CreateUnoService -def DateAdd(self, add, count, datearg): -if isinstance(datearg, datetime.datetime): -datearg = datearg.isoformat() -dateadd = self.SIMPLEEXEC(self.module + '.PyDateAdd', add, count, datearg) +def DateAdd(self, interval, number, date): +if isinstance(date, datetime.datetime): +date = date.isoformat() +dateadd = self.SIMPLEEXEC(self.module + '.PyDateAdd', interval, number, date) return datetime.datetime.fromisoformat(dateadd) dateAdd, dateadd = DateAdd, DateAdd -def DateDiff(self, add, date1, date2, weekstart = 1, yearstart = 1): +def DateDiff(self, interval, date1, date2, firstdayofweek = 1, firstweekofyear = 1): if isinstance(date1, datetime.datetime): date1 = date1.isoformat() if isinstance(date2, datetime.datetime): date2 = date2.isoformat() -return self.SIMPLEEXEC(self.module + '.PyDateDiff', add, date1, date2, weekstart, yearstart) +return self.SIMPLEEXEC(self.module + '.PyDateDiff', interval, date1, date2, firstdayofweek, firstweekofyear) dateDiff, datediff = DateDiff, DateDiff -def DatePart(self, add, datearg, weekstart = 1, yearstart = 1): -if isinstance(datearg, datetime.datetime): -datearg = datearg.isoformat() -return self.SIMPLEEXEC(self.module + '.PyDatePart', add, datearg, weekstart, yearstart) +def DatePart(self, interval, date, firstdayofweek = 1, firstweekofyear = 1): +if isinstance(date, datetime.datetime): +date = date.isoformat() +return self.SIMPLEEXEC(self.module + '.PyDatePart', interval, date, firstdayofweek, firstweekofyear) datePart, datepart = DatePart, DatePart -def DateValue(self, datearg): -if isinstance(datearg, datetime.datetime): -datearg = datearg.isoformat() -datevalue = self.SIMPLEEXEC(self.module + '.PyDateValue', datearg) +def DateValue(self, string): +if isinstance(string, datetime.datetime)
Re: ANN: renaming of master branch to "main" for core repository and submodules (dictionaries, help, translations)
For what it's worth (i.e., not much), I am completely in favour of the renaming. --tml ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - filter/source
filter/source/svg/presentation_engine.js | 23 --- 1 file changed, 16 insertions(+), 7 deletions(-) New commits: commit c23509b64468e4ebf0d72a1412c238a093b37cf4 Author: Szymon Kłos AuthorDate: Wed Mar 17 15:57:21 2021 +0100 Commit: Andras Timar CommitDate: Thu Mar 18 16:06:33 2021 +0100 Polyfill presentation_engine.js for IE11 IE11 doesn't support: Array.includes, String.startsWith and Math.trunc Change-Id: I71c5810ad9230988453f70e880f46869728f49c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112645 Tested-by: Andras Timar Reviewed-by: Andras Timar diff --git a/filter/source/svg/presentation_engine.js b/filter/source/svg/presentation_engine.js index 7f3cb48bcfbf..0babb0083cc8 100644 --- a/filter/source/svg/presentation_engine.js +++ b/filter/source/svg/presentation_engine.js @@ -31,6 +31,15 @@ var round = Math.round; var abs = Math.abs; var now = Date.now; +/** + * polyfill for IE11 + */ +if (!Math.trunc) { +Math.trunc = function (v) { +return v < 0 ? Math.ceil(v) : Math.floor(v); +}; +} + /** * set a timeout with a given scope * @param {Function} fn @@ -5393,9 +5402,9 @@ function getTextFieldType ( elem ) function isTextFieldByClassName ( sClassName ) { return sClassName === aDateTimeClassName || sClassName === aFooterClassName -|| sClassName === aHeaderClassName || sClassName.startsWith( aSlideNumberClassName ) -|| sClassName.startsWith( aDateClassName ) || sClassName.startsWith( aTimeClassName ) -|| sClassName.startsWith( aSlideNameClassName ); +|| sClassName === aHeaderClassName || sClassName.indexOf( aSlideNumberClassName ) == 0 +|| sClassName.indexOf( aDateClassName ) == 0 || sClassName.indexOf( aTimeClassName ) == 0 +|| sClassName.indexOf( aSlideNameClassName ) == 0; } /** Class MasterPage @@ -5819,7 +5828,7 @@ MasterPageView.prototype.createElement = function() for( ; i < aBackgroundObjectSubGroupIdList.length; ++i ) { sId = aBackgroundObjectSubGroupIdList[i]; -if( sId.startsWith( aSlideNumberClassName ) ) +if( sId.indexOf( aSlideNumberClassName ) == 0 ) { // Slide Number Field // The cloned element is appended directly to the field group element @@ -5873,9 +5882,9 @@ MasterPageView.prototype.createElement = function() aTextFieldHandlerSet, sMasterSlideId ); } } -else if( sId.startsWith( aDateClassName ) -|| sId.startsWith( aTimeClassName ) -|| sId.startsWith( aSlideNameClassName ) ) +else if( sId.indexOf( aDateClassName ) == 0 +|| sId.indexOf( aTimeClassName ) == 0 +|| sId.indexOf( aSlideNameClassName ) == 0 ) { this.initTextFieldHandler( sId, aPlaceholderShapeSet, aTextFieldContentProviderSet, aDefsElement, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/LOKitThread.java |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 88f4b76270c26ab1d99c14f68cdcbea4b6ee9031 Author: Michael Weghorn AuthorDate: Thu Mar 18 13:59:14 2021 +0100 Commit: Michael Weghorn CommitDate: Thu Mar 18 16:13:07 2021 +0100 tdf#125318 android: Allow copying with editing disabled Don't make the possibility to select and copy text depending on editing being enabled, i.e. experimental mode being enabled in Android Viewer. In a quick test, this worked just fine in read-only mode as well, so tapping on text in a document now shows two cursors around the tapped word, and allows adapting the selection using these and copying to the clipboard by using the corresponding toolbar entry. Change-Id: Icbd9d055a6cc700b78711df178f594c7a9c5cfbf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112673 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/src/java/org/libreoffice/LOKitThread.java b/android/source/src/java/org/libreoffice/LOKitThread.java index e554f0800cf0..03b7070e783a 100644 --- a/android/source/src/java/org/libreoffice/LOKitThread.java +++ b/android/source/src/java/org/libreoffice/LOKitThread.java @@ -448,7 +448,7 @@ class LOKitThread extends Thread { boolean editing = LOKitShell.isEditingEnabled(); float zoomFactor = mViewportMetrics.getZoomFactor(); -if (touchType.equals("LongPress") && editing) { +if (touchType.equals("LongPress")) { mInvalidationHandler.changeStateTo(InvalidationHandler.OverlayState.TRANSITION); mTileProvider.mouseButtonDown(documentCoordinate, 1, zoomFactor); mTileProvider.mouseButtonUp(documentCoordinate, 1, zoomFactor); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-7-1+backports' - android/source
android/source/src/java/org/libreoffice/LOKitThread.java |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 6b15b6d5e80f15a15838cdbde979f5b8319e090a Author: Michael Weghorn AuthorDate: Thu Mar 18 13:59:14 2021 +0100 Commit: Michael Weghorn CommitDate: Thu Mar 18 16:13:53 2021 +0100 tdf#125318 android: Allow copying with editing disabled Don't make the possibility to select and copy text depending on editing being enabled, i.e. experimental mode being enabled in Android Viewer. In a quick test, this worked just fine in read-only mode as well, so tapping on text in a document now shows two cursors around the tapped word, and allows adapting the selection using these and copying to the clipboard by using the corresponding toolbar entry. Change-Id: Icbd9d055a6cc700b78711df178f594c7a9c5cfbf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112673 Tested-by: Jenkins Reviewed-by: Michael Weghorn (cherry picked from commit 88f4b76270c26ab1d99c14f68cdcbea4b6ee9031) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112627 Tested-by: Michael Weghorn diff --git a/android/source/src/java/org/libreoffice/LOKitThread.java b/android/source/src/java/org/libreoffice/LOKitThread.java index e554f0800cf0..03b7070e783a 100644 --- a/android/source/src/java/org/libreoffice/LOKitThread.java +++ b/android/source/src/java/org/libreoffice/LOKitThread.java @@ -448,7 +448,7 @@ class LOKitThread extends Thread { boolean editing = LOKitShell.isEditingEnabled(); float zoomFactor = mViewportMetrics.getZoomFactor(); -if (touchType.equals("LongPress") && editing) { +if (touchType.equals("LongPress")) { mInvalidationHandler.changeStateTo(InvalidationHandler.OverlayState.TRANSITION); mTileProvider.mouseButtonDown(documentCoordinate, 1, zoomFactor); mTileProvider.mouseButtonUp(documentCoordinate, 1, zoomFactor); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
oox import/export of custom shape extrusion
Hi all, I want to work on getting oox import/export of custom shape extrusion. In this context I have two questions: (A) In case a grabBag exists, it will be necessary to merge values from the internal "extrusion" property with values from the grabBag on export. In case no grabBag exists, writing OOXML from the internal properties is needed. In case no internal "extrusion" property exists, the current solution of writing the gragBag is OK. Should I use separate solutions for the three cases? Advantage would be, that the development can be done without interfering the current solution for "only grabBag". But a solution for "merge" would be able to solve the situation "no grabBag" and "only grabBag" too, so doing only that might avoid code duplication. (B) I need a table of the OOXML camera preset properties. Import needs to read the internal (ODF) property values corresponding to the preset name and export needs to get a suitable preset name from the internal (ODF) property values and to get associated (OOXML) preset property values. A single camera preset will become a struct. But what data structure is best for the set of 62 presets? I think of std::unordered_map, with preset name as key, or std::array. Kind regards Regina ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
ESC meeting minutes: 2021-03-18
* Present: + Cloph, Olivier, Heiko, Xisco, Caolan, Michael W, Gabriel, Miklos, Michael S, Thorsten * Completed Action Items: + release note .uno:InsertZWNBSP / SID_INSERT_ZWNBSP rename (Heiko) * Pending Action Items: + None * Release Engineering update (Cloph) + 7.2 alpha 1 in 2nd week of May + 7.1 status: 7.1.2 rc1 is on mirrors, rc2 is scheduled for next week + 7.0 status: 7.0.6 rc1 on the week of 18th April + Remotes: Android, iOS + Android viewer * Documentation (Olivier) + New Help + No news + Helpcontents2 + 273 bugs open + Updates, refactors and fixes (Johnny_M, S. Chaiklin, R. Lima, A. Barrientos, ohallot, A. Gelmini) + Google seasons of Doc 2021 + Collecting ideas, deadline is March 26. + wiki: … https://wiki.documentfoundation.org/Documentation/GSoDOC/2021#Ideas_for_Documentation_technical_writing + Guides + Team update for release 7.1 + Team asking to be informed on changes in UI, + features not listed in release notes + Impact in screenshots/review * UX Update (Heiko) + Bugzilla (topicUI) statistics 245(245) (topicUI) bugs open, 224(224) (needsUXEval) needs to be evaluated by the UXteam + Updates: BZ changes 1 week 1 month 3 months 12 months added 8(-5)16(-5)40(-5) 108(-4) commented 89(35) 251(55) 838(-8)3808(50) removed 2(2) 4(0) 12(0) 27(0) resolved 12(7) 39(5)127(-9) 501(1) + top 10 contributors: Heiko Tietze made 168 changes in 1 month, and 2419 changes in 1 year Seth Chaiklin made 50 changes in 1 month, and 191 changes in 1 year Telesto made 43 changes in 1 month, and 950 changes in 1 year Ilmari Lauhakangas made 42 changes in 1 month, and 351 changes in 1 year Dieter made 35 changes in 1 month, and 393 changes in 1 year Foote, V Stuart made 20 changes in 1 month, and 626 changes in 1 year Eyal Rozenberg made 16 changes in 1 month, and 22 changes in 1 year Xisco Fauli made 14 changes in 1 month, and 198 changes in 1 year Henschel, Regina made 10 changes in 1 month, and 94 changes in 1 year Roman Kuznetsov made 9 changes in 1 month, and 188 changes in 1 year + 9 new tickets with needsUXEval Mar/11-18 [Bug 141094] UI: Ability to set configure image resolution to be shown in inch instead of cm, if other dimensions are in CM [Bug 141077] Writer Web mode should be one-column, instead it shows meaningless page breaks and column jumps [Bug 116349] Writer table underlining indents text 1 mm at both sides [Bug 140752] .uno.DefaultNumbering and .uno:defaultBullet (on Formatting bar) modify a list style -- should it? [Bug 141059] Page Style -> Area -> bitmap -> stretched fill page within page margins (all others total page fill) [Bug 141020] [Feature request] Add template search online [Bug 140911] Standard (Set to Parent) button in Styles dialog should only be active when it is possible to apply on a tab [Bug 140969] UI: All selected items in canvas should be highlighted in navigator [Bug 140955] EDITING Highlight active autofilters dropdown * Crash Testing (Caolan) + 13(-2) import failure, 4(-1) export failures + 0 coverity issues - alternative upload mechanism appears to work, this build was created 3 weeks ago though, next build will be up to date and with latest tooling + 23 ossfuzz issues, 10 non-timeout/OOM * Crash Reporting (Xisco) + https://crashreport.libreoffice.org/stats/version/7.0.4.2 + (+252) 5903 5651 5593 5375 5272 5698 6259 5595 3893 2033 1027 0 + https://crashreport.libreoffice.org/stats/version/7.0.5.2 + (+358) 358 0 + https://crashreport.libreoffice.org/stats/version/7.1.0.3 + (-1226) 7276 8505 10520 8732 6625 4863 452 0 + https://crashreport.libreoffice.org/stats/version/7.1.1.2 + (+2939) 5645 2706 0 + crash reports without steps to reproduce + https://crashreport.libreoffice.org/stats/signature/sw::mark::FindFieldSep(sw::mark::IFieldmark%20const%20&) + ffb26b81e1c7ff1d64959200247bb2edd5a569da “sw: actually insert CH_TXT_ATR_FIELDSEP” + Michael Stahl ? + https://crashreport.libreoffice.org/stats/signature/cppu::OInterfaceContainerHelper::disposeAndClear(com::sun::star::lang::EventObject%20const%20&) + happens a lot in 7.1, trace is not informative * Mentoring/easyhack update committer... 1 week 1 month 3 months12 months open 77(-12)157(2) 160(2) 165(2) reviews 382(104)700(26
[Libreoffice-commits] core.git: sw/inc sw/source
sw/inc/IDocumentMarkAccess.hxx |7 ++- sw/source/core/doc/docbm.cxx | 24 ++-- sw/source/core/doc/docredln.cxx|8 sw/source/core/fields/postithelper.cxx | 17 - sw/source/core/inc/MarkManager.hxx |6 ++ 5 files changed, 54 insertions(+), 8 deletions(-) New commits: commit 31442054520cf0a263cc17e157cfa102cff8ef6a Author: László Németh AuthorDate: Thu Mar 18 13:41:46 2021 +0100 Commit: László Németh CommitDate: Thu Mar 18 16:32:46 2021 +0100 tdf#140980 sw: fix bad strikethrough of annotations Not deleted annotation windows got a bad strikethrough in ChangesInMargin mode, if they annotate tracked deletions. Also clean-up commit a001a66ba27e2fe9a485388869d53f001f2b09af (tdf#140982 sw ChangesInMargin: fix annotation ranges). Change-Id: I06cb88113bf038c09702b6ef33e46c94c963730d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112672 Tested-by: Jenkins Reviewed-by: László Németh diff --git a/sw/inc/IDocumentMarkAccess.hxx b/sw/inc/IDocumentMarkAccess.hxx index 49ce72ad28b4..e678f52605ff 100644 --- a/sw/inc/IDocumentMarkAccess.hxx +++ b/sw/inc/IDocumentMarkAccess.hxx @@ -341,8 +341,13 @@ class IDocumentMarkAccess virtual sal_Int32 getAnnotationMarksCount() const = 0; virtual const_iterator_t findAnnotationMark( const OUString& rName ) const = 0; virtual sw::mark::IMark* getAnnotationMarkFor(const SwPosition& rPosition) const = 0; -// restore text ranges of annotations of tracked deletions +// handle and restore text ranges of annotations of tracked deletions // based on the helper bookmarks (which can survive I/O and hiding redlines) +virtual ::sw::mark::IMark* makeAnnotationBookmark(const SwPaM& rPaM, +const OUString& rProposedName, +MarkType eMark, ::sw::mark::InsertMode eMode, +SwPosition const* pSepPos = nullptr) = 0; +virtual const_iterator_t findAnnotationBookmark( const OUString& rName ) const = 0; virtual void restoreAnnotationMarks(bool bDelete = true) = 0; /** Finds the first mark that is starting after. diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index 82579d079445..438c294c5ecd 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -49,6 +49,8 @@ #include #include +#define S_ANNOTATION_BOOKMARK u"" + using namespace ::sw::mark; std::vector<::sw::mark::MarkBase*>::const_iterator const& @@ -1641,7 +1643,25 @@ namespace sw::mark CompareIMarkStartsAfter()); } -// restore text ranges of annotations of tracked deletions +// create helper bookmark for annotations on tracked deletions +::sw::mark::IMark* MarkManager::makeAnnotationBookmark(const SwPaM& rPaM, +const OUString& rName, +const IDocumentMarkAccess::MarkType eType, +sw::mark::InsertMode const eMode, +SwPosition const*const pSepPos) +{ +OUString sAnnotationBookmarkName(rName + S_ANNOTATION_BOOKMARK); +return makeMark( rPaM, sAnnotationBookmarkName, eType, eMode, pSepPos); +} + +// find helper bookmark of annotations on tracked deletions +IDocumentMarkAccess::const_iterator_t MarkManager::findAnnotationBookmark(const OUString& rName) const +{ +OUString sAnnotationBookmarkName(rName + S_ANNOTATION_BOOKMARK); +return findBookmark(sAnnotationBookmarkName); +} + +// restore text ranges of annotations on tracked deletions // based on the helper bookmarks (which can survive I/O and hiding redlines) void MarkManager::restoreAnnotationMarks(bool bDelete) { @@ -1651,7 +1671,7 @@ namespace sw::mark const OUString & rBookmarkName = (**iter).GetName(); sal_Int32 nPos; if ( rBookmarkName.startsWith("__Annotation__") && - (nPos = rBookmarkName.indexOf("")) > -1 ) + (nPos = rBookmarkName.indexOf(S_ANNOTATION_BOOKMARK)) > -1 ) { ::sw::UndoGuard const undoGuard(m_rDoc.GetIDocumentUndoRedo()); IDocumentMarkAccess::const_iterator_t pMark = findAnnotationMark(rBookmarkName.copy(0, nPos)); diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx index d4d5cce88483..1eed6d70ce2e 100644 --- a/sw/source/core/doc/docredln.cxx +++ b/sw/source/core/doc/docredln.cxx @@ -1346,8 +1346,8 @@ static void lcl_storeAnnotationMarks(SwDoc& rDoc, const SwPosition* pStt, const SwPosition const& rStartPos((**iter).GetMarkStart()); if ( *pStt <= rStartPos && rStartPos < *pEnd ) { -OUString sBookmarkName((**iter).GetName() + ""); -IDocumentMarkAccess::const_iterator_t pOldMark = rDMA.findBookmark(sBookmarkName); +IDocumentMarkAccess::const_iterator_t pOldMark = +
[Libreoffice-commits] core.git: sw/source
sw/source/core/text/txtfld.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 0a32371cc2f93fad7954e0fe9c48976aae6c5b9f Author: Justin Luth AuthorDate: Wed Mar 10 14:41:57 2021 +0200 Commit: Justin Luth CommitDate: Thu Mar 18 16:40:02 2021 +0100 tdf#108518 partial revert tdf#64222 sw: better DOCX im/export ...of paragraph marker formatting 6.4 commit 5ba30f588d6e41a13d68b1461345fca7a7ca61ac Ultimately, this just reverts back to an earlier 6.4 change (which means that this really is untested and unproven)... > Also revert the change in checkApplyParagraphMarkFormatToNumbering() > to consider hints that start before the end of the paragraph, > as it has unintended side effects as pointed out by Mike Kaganski. But those side effects were from a DOCX file, and DOCX isn't processed here anymore. The (unedited) comment (still) says: //Formatting for the paragraph mark is usually set to apply only to the //non-existent extra character at end of the text node but there can be //other hints too (ending at nTextLen), so look for all matching hints. //Still the (non-existent) extra character at the end is preferred So, that suggests that there is more than one possible valid autofmt, and that not ALL autofmts will have a start==end. This is being considered since it fixes the one example file that I could find that still broke when reverting OOo's 2012 hack commit 1c22545edf9085b9f2656ca92781158b6b123db3 Fix issue #i119405: Numbering text style changed after importing the *.doc The other alternative would be to // TODO remove this fallback (for WW8/RTF) Change-Id: I69b6e31fe570742b4b9dd94d2cce2b5b9850360d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112319 Tested-by: Justin Luth Reviewed-by: Justin Luth diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx index e889ada8d8d4..795228efd5b3 100644 --- a/sw/source/core/text/txtfld.cxx +++ b/sw/source/core/text/txtfld.cxx @@ -446,12 +446,12 @@ static void checkApplyParagraphMarkFormatToNumbering(SwFont* pNumFnt, SwTextForm // (non-existent) extra character at end of the text node, but there can be // other hints too (ending at nTextLen), so look for all matching hints. // Still the (non-existent) extra character at the end is preferred if it exists. -if (pHint->Which() == RES_TXTATR_AUTOFMT -&& pHint->GetStart() == *pHint->End()) +if (pHint->Which() == RES_TXTATR_AUTOFMT) { pSet = pHint->GetAutoFormat().GetStyleHandle(); // When we find an empty hint (start == end) we got what we are looking for. -break; +if (pHint->GetStart() == *pHint->End()) +break; } } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - 3 commits - configure.ac shell/source
configure.ac |2 +- shell/source/unix/exec/shellexec.cxx |4 shell/source/win32/SysShExec.cxx | 30 +++--- 3 files changed, 24 insertions(+), 12 deletions(-) New commits: commit 01d6d4419e08c16d5488970d3f3ad9f059ee2625 Author: Andras Timar AuthorDate: Thu Mar 18 16:53:40 2021 +0100 Commit: Andras Timar CommitDate: Thu Mar 18 16:53:40 2021 +0100 Bump version to 6.4-30 Change-Id: I5df0d75277082634ee0ce7fd1f6d46f19a659d60 diff --git a/configure.ac b/configure.ac index 68025ea51605..b3b8162b9eb3 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([Collabora Office],[6.4.10.29],[],[],[https://collaboraoffice.com/]) +AC_INIT([Collabora Office],[6.4.10.30],[],[],[https://collaboraoffice.com/]) dnl libnumbertext needs autoconf 2.68, but that can pick up autoconf268 just fine if it is installed dnl whereas aclocal (as run by autogen.sh) insists on using autoconf and fails hard commit 18ffd81ed4d9eca82d71b07e8f4b1ef54d308fc3 Author: Stephan Bergmann AuthorDate: Tue Feb 16 09:30:09 2021 +0100 Commit: Andras Timar CommitDate: Thu Mar 18 16:52:49 2021 +0100 Improve checkExtension Change-Id: Iff416a9c5930ad5903f7ee51a2abbc94d5f40800 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110970 Reviewed-by: Mike Kaganski Tested-by: Jenkins (cherry picked from commit f456c4dacf700e064e112ef068ff7edb04239754) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110922 Reviewed-by: Michael Stahl diff --git a/shell/source/win32/SysShExec.cxx b/shell/source/win32/SysShExec.cxx index c4170d2f9de5..97a8df6e94b6 100644 --- a/shell/source/win32/SysShExec.cxx +++ b/shell/source/win32/SysShExec.cxx @@ -410,21 +410,28 @@ void SAL_CALL CSysShExec::execute( const OUString& aCommand, const OUString& aPa } } pathname = o3tl::toU(path); +// ShellExecuteExW appears to ignore trailing dots, so remove them: +while (pathname.endsWith(".", &pathname)) {} auto const n = pathname.lastIndexOf('.'); if (n > pathname.lastIndexOf('\\')) { auto const ext = pathname.copy(n + 1); -OUString env; -if (osl_getEnvironment(OUString("PATHEXT").pData, &env.pData) != osl_Process_E_None) -{ -SAL_INFO("shell", "osl_getEnvironment(PATHEXT) failed"); -} -if (!(checkExtension(ext, env) - && checkExtension( - ext, - ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.CLASS;.JAR"))) -{ -throw css::lang::IllegalArgumentException( -"XSystemShellExecute.execute, cannot process <" + aCommand + ">", {}, 0); +if (!ext.isEmpty()) { +OUString env; +if (osl_getEnvironment(OUString("PATHEXT").pData, &env.pData) +!= osl_Process_E_None) +{ +SAL_INFO("shell", "osl_getEnvironment(PATHEXT) failed"); +} +if (!(checkExtension(ext, env) + && checkExtension( + ext, + ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.CLASS;" + ".JAR;.APPLICATION;.LNK;.SCR"))) +{ +throw css::lang::IllegalArgumentException( +"XSystemShellExecute.execute, cannot process <" + aCommand + ">", {}, +0); +} } } } commit c00efc8339f0ff355dae6266532aefe6b5b685a2 Author: Stephan Bergmann AuthorDate: Wed Nov 25 09:13:12 2020 +0100 Commit: Andras Timar CommitDate: Thu Mar 18 16:52:37 2021 +0100 Better handling of Java files Change-Id: Ifa662be39ac7d35241ee31956e2556b7ba3b5a02 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106558 Tested-by: Jenkins Reviewed-by: Stephan Bergmann (cherry picked from commit 696739056f37430154d6333b8f7228d1c44d09b3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106520 Reviewed-by: Michael Stahl (cherry picked from commit ec5adc39cbea6d754ef68ab3d03fb16066b27e40) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107060 Tested-by: Michael Stahl diff --git a/shell/source/unix/exec/shellexec.cxx b/shell/source/unix/exec/shellexec.cxx index 3daea4a2b18a..ad171d70888f 100644 --- a/shell/source/unix/exec/shellexec.cxx +++ b/shell/source/unix/exec/shell
[Libreoffice-commits] dictionaries.git: Changes to 'refs/tags/cp-6.4-30'
Tag 'cp-6.4-30' created by Andras Timar at 2021-03-18 15:58 + cp-6.4-30 Changes since co-6.4-20: Andras Timar (1): update Danish dictionary --- da_DK/README_da_DK.txt |4 da_DK/da_DK.aff| 3401 da_DK/da_DK.dic|288016 +++-- da_DK/description.xml |9 4 files changed, 139245 insertions(+), 152185 deletions(-) --- ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] help.git: Changes to 'refs/tags/cp-6.4-30'
Tag 'cp-6.4-30' created by Andras Timar at 2021-03-18 15:58 + cp-6.4-30 Changes since cp-6.4-branch-point-11: --- 0 files changed --- ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] translations.git: Changes to 'refs/tags/cp-6.4-30'
Tag 'cp-6.4-30' created by Andras Timar at 2021-03-18 15:58 + cp-6.4-30 Changes since cp-6.4-23: Andras Timar (1): Translation update --- source/ar/cui/messages.po | 130 source/ar/dictionaries/da_DK.po| 24 source/ar/officecfg/registry/data/org/openoffice/Office/UI.po | 24 source/ar/svtools/messages.po | 44 source/ar/svx/messages.po | 502 - source/ar/sw/messages.po | 405 source/as/cui/messages.po | 106 source/as/dictionaries/da_DK.po| 18 source/as/officecfg/registry/data/org/openoffice/Office/UI.po | 12 source/as/svtools/messages.po | 42 source/as/svx/messages.po | 472 source/as/sw/messages.po | 385 source/ast/cui/messages.po | 108 source/ast/dictionaries/da_DK.po | 18 source/ast/officecfg/registry/data/org/openoffice/Office/UI.po | 18 source/ast/svtools/messages.po | 42 source/ast/svx/messages.po | 485 - source/ast/sw/messages.po | 387 source/bg/cui/messages.po | 106 source/bg/dictionaries/da_DK.po| 24 source/bg/officecfg/registry/data/org/openoffice/Office/UI.po | 20 source/bg/svtools/messages.po | 42 source/bg/svx/messages.po | 465 source/bg/sw/messages.po | 385 source/bn-IN/cui/messages.po | 106 source/bn-IN/dictionaries/da_DK.po | 18 source/bn-IN/officecfg/registry/data/org/openoffice/Office/UI.po | 12 source/bn-IN/svtools/messages.po | 42 source/bn-IN/svx/messages.po | 482 source/bn-IN/sw/messages.po| 386 source/br/cui/messages.po | 106 source/br/dictionaries/da_DK.po| 18 source/br/officecfg/registry/data/org/openoffice/Office/UI.po | 12 source/br/svtools/messages.po | 42 source/br/svx/messages.po | 487 - source/br/sw/messages.po | 385 source/ca-valencia/cui/messages.po | 106 source/ca-valencia/dictionaries/da_DK.po | 18 source/ca-valencia/officecfg/registry/data/org/openoffice/Office/UI.po | 12 source/ca-valencia/svtools/messages.po | 42 source/ca-valencia/svx/messages.po | 471 source/ca-valencia/sw/messages.po | 385 source/ca/cui/messages.po | 106 source/ca/dictionaries/da_DK.po| 24 source/ca/officecfg/registry/data/org/openoffice/Office/UI.po | 20 source/ca/svtools/messages.po | 42 source/ca/svx/messages.po | 471 source/ca/sw/messages.po | 385 source/cs/cui/messages.po | 106 source/cs/dictionaries/da_DK.po| 24 source/cs/officecfg/registry/data/org/openoffice/Office/UI.po | 20 source/cs/svtools/messages.po | 42 source/cs/svx/messages.po | 465 source/cs/sw/messages.po | 385 source/cy/cui/messages.po | 106 source/cy/dictionaries/da_DK.po| 24 source/cy/officecfg/registry/data/org/openoffice/Office/UI.po | 20 source/cy/svtools/messages.po | 42 source/cy/svx/messages.po | 467 source/cy/sw/messages.po | 385 source/da/cui/messages.po
[Libreoffice-commits] core.git: Changes to 'refs/tags/cp-6.4-30'
Tag 'cp-6.4-30' created by Andras Timar at 2021-03-18 15:58 + cp-6.4-30 Changes since cp-6.4-29-25: --- 0 files changed --- ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Re: Re: ANN: renaming of master branch to "main" for core
I don't want to be cause us to dwell on this matter too long. However, it occurs to me I'm a little closer to this issue than many on this list as I live in The South, by which I mean the former CSA. And not on the periphery: at one point my state had roughly one third of its population enslaved, and I know people who can tell you the names of their ancestors who were enslaved and point out the specific places. That history feels more recent and relevant here than anywhere else I've lived. So I feel it could be useful to add my piece. I like the change, but wouldn't criticize a project which didn't bother. The way I see it... Pro: 1) In my opinion "main" does a better job of describing what the branch does. 2) There's a significant number of projects using this terminology. Con: 1) It involves a small amount of work that could otherwise be skipped. 2) There will be a significant number of projects keeping "master". It may not be a big deal, but it will be fine, folks. We can relax about it. You may note I didn't invoke any social arguments. In my view, the worst immoral actions come from treating people like things (e.g. farm implements). It does not immediately follow that we should treat things like people. A git branch is an unfeeling, unthinking, soulless *thing* which doesn't have intrinsic value the way a person does, and has no human rights as it's not a human. For similar reasons I do not object to the term "robot" when applied to autonomous or semi-autonomous machinery. I might feel differently if this was important to people around me. I have not heard that. In fact, I find the argument made here very unsurprising: https://mooseyanon.medium.com/github-f-ck-your-name-change-de599033bbbe In short: don't make a silly, token symbolic change in lieu of real, functional changes that would actually help people. In particular: "We’re going to change the branch name to be more inclusive of minorities but we’re going to carry on selling software to ICE." "Yet at these same companies the majority of each grad scheme cohort tend to be from basically the same five colleges/universities. Are HBCUs one of these colleges??" I don't believe these specific criticisms apply to the LO project. I'm not aware of a way in which LO supports or enables the US policing apparatus. And I doubt someone with a degree from CMU or MIT would be treated much better than one with a degree from Morehouse. But, importantly, if there *was* a significant, functional change LO could make to be more inclusive and supportive of marginalized people, I think we could discuss it and it would be taken seriously. I'm not saying symbolism has no power at all. But symbols mean what people think they mean, and context matters. And a git master branch feel so far off the radar as to be near-innocuous. Compare that to a symbolic change that some people around me do care about and discuss in a serious tone: a bell monument on top of Stone Mountain. I can drive to Stone Mountain in less than an hour, so don't feel bad if you're less familiar. It's essentially The South's Mount Rushmore. The relief cut into the mountain depicts CSA officials (generals and the president). The history is part of the context. It was carved by white supremicists. The symbolism was important when the modern Klu Klux Klan was formed at a meeting there. The symbolism was important when Martin Luther King mentioned it in "I Have a Dream": "But not only that: Let freedom ring from Stone Mountain of Georgia." Today Stone Mountain and the surrounding area is owned by the state government of Georgia, and is a park many visit. One may hike to the top or take a cable car. And one can't hide from the symbolism while there. Adding a bell, as an intentional reference to MLK and his speech, to the top would actually mean something to people, in a way renaming LibreOffice's baseline branch never will. And so it should be viewed with a different level of importance. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: ANN: renaming of master branch to "main" for core repository and submodules (dictionaries, help, translations)
Hey Julien, julien2412 wrote: > Thorsten Behrens-6 wrote > > ... > > The reason is, that language evolves, and bad habits (or metaphors) of > > the past shouldn't be persisted, if we know they are offensive to > > others. > > Slavery itself shouldn't persist (badfully in some regions it still exists) > but let's not confound the slavery itself with some words used in different > contexts. > Well. I'm not sure it matters much what you or me read into that word. So is there any harm in making that change? Others are doing the work, why would we refuse a change that some feel strongly about? We're happily accepting changes that re-format code, translate, spell-check it etc - one could argue those are cosmetic too, and not worth it. I'm therefore much in favour of remaining to be welcoming to change, and positively accept patches from everyone (unless there's hard technical reasons to decline). All the best, -- Thorsten signature.asc Description: PGP signature ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: schema/libreoffice
schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit db5eec5ead50c7f9f53f446d3da16255d06ade56 Author: Miklos Vajna AuthorDate: Thu Mar 18 15:11:20 2021 +0100 Commit: Miklos Vajna CommitDate: Thu Mar 18 17:22:41 2021 +0100 tdf#91920 sw page gutter margin: link ODF proposal Change-Id: I13693057cc899e999dd145c7a29cac16ef1cb23c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112675 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng b/schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng index 89913cbf7e63..3898ed2f73ab 100644 --- a/schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng +++ b/schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng @@ -2303,7 +2303,7 @@ xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1. - + ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Re: ANN: renaming of master branch to "main" for core repository and submodules (dictionaries, help, translations)
Lubos Lunak-2 wrote > On Wednesday 17 of March 2021, Christian Lohmaier wrote: >> Hi *, >> >> as requested and announced in previous ESC-minutes and infra-call >> minutes, master branch will be renamed for the LibreOffice core >> repositories and the submodules used by LibreOffice (dictionaries, >> help, translations). > (...) > I disagree with the plan. I had told nothing until now thinking I would be the only person to have this opinion. After: 1) http://document-foundation-mail-archive.969070.n3.nabble.com/Tell-me-Easy-Hack-42782-quot-remove-a-dog-quot-is-a-joke-tt3587827.html#a3588273 (Easy Hack 42782 "remove a dog ! ") 2) https://cgit.freedesktop.org/libreoffice/core/commit/?id=493ae7a6bb0c3ad50615db0090e7ae8d391bc327 "replace usage of blacklist with denylist" and https://cgit.freedesktop.org/libreoffice/core/commit/?id=abb6c01519a0318d7165dc9dc5b7d185353f93d6 "replace usage of whitelist with allowlist" Now we must rename "master". Of course, it's not all 0 risk operation and the technical benefit is 0 + time consuming. (not as if we had lots of human resources on LO and had very few bugtrackers to tackle). Should we expect to replace other things like that? (eg "command" word which could be misinterpreted too) Even if it won't change anything and this migration will be done anyway because marketing and novlang dominate nowadays, THANK YOU A LOT for your message Luboš!!! Julien -- Sent from: http://document-foundation-mail-archive.969070.n3.nabble.com/Dev-f1639786.html ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: Unit Tests failing when built with clang 12
I just did a git pull and UITest_calc_tests9 is passing on master. I'm bisecting the fix now. -- Sent from: http://document-foundation-mail-archive.969070.n3.nabble.com/Dev-f1639786.html ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: ANN: renaming of master branch to "main" for core repository and submodules (dictionaries, help, translations)
On 18/03/2021 14:19, julien2412 wrote: > About "master" So - there are huge tracts that can be written about this from many perspectives; Dominus Illuminatio Mea =) The "thin end of the wedge" argument is an interesting one, clearly there is lots of scope for confrontation, division and aggression around this sort of thing and hurt feelings. But I think it is worth looking at this on its own merits. For my part I support the change - assuming some of the more telling objections Lubos pointed out - eg. around the default branch that is checked out when you 'git clone' can be solved elegantly. I thought: https://tools.ietf.org/html/draft-knodel-terminology-02 Had a mercifully bounded set of words to replace that doesn't look like it will grow indefinitely. > the expressions "MC"/"Master of Ceremony" in music, I do agree it is possible to carry this far too far. However its easy to see how things like the unthinking use of eg. 'blacklist' can be seen as bad - that seems like a slam-dunk to me. Having said all that - I think it's really important that people can have their say, and that people's differing views are respected - and fears of a possible terminological tyranny are laid to rest =) Also, that we treat each other gently. Probably we should discuss it at the next ESC - and encourage those who care about the topic to discuss it there rather than in some straggling list thread (which tends to polarize). Hopefully you would be able to come ? Regards, Michael. -- michael.me...@collabora.com <><, GM Collabora Productivity Hangout: mejme...@gmail.com, Skype: mmeeks (M) +44 7795 666 147 - timezone usually UK / Europe ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] help.git: AllLangHelp_shared.mk source/text
AllLangHelp_shared.mk |1 source/text/shared/explorer/database/dabawiz00.xhp |1 source/text/shared/explorer/database/dabawiz02ldap.xhp | 58 - 3 files changed, 60 deletions(-) New commits: commit 75d047408148b9c914b964017738d3b96b528017 Author: Olivier Hallot AuthorDate: Thu Mar 18 11:39:32 2021 -0300 Commit: Olivier Hallot CommitDate: Thu Mar 18 18:56:07 2021 +0100 tdf#140890 Remove LDAP data source for Base Change-Id: If937c8d2f5c7b294cd89ec8194552e42ebac6a4d Reviewed-on: https://gerrit.libreoffice.org/c/help/+/112691 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/AllLangHelp_shared.mk b/AllLangHelp_shared.mk index d72432549..d81d87cd5 100644 --- a/AllLangHelp_shared.mk +++ b/AllLangHelp_shared.mk @@ -890,7 +890,6 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,shared,\ helpcontent2/source/text/shared/explorer/database/dabawiz02ado \ helpcontent2/source/text/shared/explorer/database/dabawiz02dbase \ helpcontent2/source/text/shared/explorer/database/dabawiz02jdbc \ -helpcontent2/source/text/shared/explorer/database/dabawiz02ldap \ helpcontent2/source/text/shared/explorer/database/dabawiz02mysql \ helpcontent2/source/text/shared/explorer/database/dabawiz02odbc \ helpcontent2/source/text/shared/explorer/database/dabawiz02oracle \ diff --git a/source/text/shared/explorer/database/dabawiz00.xhp b/source/text/shared/explorer/database/dabawiz00.xhp index 396b18c62..26ab94f9d 100644 --- a/source/text/shared/explorer/database/dabawiz00.xhp +++ b/source/text/shared/explorer/database/dabawiz00.xhp @@ -61,7 +61,6 @@ Set up ADO connection -Set up LDAP connection Set up dBASE connection Set up JDBC connection Set up Oracle database connection diff --git a/source/text/shared/explorer/database/dabawiz02ldap.xhp b/source/text/shared/explorer/database/dabawiz02ldap.xhp deleted file mode 100644 index 4f54f20cf..0 --- a/source/text/shared/explorer/database/dabawiz02ldap.xhp +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - -LDAP Connection -/text/shared/explorer/database/dabawiz02ldap.xhp - - - -LDAP server; address books (Base) -address books; LDAP server (Base) -data sources; LDAP server (Base) -mw copied 3 entries from shared/explorer/database/1119.xhp -LDAP Connection - -Specifies the settings for importing a database using LDAP (Lightweight Directory Access Protocol). This page is only available if you registered an LDAP server as an address database.UFI: copied text from shared\explorer\database\1119 - - -Server URL -Enter the name of the LDAP server using the format "ldap.server.com". - - -Base DN -Enter the starting point to search the LDAP database, for example, "dc=com". - - -Port number -Enter the port of the LDAP server, normally 389. - -Use secure connection (SSL) -Creates a secure connection to the LDAP server through the Secure Sockets Layer (SSL). By default, an SSL connection uses port 636. A regular connection uses port 389. - -Authentication -Database Wizard - - - ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: helpcontent2
helpcontent2 |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 5d74ca4eb1a1cf3e4478c3f25c12052a06e62668 Author: Olivier Hallot AuthorDate: Thu Mar 18 14:56:07 2021 -0300 Commit: Gerrit Code Review CommitDate: Thu Mar 18 18:56:07 2021 +0100 Update git submodules * Update helpcontent2 from branch 'master' to 75d047408148b9c914b964017738d3b96b528017 - tdf#140890 Remove LDAP data source for Base Change-Id: If937c8d2f5c7b294cd89ec8194552e42ebac6a4d Reviewed-on: https://gerrit.libreoffice.org/c/help/+/112691 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/helpcontent2 b/helpcontent2 index d13e4f8c6d20..75d047408148 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit d13e4f8c6d202feafe4e8669fb4d6ad7b8d991b1 +Subproject commit 75d047408148b9c914b964017738d3b96b528017 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Re: ANN: renaming of master branch to "main" for core repository and submodules (dictionaries, help, translations)
Get woke go broke... No need to push some misguided agenda, and even less need to appeal to some collective guilt, after all slavery wasn't an universal practice. The only way to handle SJWs is to ignore them, after all if you give them an inch they'll take a mile. Be glad the situation is still somewhat bearable in the programming community, you really wouldn't want for it to get as bad as it is in the entertainment industry, the less you let them creep in, the better. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: ANN: renaming of master branch to "main" for core repository and submodules (dictionaries, help, translations)
Thorsten Behrens-6 wrote > ... > The reason is, that language evolves, and bad habits (or metaphors) of > the past shouldn't be persisted, if we know they are offensive to > others. Slavery itself shouldn't persist (badfully in some regions it still exists) but let's not confound the slavery itself with some words used in different contexts. About "master", the expressions "MC"/"Master of Ceremony" in music, "Master's_degree", "masterplan", "to master something", are bad habits too and should be renamed/rephrased? Should we also remove (burn?) lots of books and republish them after having processed global autocorrection? (I would even replace "autocorrection" by "censorship" here) If you'd ask every people on earch what they may consider offensive, you could remove lots of words. Do you also consider we should rename "abort" (because people against abortion could consider this term offensive) or "command" (because may be related to slavery too) (as already quoted in my previous comment)? Julien -- Sent from: http://document-foundation-mail-archive.969070.n3.nabble.com/Dev-f1639786.html ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: include/svx svx/source
include/svx/svdobj.hxx|3 +-- svx/source/svdraw/svdpage.cxx | 18 +- 2 files changed, 6 insertions(+), 15 deletions(-) New commits: commit 7385ce6ac788335f15744c104c2b4e095ce90ce8 Author: Noel Grandin AuthorDate: Thu Mar 18 16:24:49 2021 +0200 Commit: Noel Grandin CommitDate: Thu Mar 18 20:44:12 2021 +0100 elide SetParentAtSdrObjectFromSdrObjList the indirection just makes the code harder to follow Change-Id: I4046a822972d729ecfc9a9897bfdac146519dbd2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112678 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx index 88c00569ab67..38bdc98eea5d 100644 --- a/include/svx/svdobj.hxx +++ b/include/svx/svdobj.hxx @@ -261,6 +261,7 @@ class SVXCORE_DLLPUBLIC SdrObject : public SfxListener, public tools::WeakBase { private: friend classSdrObjListIter; +friend classSdrObjList; friend classSdrVirtObj; friend classSdrRectObj; @@ -306,8 +307,6 @@ public: SdrObject* getParentSdrObjectFromSdrObject() const; private: -// only allow SetParentAtSdrObjectFromSdrObjList to call setParentOfSdrObject -friend void SetParentAtSdrObjectFromSdrObjList(SdrObject& rSdrObject, SdrObjList* pNew); SVX_DLLPRIVATE void setParentOfSdrObject(SdrObjList* pNew); public: diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx index d07f40e4f701..c614928f2537 100644 --- a/svx/source/svdraw/svdpage.cxx +++ b/svx/source/svdraw/svdpage.cxx @@ -60,14 +60,6 @@ using namespace ::com::sun::star; const sal_Int32 InitialObjectContainerCapacity (64); - -// helper to allow changing parent at SdrObject, but only from SdrObjList - -void SetParentAtSdrObjectFromSdrObjList(SdrObject& rSdrObject, SdrObjList* pNew) -{ -rSdrObject.setParentOfSdrObject(pNew); -} - // SdrObjList::SdrObjList() @@ -305,7 +297,7 @@ void SdrObjList::NbcInsertObject(SdrObject* pObj, size_t nPos) if (nPosSetOrdNum(nPos); -SetParentAtSdrObjectFromSdrObjList(*pObj, this); +pObj->setParentOfSdrObject(this); // Inform the parent about change to allow invalidations at // evtl. existing parent visualisations @@ -404,7 +396,7 @@ SdrObject* SdrObjList::NbcRemoveObject(size_t nObjNum) // tdf#121022 Do first remove from SdrObjList - InsertedStateChange // relies now on IsInserted which uses getParentSdrObjListFromSdrObject -SetParentAtSdrObjectFromSdrObjList(*pObj, nullptr); +pObj->setParentOfSdrObject(nullptr); // calls UserCall, among other pObj->InsertedStateChange(); @@ -451,7 +443,7 @@ SdrObject* SdrObjList::RemoveObject(size_t nObjNum) // tdf#121022 Do first remove from SdrObjList - InsertedStateChange // relies now on IsInserted which uses getParentSdrObjListFromSdrObject -SetParentAtSdrObjectFromSdrObjList(*pObj, nullptr); +pObj->setParentOfSdrObject(nullptr); // calls, among other things, the UserCall pObj->InsertedStateChange(); @@ -503,7 +495,7 @@ SdrObject* SdrObjList::ReplaceObject(SdrObject* pNewObj, size_t nObjNum) } // Change parent and replace in SdrObjList -SetParentAtSdrObjectFromSdrObjList(*pObj, nullptr); +pObj->setParentOfSdrObject(nullptr); ReplaceObjectInContainer(*pNewObj,nObjNum); // tdf#121022 InsertedStateChange uses the parent @@ -519,7 +511,7 @@ SdrObject* SdrObjList::ReplaceObject(SdrObject* pNewObj, size_t nObjNum) // Setup data at new SdrObject - it already *is* inserted to // the SdrObjList due to 'ReplaceObjectInContainer' above pNewObj->SetOrdNum(nObjNum); -SetParentAtSdrObjectFromSdrObjList(*pNewObj, this); +pNewObj->setParentOfSdrObject(this); // Inform the parent about change to allow invalidations at // evtl. existing parent visualisations, but also react on ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: include/sfx2 sfx2/source
include/sfx2/shell.hxx |5 - sfx2/source/control/bindings.cxx |4 ++-- sfx2/source/control/dispatch.cxx |4 ++-- sfx2/source/control/shell.cxx|6 +++--- 4 files changed, 7 insertions(+), 12 deletions(-) New commits: commit 6e4238018bf0408f2961e5708212e09a8c3597dc Author: Noel AuthorDate: Thu Mar 18 11:06:57 2021 +0200 Commit: Noel Grandin CommitDate: Thu Mar 18 20:49:26 2021 +0100 inline some tiny sfx2 functions Change-Id: I960d479d18bdd29fc14dd39649330d05fcdc0010 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112664 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/include/sfx2/shell.hxx b/include/sfx2/shell.hxx index 60de3579e8d3..3266c989a7d4 100644 --- a/include/sfx2/shell.hxx +++ b/include/sfx2/shell.hxx @@ -193,11 +193,6 @@ public: */ SfxViewShell* GetViewShell() const; -voidCallExec( SfxExecFunc pFunc, SfxRequest &rReq ) -{ (*pFunc)(this, rReq); } -voidCallState( SfxStateFunc pFunc, SfxItemSet &rSet ) -{ (*pFunc)(this, rSet); } - static void EmptyExecStub(SfxShell *pShell, SfxRequest &); static void EmptyStateStub(SfxShell *pShell, SfxItemSet &); diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx index 6ac0bb9c59cc..aa565d9c4a96 100644 --- a/sfx2/source/control/bindings.cxx +++ b/sfx2/source/control/bindings.cxx @@ -988,8 +988,8 @@ void SfxBindings::Execute_Impl( SfxRequest& aReq, const SfxSlot* pSlot, SfxShell // The value is attached to a toggleable attribute (Bools) sal_uInt16 nWhich = pSlot->GetWhich(rPool); SfxItemSet aSet(rPool, {{nWhich, nWhich}}); -SfxStateFunc aFunc = pSlot->GetStateFnc(); -pShell->CallState( aFunc, aSet ); +SfxStateFunc pFunc = pSlot->GetStateFnc(); +(*pFunc)(pShell, aSet); const SfxPoolItem *pOldItem; SfxItemState eState = aSet.GetItemState(nWhich, true, &pOldItem); if ( eState == SfxItemState::DISABLED ) diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index 9939b01f0b90..613b8cf0f7b7 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -250,7 +250,7 @@ void SfxDispatcher::Call_Impl(SfxShell& rShell, const SfxSlot &rSlot, SfxRequest xImp->pInCallAliveFlag = &bThisDispatcherAlive; SfxExecFunc pFunc = rSlot.GetExecFnc(); -rShell.CallExec( pFunc, rReq ); +(*pFunc)(&rShell, rReq); // If 'this' is still alive if ( bThisDispatcherAlive ) @@ -1655,7 +1655,7 @@ bool SfxDispatcher::FillState_(const SfxSlotServer& rSvr, SfxItemSet& rState, else pFunc = pSlot->GetStateFnc(); -pSh->CallState( pFunc, rState ); +(*pFunc)(pSh, rState); #ifdef DBG_UTIL // To examine the conformity of IDL (SlotMap) and current Items if ( rState.Count() ) diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx index 353dde1a8d07..795f25f708aa 100644 --- a/sfx2/source/control/shell.cxx +++ b/sfx2/source/control/shell.cxx @@ -381,7 +381,7 @@ bool SfxShell::CanExecuteSlot_Impl( const SfxSlot &rSlot ) const sal_uInt16 nId = rSlot.GetWhich( rPool ); SfxItemSet aSet(rPool, {{nId, nId}}); SfxStateFunc pFunc = rSlot.GetStateFnc(); -CallState( pFunc, aSet ); +(*pFunc)( this, aSet ); return aSet.GetItemState(nId) != SfxItemState::DISABLED; } @@ -437,7 +437,7 @@ const SfxPoolItem* SfxShell::ExecuteSlot SfxExecFunc pFunc = pSlot->GetExecFnc(); if ( pFunc ) -CallExec( pFunc, rReq ); +(*pFunc)( this, rReq ); return rReq.GetReturnValue(); } @@ -472,7 +472,7 @@ const SfxPoolItem* SfxShell::GetSlotState // Call Status method SfxStateFunc pFunc = pSlot->GetStateFnc(); if ( pFunc ) -CallState( pFunc, aSet ); +(*pFunc)( this, aSet ); eState = aSet.GetItemState( nSlotId, true, &pItem ); // get default Item if possible ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Alternative master/main branch proposal (Re: ANN: renaming of master branch to "main" for core repository and submodules (dictionaries, help, translations))
Hello, in order to make the discussion somewhat more constructive, I have an alternative proposal on how to resolve the problem. Some pre-requisities: - There are currently no technical gains to be made from the change. There are some costs to doing the change, but they are not blocking. - We appear to be poorly equiped to evaluate the problem properly. Most of us are not even native English speakers, and most of us aren't directly affected by the problem (or presumably even know somebody who is). I can count only one direct input from somebody directly affected, while the rest of us have at best second-hand information (unless I'm missing something). - The problem appears to be complicated and, as of now, without general consensus. The proposal to rename our master mentions [1] that actually only discusses 'master/slave' and not 'master' alone, and [2] that says GitHub makes the default configurable and changes it to 'main'. The GitHub page further links a 9-months-old statement from the git project that said they had made the default configurable and were discussing further changes. As of now, the git project still uses master as the default and also for their own use. There are some projects that have meanwhile switched, and some that have not. - It appears that no matter what we do, we cannot avoid somebody getting offended. If we don't do the change, we risk offending people, if we do the change, we also risk offending people (see e.g. [3]). - [3] also casts doubt on whether the change actually really achieves anything or how big the demand for the change actually is, especially from people that it actually concerns. - We are not in any special position here, we are just one of the many projects using git. Therefore there does not appear to be any need to act on our own. Presumably the issue gets discussed also elsewhere, and discussing it here adds little to no value to it. - The git project is the source of the git tool, and appears to be a suitable place to discuss and set the trend here. Therefore, I propose that the decision to rename the master branch is postponed for as long as the git project does not take a definitive stance on it. That stance may take the form of e.g. the git project making a statement on it or changing their default and using it. Our decision can be then based on this input and may e.g. take the form of simply taking the technical decision to do what git does. [1] https://tools.ietf.org/html/draft-knodel-terminology-02 [2] https://github.com/github/renaming [3] https://mooseyanon.medium.com/github-f-ck-your-name-change-de599033bbbe -- Luboš Luňák ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: ANN: renaming of master branch to "main" for core repository and submodules (dictionaries, help, translations)
Thorsten Behrens-6 wrote > ... > Well. I'm not sure it matters much what you or me read into that word. > > So is there any harm in making that change? Others are doing the work, > why would we refuse a change that some feel strongly about? > > We're happily accepting changes that re-format code, translate, > spell-check it etc - one could argue those are cosmetic too, and not > worth it. > > I'm therefore much in favour of remaining to be welcoming to change, > and positively accept patches from everyone (unless there's hard > technical reasons to decline). Reformating code allows to have homogeneous code and allows to read it more easily. Spellcheck is just about trying to respect languages, if not we could also begin to write like in SMS and it may quickly difficult for non native English speaker to understand it. (I know that sometimes we must decide between US and English spell and it's not that important if everybody understands the meaning of the word). I'm strongly against this change because it's not just cosmetic, it's imposing a point of view (Yes I'm doing the same but it's a debate so of course there are at least 2 points of view), it's kind of new puritanism for me. Until some months ago, nobody found it wrong to call a "branch master", now we must remove it just for some people who may consider this offending. Are there really some stats about this? Would these people feel really bad about seeing "master" branch? Do I really offend some people when in bugtrackers I put: "On pc Debian x86-64 with master sources updated today, " ? Technical reason to decline: a non 0 technical risk for a real 0 technical benefit Again, do you want to rename "Abort", "Command"? Cars (even eletric ones) generate pollution, would you be agree to remove any reference to the word "cars" in LO? (I didn't check if there was, it's just for the example). Are they bad habits and so you would consider a good evolution to replace them too? Julien -- Sent from: http://document-foundation-mail-archive.969070.n3.nabble.com/Dev-f1639786.html ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: ANN: renaming of master branch to "main" for core repository and submodules (dictionaries, help, translations)
Michael Meeks-5 wrote > ... > Hopefully you would be able to come ? No need to come since it's easier for me to write (no schedule constraints for example) and the migration will be done anyway, no need to worry. Moreover, even if there was a vote I suppose there'll be a large majority who'll agree with it. Remark: I wouldn't be able to vote anyway since I'm not a TDF member and still would't like to because of these kinds of decisions. My goal was just to thank a lot Luboš and to provide arguments against the migration. Nevertheless, I already knew the battle, battle against this censorship (I weigh my words) was lost. Regards, Julien -- Sent from: http://document-foundation-mail-archive.969070.n3.nabble.com/Dev-f1639786.html ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: ANN: renaming of master branch to "main" for core repository and submodules (dictionaries, help, translations)
TLDR: - There does not appear to be a consensus on the usage of the default brach name, at least as of now. - I find the claim that all use of the word master is bad to be poorly argued. - This mostly appears to be an ongoing internal problem of one country. As a technical project we should not be taking sides in such politics, especially given that the problem does not appear to be resolved or even having a consensus. On Thursday 18 of March 2021, Thorsten Behrens wrote: > Lubos Lunak wrote: > > I disagree with the plan. Git uses master, so we should stick with > > that. > > Hmm. But someone else using outdated names shouldn't per se be a reason > for us? Also it appears things are moving there, too. - The name is not, at least as of now, outdated. As I've already said, the current name is 'master' and I don't see why GitHub or even LLVM should be authorities on that. - Not changing a default in 9 months is not appearing to be moving. I guess that could have been already done if things were simple? I find it a valid technical reason not to do so if they themselves do not do it. - If somebody else (not) doing something shouldn't be a reason for us, then why is it listed as a reason for us to do the change? - There appear to be many other projects that are, at least as of now, not moving. It doesn't look to me that there's a consensus on this. > > And that brings me to the non-technical part of this, because I > > really don't see the reason for this. > > The reason is, that language evolves, and bad habits (or metaphors) of > the past shouldn't be persisted, if we know they are offensive to > others. https://www.merriam-webster.com/dictionary/master lists ~20 meanings for the word, and there's only one of them marked outdated, and 5b, which is the one git uses, is not marked as bad, archaic, offensive, or anything like that. Similarly, I can find e.g. pages about getting Master's Degree in 2021 and various other uses of the other meanings for the word, which from here looks like it's fine to use them. On the other hand, the meaning related to slavery seems like a meaning that's obsolete. Now I'm not a native speaker and I don't live in an English-speaking country, so I may be getting something wrong, but then neither do you, so how come you should know this better? (FWIW, I find it offensive to get lectured on English by a German. Just saying. I consider getting occassionally, and often probably unintentionally, getting offended to be simply life.) > Generally, our approach in the community should be - if it doesn't > harm us [1], we should be considerate & welcoming. Then maybe we should consider the possibility that forcing one interpretation and not welcoming any other is not very considerate or welcoming. > The feedback towards using master/slave (and other > established-but-fraught-terms) was that it indeed is taken as offensive for > some people. This is not about master/slave. This is about master (copy of a) branch, which has nothing to do with slavery, and you have provided very poor reasoning for changing anything there, and there's no apparent consensus on any of your claims. If I'm reading the ESC proposal correctly, this is basically a proposal from Germans living in Germany to take a side in cultural/political/language problem of another country. Which just doesn't make sense. If they sort it out, fine (I guess that may take a while, given that from afar it looks that the US currently can't agree on anything right now). But I don't see a good reason why we should take a part in that now. -- Lubos Lunak ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: ANN: renaming of master branch to "main" for core repository and submodules (dictionaries, help, translations)
Am 18.03.21 um 15:55 schrieb Tor Lillqvist: For what it's worth (i.e., not much), I am completely in favour of the renaming. --tml Me, too. Antje ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: Branch 'private/tvajngerl/staging' - 9 commits - basegfx/CppunitTest_basegfx.mk basegfx/test cui/source cui/uiconfig include/basegfx include/sfx2 include/vcl officecfg/
Rebased ref, commits from common ancestor: commit 201bdfdd15200299d49e1129db8cacf069bbb2fe Author: Tomaž Vajngerl AuthorDate: Thu Mar 18 15:59:20 2021 +0900 Commit: Tomaž Vajngerl CommitDate: Fri Mar 19 10:20:00 2021 +0900 vcl: bring back RGB565 scanline transformer While we don't support this as a Bitmap format anymore, we still need to transform a buffer that is in RGB565 format in some cases. For example backwards compatibility or if a certain bitmap format supports such pixel format. This change also simplifies some scanline transformers by removing code duplication. Change-Id: I64aa258b8b1fbebf0ed174c0d5fdd2f75f382b28 diff --git a/vcl/inc/bitmap/ScanlineTools.hxx b/vcl/inc/bitmap/ScanlineTools.hxx index 98e702549f2b..fcb243e72014 100644 --- a/vcl/inc/bitmap/ScanlineTools.hxx +++ b/vcl/inc/bitmap/ScanlineTools.hxx @@ -16,7 +16,7 @@ namespace vcl::bitmap { -class ScanlineTransformer +class IScanlineTransformer { public: virtual void startLine(sal_uInt8* pLine) = 0; @@ -24,127 +24,163 @@ public: virtual Color readPixel() = 0; virtual void writePixel(Color nColor) = 0; -virtual ~ScanlineTransformer() = default; +virtual ~IScanlineTransformer() = default; }; -class ScanlineTransformer_ARGB final : public ScanlineTransformer +class ScanlineTransformer_RGB565 : public IScanlineTransformer { -private: -sal_uInt8* pData; +protected: +sal_uInt16* mpData; public: -virtual void startLine(sal_uInt8* pLine) override { pData = pLine; } +void startLine(sal_uInt8* pLine) override { mpData = reinterpret_cast(pLine); } -virtual void skipPixel(sal_uInt32 nPixel) override { pData += nPixel << 2; } +void skipPixel(sal_uInt32 nPixel) override { mpData += nPixel; } -virtual Color readPixel() override +Color readPixel() override { -const Color aColor(ColorTransparency, pData[4], pData[1], pData[2], pData[3]); -pData += 4; -return aColor; +sal_uInt8 R = sal_uInt8((*mpData & 0xf800) >> 8); +sal_uInt8 G = sal_uInt8((*mpData & 0x07e0) >> 3); +sal_uInt8 B = sal_uInt8((*mpData & 0x001f) << 3); +mpData++; +return Color(R, G, B); } -virtual void writePixel(Color nColor) override +void writePixel(Color nColor) override { -*pData++ = nColor.GetAlpha(); -*pData++ = nColor.GetRed(); -*pData++ = nColor.GetGreen(); -*pData++ = nColor.GetBlue(); +sal_uInt16 R = (nColor.GetRed() & 0xf8) << 8; +sal_uInt16 G = (nColor.GetGreen() & 0xfc) << 3; +sal_uInt16 B = (nColor.GetBlue() & 0xf8) >> 3; + +*mpData++ = R | G | B; } }; -class ScanlineTransformer_BGR final : public ScanlineTransformer +class ScanlineTransformerBase : public IScanlineTransformer { -private: -sal_uInt8* pData; +protected: +sal_uInt8* mpData; public: -virtual void startLine(sal_uInt8* pLine) override { pData = pLine; } +ScanlineTransformerBase() +: mpData(nullptr) +{ +} -virtual void skipPixel(sal_uInt32 nPixel) override { pData += (nPixel << 1) + nPixel; } +void startLine(sal_uInt8* pLine) override { mpData = pLine; } +}; -virtual Color readPixel() override +class ScanlineTransformer_ARGB final : public ScanlineTransformerBase +{ +public: +void skipPixel(sal_uInt32 nPixel) override { mpData += nPixel << 2; } + +Color readPixel() override { -const Color aColor(pData[2], pData[1], pData[0]); -pData += 3; +const Color aColor(ColorTransparency, mpData[4], mpData[1], mpData[2], mpData[3]); +mpData += 4; return aColor; } -virtual void writePixel(Color nColor) override +void writePixel(Color nColor) override { -*pData++ = nColor.GetBlue(); -*pData++ = nColor.GetGreen(); -*pData++ = nColor.GetRed(); +*mpData++ = nColor.GetAlpha(); +*mpData++ = nColor.GetRed(); +*mpData++ = nColor.GetGreen(); +*mpData++ = nColor.GetBlue(); } }; -class ScanlineTransformer_8BitPalette final : public ScanlineTransformer +class ScanlineTransformer_BGR final : public ScanlineTransformerBase { -private: -sal_uInt8* pData; +public: +void skipPixel(sal_uInt32 nPixel) override { mpData += (nPixel << 1) + nPixel; } + +Color readPixel() override +{ +const Color aColor(mpData[2], mpData[1], mpData[0]); +mpData += 3; +return aColor; +} + +void writePixel(Color nColor) override +{ +*mpData++ = nColor.GetBlue(); +*mpData++ = nColor.GetGreen(); +*mpData++ = nColor.GetRed(); +} +}; + +class ScanlineTransformerPaletteBase : public ScanlineTransformerBase +{ +protected: const BitmapPalette& mrPalette; public: -explicit ScanlineTransformer_8BitPalette(const BitmapPalette& rPalette) -: pData(nullptr) +ScanlineTransformerPaletteBase(const BitmapPa
[Libreoffice-commits] core.git: lingucomponent/source
lingucomponent/source/spellcheck/macosxspell/macspellimp.mm | 25 1 file changed, 25 insertions(+) New commits: commit 370984c385dbc52c8ee7e6e71f4c0cc085fee422 Author: Tor Lillqvist AuthorDate: Thu Mar 18 13:45:18 2021 +0200 Commit: Tor Lillqvist CommitDate: Fri Mar 19 06:31:54 2021 +0100 Use the iOS fr_FR and it_IT dictionaries for other relevant countries, too Fixes https://github.com/CollaboraOnline/online/issues/1463 Change-Id: I9fffd4bc9499aee2098258f5c3a9181330b339a1 Signed-off-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112670 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112690 diff --git a/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm b/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm index a919015f8ca5..874f14bc0f19 100644 --- a/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm +++ b/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm @@ -197,11 +197,36 @@ Sequence< Locale > SAL_CALL MacSpellChecker::getLocales() postspdict.push_back( pLangStr ); } } +#ifdef IOS +else if ([pLangStr isEqualToString:@"fr_FR"]) +{ +const std::vector aFR +{ @"BE", @"BF", @"BJ", @"CA", @"CH", @"CI", @"FR", @"LU", @"MC", @"ML", + @"MU", @"NE", @"SN", @"TG" }; +for (auto c: aFR) +{ +pLangStr = [@"fr_" stringByAppendingString: c]; +postspdict.push_back( pLangStr ); +} +} +#endif else if ([pLangStr isEqualToString:@"it"]) { postspdict.push_back( @"it_CH" ); postspdict.push_back( @"it_IT" ); } +#ifdef IOS +else if ([pLangStr isEqualToString:@"it_IT"]) +{ +const std::vector aIT +{ @"CH", @"IT" }; +for (auto c: aIT) +{ +pLangStr = [@"it_" stringByAppendingString: c]; +postspdict.push_back( pLangStr ); +} +} +#endif else if ([pLangStr isEqualToString:@"ko"]) { postspdict.push_back( @"ko_KR" ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Re: Alternative master/main branch proposal (Re: ANN: renaming of master branch to "main" for core repository and submodules (dictionaries, help, translations))
On 18/03/2021 21.04, Luboš Luňák wrote: - We are not in any special position here, we are just one of the many projects using git. Therefore there does not appear to be any need to act on our own. Presumably the issue gets discussed also elsewhere, and discussing it here adds little to no value to it. - The git project is the source of the git tool, and appears to be a suitable place to discuss and set the trend here. Therefore, I propose that the decision to rename the master branch is postponed for as long as the git project does not take a definitive stance on it. That stance may take the form of e.g. the git project making a statement on it or changing their default and using it. Our decision can be then based on this input and may e.g. take the form of simply taking the technical decision to do what git does. +1 I don't have any hard feelings either way, but following upstream git sounds like a reasonable plan to me, in particular given this matter turned out to be so controversial. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java | 11 ++ android/source/src/java/org/libreoffice/ToolbarController.java |4 ++- 2 files changed, 10 insertions(+), 5 deletions(-) New commits: commit 878cbe229fdb61501bf7889408a19fca14d1afdd Author: Michael Weghorn AuthorDate: Thu Mar 18 14:36:33 2021 +0100 Commit: Michael Weghorn CommitDate: Fri Mar 19 07:35:09 2021 +0100 android: Don't show message for readonly files in non-experimental mode Since editing is disabled in Android Viewer for non-experimental mode anyway, there's no need to tell the user it's not possible to edit a specific document if it's readonly. Replace the 'usesTemporaryFile' method with a more explicit 'isReadOnlyMode' method since ToolbarController shouldn't have to worry about implementation details like whether temporary files are used and the new method will be reused in other places in a follow-up commit as well. Change-Id: Iaccf5b40bd19887b9e76b982ce7252368871c716 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112692 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java index a9a192099008..b640fa404973 100644 --- a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java +++ b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java @@ -75,6 +75,7 @@ public class LibreOfficeMainActivity extends AppCompatActivity implements Settin private static boolean mIsExperimentalMode; private static boolean mIsDeveloperMode; +private static boolean mbISReadOnlyMode; private int providerId; private URI documentUri; @@ -120,10 +121,6 @@ public class LibreOfficeMainActivity extends AppCompatActivity implements Settin return mIsDeveloperMode; } -public boolean usesTemporaryFile() { -return mTempFile != null; -} - private boolean isKeyboardOpen = false; private boolean isFormattingToolbarOpen = false; private boolean isSearchToolbarOpen = false; @@ -189,10 +186,12 @@ public class LibreOfficeMainActivity extends AppCompatActivity implements Settin loadNewDocument(newFilePath, newDocumentType); } +mbISReadOnlyMode = !isExperimentalMode(); if (getIntent().getData() != null) { if (getIntent().getData().getScheme().equals(ContentResolver.SCHEME_CONTENT)) { if (copyFileToTemp() && mTempFile != null) { mInputFile = mTempFile; +mbISReadOnlyMode = true; Log.d(LOGTAG, "SCHEME_CONTENT: getPath(): " + getIntent().getData().getPath()); String displayName = extractDisplayNameFromIntent(); @@ -882,6 +881,10 @@ public class LibreOfficeMainActivity extends AppCompatActivity implements Settin return mIsSpreadsheet; } +public static boolean isReadOnlyMode() { +return mbISReadOnlyMode; +} + public static void setDocumentChanged (boolean changed) { isDocumentChanged = changed; } diff --git a/android/source/src/java/org/libreoffice/ToolbarController.java b/android/source/src/java/org/libreoffice/ToolbarController.java index d21396cf4615..76c67a06375f 100644 --- a/android/source/src/java/org/libreoffice/ToolbarController.java +++ b/android/source/src/java/org/libreoffice/ToolbarController.java @@ -246,7 +246,9 @@ public class ToolbarController implements Toolbar.OnMenuItemClickListener { } void setupToolbars() { -if (mContext.usesTemporaryFile()) { +// show message in case experimental mode is enabled (i.e. editing is supported in general), +// but current document is readonly +if (LibreOfficeMainActivity.isExperimentalMode() && LibreOfficeMainActivity.isReadOnlyMode()) { disableMenuItem(R.id.action_save, true); Toast.makeText(mContext, mContext.getString(R.string.temp_file_saving_disabled), Toast.LENGTH_LONG).show(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: android/source
android/source/src/java/org/libreoffice/LOKitShell.java |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit bf6efbb808929bfba42f88c894be93d1aa6f4210 Author: Michael Weghorn AuthorDate: Thu Mar 18 15:57:40 2021 +0100 Commit: Michael Weghorn CommitDate: Fri Mar 19 07:35:35 2021 +0100 android: Don't allow editing for read-only docs Previously when experimental mode was enabled in Android Viewer, a "This file is read-only, saving is disabled." info was shown to the user when opening a file read-only, e.g. when the file was passed from a third-party app. However, editing the document was still possible, a dialog asking whether or not to save the modified doc was shown when existing and only then saving would fail. Disable editing completely for this case, rather than having the user lose changes in the end. Change-Id: Ie523971949d11909223aeac4f99023ecf28cb56c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112693 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/src/java/org/libreoffice/LOKitShell.java b/android/source/src/java/org/libreoffice/LOKitShell.java index c69e02669619..46ca256c7993 100644 --- a/android/source/src/java/org/libreoffice/LOKitShell.java +++ b/android/source/src/java/org/libreoffice/LOKitShell.java @@ -61,7 +61,7 @@ public class LOKitShell { } public static boolean isEditingEnabled() { -return LibreOfficeMainActivity.isExperimentalMode(); +return !LibreOfficeMainActivity.isReadOnlyMode(); } // EVENTS ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sax/source vcl/README.lifecycle vcl/source
sax/source/fastparser/fastparser.cxx |2 +- vcl/README.lifecycle |2 +- vcl/source/filter/jpeg/transupp.c|2 +- 3 files changed, 3 insertions(+), 3 deletions(-) New commits: commit 4550b35781c6d9407da29f64f9b02b9201bf953b Author: Andrea Gelmini AuthorDate: Thu Mar 18 17:15:58 2021 +0100 Commit: Andrea Gelmini CommitDate: Fri Mar 19 07:53:41 2021 +0100 Fix typo Change-Id: Icc75dc0f0d7434233b83fb72aadb4832ea47493e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112694 Reviewed-by: Julien Nabet Tested-by: Jenkins diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx index f35e56e8ab7f..8cec8284abce 100644 --- a/sax/source/fastparser/fastparser.cxx +++ b/sax/source/fastparser/fastparser.cxx @@ -467,7 +467,7 @@ void Entity::startElement( Event const *pEvent ) if( xContext.is() ) xContext->startFastElement( nElementToken, xAttr ); } -// swap the reference we own in to avoid referencing thrash. +// swap the reference we own in to avoid referencing trash. maContextStack.top().mxContext = std::move( xContext ); } catch (...) diff --git a/vcl/README.lifecycle b/vcl/README.lifecycle index a309b65ef9ea..0c44fb6a14d8 100644 --- a/vcl/README.lifecycle +++ b/vcl/README.lifecycle @@ -42,7 +42,7 @@ to lingering pointers to freed objects. To fix this situation we now have a VclPtr - which is a smart reference-counting pointer (include/vcl/vclptr.hxx) which is designed to look and behave -very- much like a normal pointer - to reduce code-thrash. VclPtr is used to wrap all OutputDevice + to reduce code-trash. VclPtr is used to wrap all OutputDevice derived classes thus: VclPtr pDialog( new Dialog( ... ), SAL_NO_ACQUIRE ); diff --git a/vcl/source/filter/jpeg/transupp.c b/vcl/source/filter/jpeg/transupp.c index d26cb9510009..318b28d790c1 100644 --- a/vcl/source/filter/jpeg/transupp.c +++ b/vcl/source/filter/jpeg/transupp.c @@ -60,7 +60,7 @@ jdiv_round_up (long a, long b) * arrays are always written in normal scan order (top to bottom) because * the virtual array manager expects this. The source arrays will be scanned * in the corresponding order, which means multiple passes through the source - * arrays for most of the transforms. That could result in much thrashing + * arrays for most of the transforms. That could result in much trashing * if the image is larger than main memory. * * If cropping or trimming is involved, the destination arrays may be smaller ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-7-1+backports' - 2 commits - android/source
android/source/src/java/org/libreoffice/LOKitShell.java |2 - android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java | 11 ++ android/source/src/java/org/libreoffice/ToolbarController.java |4 ++- 3 files changed, 11 insertions(+), 6 deletions(-) New commits: commit 4dc452895e1814c070778d07bdb5193a8acf3aeb Author: Michael Weghorn AuthorDate: Thu Mar 18 15:57:40 2021 +0100 Commit: Michael Weghorn CommitDate: Fri Mar 19 07:54:22 2021 +0100 android: Don't allow editing for read-only docs Previously when experimental mode was enabled in Android Viewer, a "This file is read-only, saving is disabled." info was shown to the user when opening a file read-only, e.g. when the file was passed from a third-party app. However, editing the document was still possible, a dialog asking whether or not to save the modified doc was shown when existing and only then saving would fail. Disable editing completely for this case, rather than having the user lose changes in the end. Change-Id: Ie523971949d11909223aeac4f99023ecf28cb56c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112693 Tested-by: Jenkins Reviewed-by: Michael Weghorn (cherry picked from commit bf6efbb808929bfba42f88c894be93d1aa6f4210) diff --git a/android/source/src/java/org/libreoffice/LOKitShell.java b/android/source/src/java/org/libreoffice/LOKitShell.java index c69e02669619..46ca256c7993 100644 --- a/android/source/src/java/org/libreoffice/LOKitShell.java +++ b/android/source/src/java/org/libreoffice/LOKitShell.java @@ -61,7 +61,7 @@ public class LOKitShell { } public static boolean isEditingEnabled() { -return LibreOfficeMainActivity.isExperimentalMode(); +return !LibreOfficeMainActivity.isReadOnlyMode(); } // EVENTS commit 5fa9abfc4bfeb8f100db583289ea40d3fa4e82e0 Author: Michael Weghorn AuthorDate: Thu Mar 18 14:36:33 2021 +0100 Commit: Michael Weghorn CommitDate: Fri Mar 19 07:54:15 2021 +0100 android: Don't show message for readonly files in non-experimental mode Since editing is disabled in Android Viewer for non-experimental mode anyway, there's no need to tell the user it's not possible to edit a specific document if it's readonly. Replace the 'usesTemporaryFile' method with a more explicit 'isReadOnlyMode' method since ToolbarController shouldn't have to worry about implementation details like whether temporary files are used and the new method will be reused in other places in a follow-up commit as well. Change-Id: Iaccf5b40bd19887b9e76b982ce7252368871c716 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112692 Tested-by: Jenkins Reviewed-by: Michael Weghorn (cherry picked from commit 878cbe229fdb61501bf7889408a19fca14d1afdd) diff --git a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java index a9a192099008..b640fa404973 100644 --- a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java +++ b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java @@ -75,6 +75,7 @@ public class LibreOfficeMainActivity extends AppCompatActivity implements Settin private static boolean mIsExperimentalMode; private static boolean mIsDeveloperMode; +private static boolean mbISReadOnlyMode; private int providerId; private URI documentUri; @@ -120,10 +121,6 @@ public class LibreOfficeMainActivity extends AppCompatActivity implements Settin return mIsDeveloperMode; } -public boolean usesTemporaryFile() { -return mTempFile != null; -} - private boolean isKeyboardOpen = false; private boolean isFormattingToolbarOpen = false; private boolean isSearchToolbarOpen = false; @@ -189,10 +186,12 @@ public class LibreOfficeMainActivity extends AppCompatActivity implements Settin loadNewDocument(newFilePath, newDocumentType); } +mbISReadOnlyMode = !isExperimentalMode(); if (getIntent().getData() != null) { if (getIntent().getData().getScheme().equals(ContentResolver.SCHEME_CONTENT)) { if (copyFileToTemp() && mTempFile != null) { mInputFile = mTempFile; +mbISReadOnlyMode = true; Log.d(LOGTAG, "SCHEME_CONTENT: getPath(): " + getIntent().getData().getPath()); String displayName = extractDisplayNameFromIntent(); @@ -882,6 +881,10 @@ public class LibreOfficeMainActivity extends AppCompatActivity implements Settin return mIsSpreadsheet; } +public static boolean isReadOnlyMode() { +return mbISReadOnlyMode; +} + public static void setDocumentChanged (boolean changed) { isDocumentChanged = changed; } diff --git a/android/so