[Libreoffice-commits] core.git: starmath/inc starmath/source
starmath/inc/ElementsDockingWindow.hxx|7 +-- starmath/inc/caret.hxx|5 - starmath/inc/cfgitem.hxx |3 --- starmath/inc/cursor.hxx |5 - starmath/inc/dialog.hxx |1 - starmath/inc/document.hxx |5 - starmath/inc/edit.hxx |1 - starmath/inc/mathml/mathmlimport.hxx |1 - starmath/inc/node.hxx |6 -- starmath/inc/parsebase.hxx|4 starmath/inc/smmod.hxx|2 -- starmath/inc/token.hxx| 12 ++-- starmath/inc/unomodel.hxx |2 -- starmath/inc/view.hxx |4 starmath/inc/visitors.hxx |2 -- starmath/source/ElementsDockingWindow.cxx |2 -- starmath/source/accessibility.cxx |5 - starmath/source/accessibility.hxx |1 - starmath/source/cfgitem.cxx |4 starmath/source/cursor.cxx|2 -- starmath/source/dialog.cxx|2 -- starmath/source/document.cxx |1 - starmath/source/edit.cxx |1 - starmath/source/mathml/mathmlexport.cxx |1 - starmath/source/mathml/mathmlimport.cxx |2 -- starmath/source/mathtype.cxx |5 + starmath/source/mathtype.hxx |8 +--- starmath/source/node.cxx | 14 -- starmath/source/ooxmlexport.cxx |1 - starmath/source/parse5.cxx|5 - starmath/source/rect.cxx |2 -- starmath/source/rtfexport.cxx |2 -- starmath/source/symbol.cxx|2 -- starmath/source/uiobject.hxx |2 -- starmath/source/unofilter.cxx |2 -- starmath/source/view.cxx |2 -- starmath/source/visitors.cxx |2 +- starmath/source/wordexportbase.cxx|1 - starmath/source/wordexportbase.hxx| 11 +-- 39 files changed, 15 insertions(+), 125 deletions(-) New commits: commit b6d7a8929d77ef67bbeb584cb0283d5a4f82ebbb Author: dante AuthorDate: Sat Feb 27 19:26:41 2021 +0100 Commit: Noel Grandin CommitDate: Mon Mar 1 08:23:09 2021 +0100 Starmath cleanup unused includes Change-Id: I294c5bbeadb718e35c0c5e56332b4df71433555a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111687 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/starmath/inc/ElementsDockingWindow.hxx b/starmath/inc/ElementsDockingWindow.hxx index 1deafb09b805..ebb3541549dc 100644 --- a/starmath/inc/ElementsDockingWindow.hxx +++ b/starmath/inc/ElementsDockingWindow.hxx @@ -24,15 +24,10 @@ #include #include -#include "format.hxx" -#include -#include - +#include "parse.hxx" #include "AccessibleSmElementsControl.hxx" class SmDocShell; -class SmNode; -class SmParser; class SmElement { diff --git a/starmath/inc/caret.hxx b/starmath/inc/caret.hxx index 6cc663206da4..1ae0dc438d34 100644 --- a/starmath/inc/caret.hxx +++ b/starmath/inc/caret.hxx @@ -10,13 +10,8 @@ #define INCLUDED_STARMATH_INC_CARET_HXX #include - #include "node.hxx" -#include -#include -#include - /** Representation of caret position with an equation */ struct SmCaretPos { diff --git a/starmath/inc/cfgitem.hxx b/starmath/inc/cfgitem.hxx index 8e450d04a1d3..c0a4be4c60be 100644 --- a/starmath/inc/cfgitem.hxx +++ b/starmath/inc/cfgitem.hxx @@ -23,14 +23,11 @@ #include "utility.hxx" #include -#include - #include #include #include #include "types.hxx" -#include namespace com::sun::star::uno { diff --git a/starmath/inc/cursor.hxx b/starmath/inc/cursor.hxx index a30beda63368..47d39819c54b 100644 --- a/starmath/inc/cursor.hxx +++ b/starmath/inc/cursor.hxx @@ -9,13 +9,8 @@ #ifndef INCLUDED_STARMATH_INC_CURSOR_HXX #define INCLUDED_STARMATH_INC_CURSOR_HXX -#include "node.hxx" #include "caret.hxx" -#include -#include -#include - /** Factor to multiple the squared horizontal distance with * Used for Up and Down movement. */ diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx index d3017f8e9554..2d87467de870 100644 --- a/starmath/inc/dialog.hxx +++ b/starmath/inc/dialog.hxx @@ -23,7 +23,6 @@ #include #include #include "symbol.hxx" -#include class SubsetMap; class SmFormat; diff --git a/starmath/inc/document.hxx b/starmath/inc/document.hxx index 17933546265c..88d2126ac579 100644 --- a/starmath/inc/document.hxx +++ b/starmath/inc/document.hxx @@ -20,7 +20,6 @@ #ifndef INCLUDED_STARMATH_INC_DOCUMENT_HXX #define INCLUDED_STARMATH_INC_DOCUMENT_HXX -#include #include #include #include @@ -30,11 +29,7 @@ #include #include -#include -#include - #include "format.hxx" -#include "node.hxx" #include "parse.hxx" #include "smdllapi.hxx" diff --git a/starmath/inc/edit.h
[Libreoffice-commits] core.git: vcl/inc vcl/osx
vcl/inc/osx/salnativewidgets.h |1 - vcl/osx/salnativewidgets.cxx |7 +++ 2 files changed, 3 insertions(+), 5 deletions(-) New commits: commit 0833f01a3df511871c572c5454a97ef878eb9f67 Author: Noel Grandin AuthorDate: Sun Feb 28 14:32:13 2021 +0200 Commit: Noel Grandin CommitDate: Mon Mar 1 08:00:10 2021 +0100 macOS spinbox and tab header tweaks (*) tweak location of SpinBoxes so they line up a little better (*) tweak the size of the TabItems so they don't overlap, which causes little extra vertical bars of gray Change-Id: Ic36be6c97b4b44f5e60b0f4a0f1e172fd7c2af03 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111712 Tested-by: Noel Grandin Reviewed-by: Noel Grandin diff --git a/vcl/inc/osx/salnativewidgets.h b/vcl/inc/osx/salnativewidgets.h index 3fdcdc40ca97..86675e0623d6 100644 --- a/vcl/inc/osx/salnativewidgets.h +++ b/vcl/inc/osx/salnativewidgets.h @@ -22,7 +22,6 @@ #define TAB_HEIGHT 20 // height of tab header in pixels #define TAB_TEXT_MARGIN 12// left/right margin of text within tab headers -#define VCL_TAB_TEXT_SEPARATOR 2 // Space between two tabs required by VCL #define FOCUS_RING_WIDTH 4 // width of focus ring in pixels diff --git a/vcl/osx/salnativewidgets.cxx b/vcl/osx/salnativewidgets.cxx index 606db5ba9a37..17d1744433f4 100644 --- a/vcl/osx/salnativewidgets.cxx +++ b/vcl/osx/salnativewidgets.cxx @@ -661,8 +661,6 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType, else if (aTabItemDrawInfo.position == kHIThemeTabPositionLast) aTabItemDrawInfo.position = kHIThemeTabPositionFirst; } -rc.size.width += VCL_TAB_TEXT_SEPARATOR; -rc.origin.x -= 1; HIThemeDrawTab(&rc, &aTabItemDrawInfo, maContextHolder.get(), kHIThemeOrientationNormal, nullptr); bOK=true; } @@ -812,7 +810,8 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType, ? kThemeAdornmentDefault : kThemeAdornmentNone; if (nUpperState & ControlState::FOCUSED || nLowerState & ControlState::FOCUSED) aSpinInfo.adornment |= kThemeAdornmentFocus; -rc.origin.x += rc.size.width + 2 * FOCUS_RING_WIDTH; +rc.origin.x += rc.size.width + FOCUS_RING_WIDTH + 1; +rc.origin.y -= 1; rc.size.width = SPIN_BUTTON_WIDTH; rc.size.height = SPIN_LOWER_BUTTON_HEIGHT + SPIN_LOWER_BUTTON_HEIGHT; HIThemeDrawButton(&rc, &aSpinInfo, maContextHolder.get(), kHIThemeOrientationNormal, nullptr); @@ -968,7 +967,7 @@ bool AquaSalGraphics::getNativeControlRegion(ControlType nType, break; case ControlType::TabItem: { -w = aCtrlBoundRect.GetWidth() + 2 * TAB_TEXT_MARGIN - 2 * VCL_TAB_TEXT_SEPARATOR; +w = aCtrlBoundRect.GetWidth() + 2 * TAB_TEXT_MARGIN; h = TAB_HEIGHT + 2; rNativeContentRegion = tools::Rectangle(Point(x, y), Size(w, h)); rNativeBoundingRegion = tools::Rectangle(Point(x, y), Size(w, h)); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'private/tvajngerl/staging' - 2 commits - basegfx/CppunitTest_basegfx.mk basegfx/test include/basegfx include/sfx2 officecfg/registry sfx2/Library_sfx.mk sfx2/sd
Rebased ref, commits from common ancestor: commit 9bd5a1d5d797db719f405ebf6a6011185b90c35b Author: Tomaž Vajngerl AuthorDate: Tue May 22 14:44:39 2018 +0900 Commit: Tomaž Vajngerl CommitDate: Mon Mar 1 13:35:31 2021 +0900 Command Popup Change-Id: I92cdd3130b8de42ee0863c9e7154e7c7246d9377 diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc index 3f9d4a232fb7..e2a9a8cdaab6 100644 --- a/include/sfx2/sfxsids.hrc +++ b/include/sfx2/sfxsids.hrc @@ -385,7 +385,7 @@ class SvxSearchItem; // default-ids for windows -// free (SID_SFX_START + 610) +#define SID_COMMAND_POPUP (SID_SFX_START + 610) #define SID_NEWWINDOW (SID_SFX_START + 620) #define SID_CLOSEWIN(SID_SFX_START + 621) #define SID_VIEWSHELL (SID_SFX_START + 623) diff --git a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu index 967aa98a04db..47118db2540e 100644 --- a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu +++ b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu @@ -313,6 +313,12 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some emoji thing .uno:OptionsTreeDialog + + + I10N SHORTCUTS - NO TRANSLATE + .uno:CommandPopup + + diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu index 756bdd288b91..ad77ca0a19a5 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu @@ -6537,6 +6537,14 @@ bit 3 (0x8): #define UICOMMANDDESCRIPTION_PROPERTIES_TOGGLEBUTTON 8 1 + + + Command Popup + + + 1 + + Development Tool diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk index b5126ca87893..941b11e59f94 100644 --- a/sfx2/Library_sfx.mk +++ b/sfx2/Library_sfx.mk @@ -291,6 +291,7 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\ sfx2/source/styles/StyleManager \ sfx2/source/toolbox/tbxitem \ sfx2/source/toolbox/weldutils \ +sfx2/source/view/CommandPopup \ sfx2/source/view/classificationcontroller \ sfx2/source/view/classificationhelper \ sfx2/source/view/frame \ diff --git a/sfx2/UIConfig_sfx.mk b/sfx2/UIConfig_sfx.mk index 7bdbd7a85a1e..ec80ab16de65 100644 --- a/sfx2/UIConfig_sfx.mk +++ b/sfx2/UIConfig_sfx.mk @@ -21,6 +21,7 @@ $(eval $(call gb_UIConfig_add_uifiles,sfx,\ sfx2/uiconfig/ui/classificationbox \ sfx2/uiconfig/ui/cmisinfopage \ sfx2/uiconfig/ui/cmisline \ + sfx2/uiconfig/ui/commandpopup \ sfx2/uiconfig/ui/custominfopage \ sfx2/uiconfig/ui/decktitlebar \ sfx2/uiconfig/ui/descriptioninfopage \ diff --git a/sfx2/sdi/frmslots.sdi b/sfx2/sdi/frmslots.sdi index 09aafef95b7d..a7c8a472e73d 100644 --- a/sfx2/sdi/frmslots.sdi +++ b/sfx2/sdi/frmslots.sdi @@ -262,6 +262,11 @@ interface TopWindow : BrowseWindow ExecMethod = MiscExec_Impl ; StateMethod = MiscState_Impl ; ] +SID_COMMAND_POPUP +[ +ExecMethod = MiscExec_Impl ; +StateMethod = MiscState_Impl ; +] SID_CLOSEWIN // ole(no) api(final/play/rec) [ ExecMethod = Exec_Impl ; @@ -307,4 +312,3 @@ shell SfxViewFrame StateMethod = GetState_Impl ; ] } - diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi index 425724440d13..85523a6f0b46 100644 --- a/sfx2/sdi/sfx.sdi +++ b/sfx2/sdi/sfx.sdi @@ -1271,6 +1271,23 @@ SfxStringItem FullName SID_DOCFULLNAME GroupId = ; ] +SfxVoidItem CommandPopup SID_COMMAND_POPUP +[ +AutoUpdate = TRUE, +FastCall = FALSE, +ReadOnlyDoc = TRUE, +Toggle = FALSE, +Container = TRUE, +RecordAbsolute = FALSE, +RecordPerSet; +Asynchron; + + +AccelConfig = TRUE, +MenuConfig = TRUE, +ToolBoxConfig = TRUE, +GroupId = SfxGroupId::View; +] SfxBoolItem FullScreen SID_WIN_FULLSCREEN diff --git a/sfx2/source/view/CommandPopup.cxx b/sfx2/source/view/CommandPopup.cxx new file mode 100644 index ..c35bb2db476e --- /dev/null +++ b/sfx2/source/view/CommandPopup.cxx @@ -0,0 +1,321 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include "CommandPopup.hxx" + +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include
[Libreoffice-commits] core.git: include/svx svx/source
include/svx/selctrl.hxx |1 + svx/source/stbctrls/selctrl.cxx | 13 - 2 files changed, 9 insertions(+), 5 deletions(-) New commits: commit 6c897e5026a6819c2d706ccdc9720fb1b3f8bea2 Author: Jim Raykowski AuthorDate: Sun Feb 21 21:01:57 2021 -0900 Commit: Jim Raykowski CommitDate: Mon Mar 1 03:56:07 2021 +0100 tdf#116136 don't show statusbar selection mode control tooltip in print preview. This patch also sets the control image disabled when in print preview. Change-Id: I497af2a50621ed6611a31f9b17b682caa82fa260 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111294 Tested-by: Jenkins Reviewed-by: Jim Raykowski diff --git a/include/svx/selctrl.hxx b/include/svx/selctrl.hxx index 2b32e56ede70..75d7f8cc3a84 100644 --- a/include/svx/selctrl.hxx +++ b/include/svx/selctrl.hxx @@ -39,6 +39,7 @@ public: private: sal_uInt16 mnState; Image maImage; +bool mbFeatureEnabled; }; #endif diff --git a/svx/source/stbctrls/selctrl.cxx b/svx/source/stbctrls/selctrl.cxx index 2b028e0d71d3..845df5a5d367 100644 --- a/svx/source/stbctrls/selctrl.cxx +++ b/svx/source/stbctrls/selctrl.cxx @@ -100,15 +100,18 @@ SvxSelectionModeControl::SvxSelectionModeControl( sal_uInt16 _nSlotId, StatusBar& rStb ) : SfxStatusBarControl( _nSlotId, _nId, rStb ), mnState( 0 ), -maImage(StockImage::Yes, RID_SVXBMP_SELECTION) +maImage(StockImage::Yes, RID_SVXBMP_SELECTION), +mbFeatureEnabled(false) { GetStatusBar().SetItemText( GetId(), "" ); +GetStatusBar().SetQuickHelpText(GetId(), u""); } void SvxSelectionModeControl::StateChanged( sal_uInt16, SfxItemState eState, const SfxPoolItem* pState ) { -if ( SfxItemState::DEFAULT == eState ) +mbFeatureEnabled = SfxItemState::DEFAULT == eState; +if (mbFeatureEnabled) { DBG_ASSERT( dynamic_cast< const SfxUInt16Item* >(pState) != nullptr, "invalid item type" ); const SfxUInt16Item* pItem = static_cast(pState); @@ -121,8 +124,8 @@ void SvxSelectionModeControl::StateChanged( sal_uInt16, SfxItemState eState, bool SvxSelectionModeControl::MouseButtonDown( const MouseEvent& rEvt ) { -if (!rEvt.IsMiddle()) -return false; +if (!mbFeatureEnabled || !rEvt.IsMiddle()) +return true; ::tools::Rectangle aRect(rEvt.GetPosPixel(), Size(1, 1)); weld::Window* pPopupParent = weld::GetPopupParent(GetStatusBar(), aRect); @@ -174,7 +177,7 @@ void SvxSelectionModeControl::Paint( const UserDrawEvent& rUsrEvt ) Point aPos( aRect.Left() + ( aControlRect.GetWidth() - aImgSize.Width() ) / 2, aRect.Top() + ( aControlRect.GetHeight() - aImgSize.Height() ) / 2 ); -pDev->DrawImage( aPos, maImage ); +pDev->DrawImage(aPos, maImage, mbFeatureEnabled ? DrawImageFlags::NONE : DrawImageFlags::Disable); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'private/tvajngerl/staging' - 2 commits - basegfx/CppunitTest_basegfx.mk basegfx/test include/basegfx include/sfx2 officecfg/registry sfx2/Library_sfx.mk sfx2/sd
Rebased ref, commits from common ancestor: commit 67e1983a45a8c897cf3a245e3b880639776be39f Author: Tomaž Vajngerl AuthorDate: Thu Nov 12 10:01:20 2020 +0100 Commit: Tomaž Vajngerl CommitDate: Mon Mar 1 10:37:31 2021 +0900 basegfx: added LengthUnit class as the base unit for length Change-Id: I1d4790b60dd784e8b2e2e438274f3ebd6db4b60c diff --git a/basegfx/CppunitTest_basegfx.mk b/basegfx/CppunitTest_basegfx.mk index a0379e76612a..b66b1381d69a 100644 --- a/basegfx/CppunitTest_basegfx.mk +++ b/basegfx/CppunitTest_basegfx.mk @@ -42,6 +42,7 @@ $(eval $(call gb_CppunitTest_add_exception_objects,basegfx,\ basegfx/test/basegfxtools \ basegfx/test/clipstate \ basegfx/test/genericclipper \ +basegfx/test/LengthUnitTest \ )) # vim: set noet sw=4 ts=4: diff --git a/basegfx/test/LengthUnitTest.cxx b/basegfx/test/LengthUnitTest.cxx new file mode 100644 index ..0b80c33da5b0 --- /dev/null +++ b/basegfx/test/LengthUnitTest.cxx @@ -0,0 +1,96 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include + +#include +#include + +class LengthUnitTest : public CppUnit::TestFixture +{ +public: +void test(); + +CPPUNIT_TEST_SUITE(LengthUnitTest); +CPPUNIT_TEST(test); +CPPUNIT_TEST_SUITE_END(); +}; + +void LengthUnitTest::test() +{ +gfx::LengthUnit cm = 1_cm + 5_cm - 2_cm; +CPPUNIT_ASSERT_DOUBLES_EQUAL(4.0, cm.as_cm(), 1e-4); +CPPUNIT_ASSERT_DOUBLES_EQUAL(0.04, cm.as_m(), 1e-4); +CPPUNIT_ASSERT_DOUBLES_EQUAL(40.0, cm.as_mm(), 1e-4); +CPPUNIT_ASSERT_EQUAL(sal_Int64(144), cm.raw()); + +gfx::LengthUnit cm2 = 5_cm * 2; +CPPUNIT_ASSERT_EQUAL(sal_Int64(360), cm2.raw()); +CPPUNIT_ASSERT_DOUBLES_EQUAL(10.0, cm2.as_cm(), 1e-4); + +// 1 km - 50 m = 950 m = 95000 cm +gfx::LengthUnit cm3 = 10_cm - 5000_cm; +CPPUNIT_ASSERT_EQUAL(sal_Int64(342), cm3.raw()); +CPPUNIT_ASSERT_DOUBLES_EQUAL(95000.0, cm3.as_cm(), 1e-4); + +gfx::LengthUnit cm4(1_cm); +cm4 /= 2; +CPPUNIT_ASSERT_EQUAL(sal_Int64(18), cm4.raw()); +CPPUNIT_ASSERT_DOUBLES_EQUAL(0.5, cm4.as_cm(), 1e-4); + +// (635 * 20) + 3 * (635 * 15) = 41275EMU +gfx::LengthUnit pt = 1_pt + 3_px; +CPPUNIT_ASSERT_DOUBLES_EQUAL(3.25, pt.as_pt(), 1e-4); +CPPUNIT_ASSERT_DOUBLES_EQUAL(65.0, pt.as_twip(), 1e-4); +CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0451, pt.as_in(), 1e-4); +CPPUNIT_ASSERT_EQUAL(sal_Int64(41275), pt.raw()); + +gfx::LengthUnit inch = 1_in; // 1440 * 635 +CPPUNIT_ASSERT_DOUBLES_EQUAL(1440.0, inch.as_twip(), 1e-4); +CPPUNIT_ASSERT_DOUBLES_EQUAL(96.0, inch.as_px(), 1e-4); +CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, inch.as_in(), 1e-4); +CPPUNIT_ASSERT_DOUBLES_EQUAL(914400.0, inch.as_emu(), 1e-4); +CPPUNIT_ASSERT_EQUAL(sal_Int64(914400), inch.raw()); + +// Conversion +sal_Int64 asNumber(17_pt); +asNumber += sal_Int64(1_pt); +gfx::LengthUnit asLength = gfx::LengthUnit::emu(asNumber); +CPPUNIT_ASSERT_EQUAL(sal_Int64(18 * 635 * 20), asLength.raw()); + +gfx::LengthUnit maximum = gfx::LengthUnit::emu(SAL_MAX_INT64); +CPPUNIT_ASSERT_DOUBLES_EQUAL(256204778801.5, maximum.as_m(), 1e-1); +// 256204778 km +CPPUNIT_ASSERT_EQUAL(sal_Int64(SAL_MAX_INT64), maximum.raw()); + +gfx::LengthUnit minimum = gfx::LengthUnit::emu(SAL_MIN_INT64); +CPPUNIT_ASSERT_DOUBLES_EQUAL(-256204778801.5, minimum.as_m(), 1e-1); +CPPUNIT_ASSERT_DOUBLES_EQUAL(double(SAL_MIN_INT64), minimum.as_emu(), 1e-1); +CPPUNIT_ASSERT_EQUAL(sal_Int64(SAL_MIN_INT64), minimum.raw()); + +// 27 emu + 33 emu + 360 emu = 420 +gfx::LengthUnit emus = 27_emu + 33_emu + 1_hmm; +CPPUNIT_ASSERT_EQUAL(sal_Int64(420), emus.raw()); + +// Creation from number +int number = 10; +auto asCm = gfx::LengthUnit::cm(number); +CPPUNIT_ASSERT_DOUBLES_EQUAL(10.0, asCm.as_cm(), 1e-4); +CPPUNIT_ASSERT_EQUAL(sal_Int64(360), asCm.raw()); + +auto asMm = gfx::LengthUnit::mm(number); +CPPUNIT_ASSERT_DOUBLES_EQUAL(10.0, asMm.as_mm(), 1e-4); +CPPUNIT_ASSERT_EQUAL(sal_Int64(36), asMm.raw()); + +auto asInch = gfx::LengthUnit::in(number); +CPPUNIT_ASSERT_DOUBLES_EQUAL(10.0, asInch.as_in(), 1e-4); +CPPUNIT_ASSERT_EQUAL(sal_Int64(9144000), asInch.raw()); +} + +CPPUNIT_TEST_SUITE_REGISTRATION(LengthUnitTest); diff --git a/include/basegfx/units/LengthUnit.hxx b/include/basegfx/units/LengthUnit.hxx new file mode 100644 index ..4edd1cc4704f --- /dev/null +++ b/include/basegfx/units/LengthUnit.hxx @@ -0,0 +1,194 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code For
[Libreoffice-commits] core.git: solenv/gbuild
solenv/gbuild/platform/com_GCC_defs.mk |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 6fb9f368c6824a8ff7bc5bc5cf66fc2df7d055b7 Author: Michael Stahl AuthorDate: Sat Feb 27 22:30:41 2021 +0100 Commit: Michael Stahl CommitDate: Sun Feb 28 21:50:03 2021 +0100 gbuild: don't use -Wunused-macros with sccache In at least soltools, jurt and gperf generated files, build with GCC and sccache 0.2.16-alpha.0 reports spurious -Werror=implicit-fallthrough= due to comments and these go away by configuring sccache with rewrite_includes_only = true. But his results in cc1: error: ‘-fdirectives-only’ is incompatible with ‘-Wunused-macros’ so disable that like for clang-with-icecream builds. Change-Id: I6dec38e86aa6e22591d7a700a8daddf3fed88b16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111716 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk index d8784dfb6a6e..876d57ab6fa2 100644 --- a/solenv/gbuild/platform/com_GCC_defs.mk +++ b/solenv/gbuild/platform/com_GCC_defs.mk @@ -57,7 +57,7 @@ gb_CFLAGS_COMMON := \ -Wstrict-prototypes \ -Wundef \ -Wunreachable-code \ - $(if $(and $(COM_IS_CLANG),$(or $(findstring icecc,$(CC)),$(findstring icecc,$(CCACHE_PREFIX,,-Wunused-macros) \ + $(if $(or $(and $(COM_IS_CLANG),$(or $(findstring icecc,$(CC)),$(findstring icecc,$(CCACHE_PREFIX,$(findstring sccache,$(CC))),,-Wunused-macros) \ $(if $(COM_IS_CLANG),-Wembedded-directive) \ -finput-charset=UTF-8 \ -fmessage-length=0 \ @@ -74,7 +74,7 @@ gb_CXXFLAGS_COMMON := \ -Wextra \ -Wundef \ -Wunreachable-code \ - $(if $(and $(COM_IS_CLANG),$(or $(findstring icecc,$(CC)),$(findstring icecc,$(CCACHE_PREFIX,,-Wunused-macros) \ + $(if $(or $(and $(COM_IS_CLANG),$(or $(findstring icecc,$(CXX)),$(findstring icecc,$(CCACHE_PREFIX,$(findstring sccache,$(CXX))),,-Wunused-macros) \ $(if $(COM_IS_CLANG),-Wembedded-directive) \ -finput-charset=UTF-8 \ -fmessage-length=0 \ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/source
sc/source/ui/view/gridwin.cxx | 14 -- 1 file changed, 14 deletions(-) New commits: commit 56e0bb77f8506abf9eb16f6a4ceff432190c81c4 Author: Caolán McNamara AuthorDate: Sun Feb 28 19:14:24 2021 + Commit: Caolán McNamara CommitDate: Sun Feb 28 21:33:45 2021 +0100 remove unnecessary MouseButtonDown forward I don't see how this scenario can happen, and if it does, why we would want to send a MouseDown to the filter list. This hunk appears in the "initial import". There is a "On OS/2 when clicking next to the Popup menu..." comment on a different popup in this file so maybe there was some workaround for some condition that no longer happens. Change-Id: I15b4d57259047a20822685a00e1bf5b00aa21a3a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111715 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 0fe1c7d357b5..e17a03de5971 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -1806,7 +1806,6 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt, MouseEventSta // Scenario selection comes from MouseButtonDown: // The next MouseMove on the FilterBox is like a ButtonDown nMouseStatus = SC_GM_FILTER; - return; } @@ -2413,19 +2412,6 @@ void ScGridWindow::MouseMove( const MouseEvent& rMEvt ) return; } -if (nMouseStatus == SC_GM_FILTER && mpFilterBox) -{ -Point aRelPos = mpFilterBox->ScreenToOutputPixel( OutputToScreenPixel( rMEvt.GetPosPixel() ) ); -if ( tools::Rectangle(Point(), mpFilterBox->GetOutputSizePixel()).IsInside(aRelPos) ) -{ -nButtonDown = 0; -nMouseStatus = SC_GM_NONE; -ReleaseMouse(); -mpFilterBox->MouseButtonDown( MouseEvent( aRelPos, 1, MouseEventModifiers::SIMPLECLICK, MOUSE_LEFT ) ); -return; -} -} - bool bFormulaMode = pScMod->IsFormulaMode();// next click -> reference if (bEEMouse && mrViewData.HasEditView( eWhich )) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/unx
vcl/unx/generic/window/salframe.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 1b20f21ad8b476938af31f8f6a7926d2b1de0c97 Author: Caolán McNamara AuthorDate: Sat Feb 27 21:22:31 2021 + Commit: Caolán McNamara CommitDate: Sun Feb 28 21:33:22 2021 +0100 downgrade 'Restore on withdrawn window' to INFO Change-Id: Ia9c91070a4c94e741a8bf117533e07618e5c406e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111714 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx index 18f76cc48176..741af25b3fc8 100644 --- a/vcl/unx/generic/window/salframe.cxx +++ b/vcl/unx/generic/window/salframe.cxx @@ -2046,7 +2046,7 @@ void X11SalFrame::Restore() if( SHOWSTATE_UNKNOWN == nShowState_ || SHOWSTATE_HIDDEN == nShowState_ ) { -SAL_WARN( "vcl", "X11SalFrame::Restore on withdrawn window" ); +SAL_INFO( "vcl", "X11SalFrame::Restore on withdrawn window" ); return; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source
sw/source/core/undo/undobj.cxx | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) New commits: commit 58f5c3b07701a14a61dc6b11f959faaf8aa98b9b Author: Caolán McNamara AuthorDate: Sun Feb 28 18:53:55 2021 + Commit: Caolán McNamara CommitDate: Sun Feb 28 20:45:40 2021 +0100 ofz#31538 null-deref Change-Id: I3264c0fd509e16cf4727847199f0be316d03d0e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111713 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx index cc1f806f1696..a13f87a7786d 100644 --- a/sw/source/core/undo/undobj.cxx +++ b/sw/source/core/undo/undobj.cxx @@ -1583,9 +1583,14 @@ static bool IsNotBackspaceHeuristic( SwPosition const& rStart, SwPosition const& rEnd) { // check if the selection is backspace/delete created by DelLeft/DelRight -return rStart.nNode.GetIndex() + 1 != rEnd.nNode.GetIndex() -|| rEnd.nContent != 0 -|| rStart.nContent != rStart.nNode.GetNode().GetTextNode()->Len(); +if (rStart.nNode.GetIndex() + 1 != rEnd.nNode.GetIndex()) +return true; +if (rEnd.nContent != 0) +return true; +const SwTextNode* pTextNode = rStart.nNode.GetNode().GetTextNode(); +if (!pTextNode || rStart.nContent != pTextNode->Len()) +return true; +return false; } bool IsDestroyFrameAnchoredAtChar(SwPosition const & rAnchorPos, ___ 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/GenericCommands.xcu |7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) New commits: commit cbb467e2570715fadf08fe4ac964bdfe6397f535 Author: Seth Chaiklin AuthorDate: Fri Feb 26 16:13:56 2021 +0100 Commit: Seth Chaiklin CommitDate: Sun Feb 28 20:07:50 2021 +0100 tdf#134432 refine the labelling appearance for .uno:CharBackColor Writer uses .uno:BackColor and .uno:CharBackColor. The first for highlighting text in the canvas; the second for highlighting text in text boxes and shapes. Calc, Draw, and Impress only have .uno:CharBackColor. The same icon and popup menu is used for both .unos in all modules. The intent is to make the tooltip be identical as "Character Highlighting Color" - for the icon and menu label. But there needs to be a way to differentiate between the two .unos in the Customize dialog (for Writer only). .uno:CharBackColor uses "Label" for what is presented as a tooltip in the toolbar. So use "Label" in GenericCommands.xcu to present the tooltip in the UI, and use its "TooltipLabel" as a way to differentiate between the two Character Highlighting Color commands in the Customize dialog for Writer. It will give a little extra information in the Calc, Draw, Impress Customize dialog, which was usually implicit, but should not cause confusion. Thanks to Maxim Monastirsky for essential insights about how .uno:CharBackColor is handled in svx/source/tbxctrls/tbcontrl.cxx Change-Id: Ifb5d258ebfeac6a070e5d285fc7c022a2dc071c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111590 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky Reviewed-by: Seth Chaiklin diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu index 756bdd288b91..36388e2c100b 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu @@ -3302,13 +3302,10 @@ bit 3 (0x8): #define UICOMMANDDESCRIPTION_PROPERTIES_TOGGLEBUTTON 8 - Character Highlighting Color (in Text Box and Shapes) - - Character Highlighting Color - - Character Highlighting Color + + Character Highlighting Color (in Text Box and Shapes) 1 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: config_host.mk.in configure.ac vcl/Executable_602fuzzer.mk vcl/Executable_bmpfuzzer.mk vcl/Executable_cgmfuzzer.mk vcl/Executable_diffuzzer.mk vcl/Executable_docxfuzzer
config_host.mk.in |1 + configure.ac |4 vcl/Executable_602fuzzer.mk |2 +- vcl/Executable_bmpfuzzer.mk |2 +- vcl/Executable_cgmfuzzer.mk |2 +- vcl/Executable_diffuzzer.mk |2 +- vcl/Executable_docxfuzzer.mk |2 +- vcl/Executable_dxffuzzer.mk |2 +- vcl/Executable_epsfuzzer.mk |2 +- vcl/Executable_fodpfuzzer.mk |2 +- vcl/Executable_fodsfuzzer.mk |2 +- vcl/Executable_fodtfuzzer.mk |2 +- vcl/Executable_giffuzzer.mk |2 +- vcl/Executable_htmlfuzzer.mk |2 +- vcl/Executable_hwpfuzzer.mk |2 +- vcl/Executable_jpgfuzzer.mk |2 +- vcl/Executable_lwpfuzzer.mk |2 +- vcl/Executable_metfuzzer.mk |2 +- vcl/Executable_mmlfuzzer.mk |2 +- vcl/Executable_mtpfuzzer.mk |2 +- vcl/Executable_olefuzzer.mk |2 +- vcl/Executable_pcdfuzzer.mk |2 +- vcl/Executable_pctfuzzer.mk |2 +- vcl/Executable_pcxfuzzer.mk |2 +- vcl/Executable_pngfuzzer.mk |2 +- vcl/Executable_ppmfuzzer.mk |2 +- vcl/Executable_pptfuzzer.mk |2 +- vcl/Executable_pptxfuzzer.mk |2 +- vcl/Executable_psdfuzzer.mk |2 +- vcl/Executable_qpwfuzzer.mk |2 +- vcl/Executable_rasfuzzer.mk |2 +- vcl/Executable_rtffuzzer.mk |2 +- vcl/Executable_scrtffuzzer.mk |2 +- vcl/Executable_sftfuzzer.mk |2 +- vcl/Executable_slkfuzzer.mk |2 +- vcl/Executable_svmfuzzer.mk |2 +- vcl/Executable_tgafuzzer.mk |2 +- vcl/Executable_tiffuzzer.mk |2 +- vcl/Executable_wksfuzzer.mk |2 +- vcl/Executable_wmffuzzer.mk |2 +- vcl/Executable_ww2fuzzer.mk |2 +- vcl/Executable_ww6fuzzer.mk |2 +- vcl/Executable_ww8fuzzer.mk |2 +- vcl/Executable_xbmfuzzer.mk |2 +- vcl/Executable_xlsfuzzer.mk |2 +- vcl/Executable_xlsxfuzzer.mk |2 +- vcl/Executable_xpmfuzzer.mk |2 +- 47 files changed, 50 insertions(+), 45 deletions(-) New commits: commit 44b36a0602b04342566362bce3f6bed7d2b096e4 Author: Andrzej Hunt AuthorDate: Sat Feb 27 14:21:56 2021 +0100 Commit: Caolán McNamara CommitDate: Sun Feb 28 19:46:58 2021 +0100 Upgrade fuzzers to LIB_FUZZING_ENGINE And check that LIB_FUZZING_ENGINE is set during configure. Because: 1. It's easier to build locally this way (you don't need to build or hack a libFuzzingEngine.a - instead you can just specify LIB_FUZZING_ENGINE=-fsanitize=fuzzer to produce a valid build). 2. Using -lFuzzingEngine is deprecated [1] for various reasons [2]. The old behaviour can be emulated if desired by setting LIB_FUZZING_ENGINE=-lFuzzingEngine . This patch was tested as follows: - Building LO within oss-fuzz via: python infra/helper.py build_fuzzers --sanitizer address libreoffice python infra/helper.py check_build libreoffice - Building LO fuzzers standalone via: export CC="clang-11" export CXX="clang++-11 -stdlib=libc++" export CFLAGS="-fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION" export CXXFLAGS="$CFLAGS -stdlib=libc++" export LDFLAGS="$CFLAGS -Wl,--compress-debug-sections,zlib -lpthread" export LIB_FUZZING_ENGINE=-fsanitize=fuzzer ./autogen.sh --with-distro=LibreOfficeOssFuzz --with-system-libxml make fuzzers (--with-system-libxml only appears to be needed because of issues specific to my build environment/Suse 15.2. I'm invoking clang-11 simply because that's the most modern clang I have installed, plain clang should also work on most sufficiently modern systems). [1] https://github.com/google/oss-fuzz/blob/481280c65048fd12fb2141b9225af511a9ef7ed2/infra/presubmit.py#L46 [2] https://github.com/google/oss-fuzz/issues/2164 Change-Id: Iddb577c30a39620e72372ef6c2d3fda67f8aabdf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111691 Tested-by: Jenkins Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/config_host.mk.in b/config_host.mk.in index c6c9b7eae351..2f52785b840a 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -353,6 +353,7 @@ export LIBLAYOUT_JAR=@LIBLAYOUT_JAR@ export LIBLOADER_JAR=@LIBLOADER_JAR@ export LIBNUMBERTEXT_CFLAGS=$(gb_SPACE)@LIBNUMBERTEXT_CFLAGS@ export LIBNUMBERTEXT_LIBS=$(gb_SPACE)@LIBNUMBERTEXT_LIBS@ +export LIB_FUZZING_ENGINE=@LIB_FUZZING_ENGINE@ export LIBO_BIN_FOLDER=@LIBO_BIN_FOLDER@ export LIBO_BIN_FOLDER_FOR_BUILD=@LIBO_BIN_FOLDER_FOR_BUILD@ export LIBO_ETC_FOLDER=@LIBO_ETC_FOLDER@ diff --git a/configure.ac b/configure.ac index 9e0085370d2b..90b0cf01633b 100644 --- a/configure.ac +++ b/configure.ac @@ -10396,11 +10396,15 @@ AC_MSG_CHECKING([whether to enable fuzzers]) if test "$enable_fuzzers" != yes; then AC_MSG_RESULT([no]) else +if test $LIB_FUZZING_ENGINE == ""; then + A
[Libreoffice-commits] core.git: extras/source
extras/source/autocorr/lang/en-GB/DocumentList.xml | 2777 - 1 file changed, 1638 insertions(+), 1139 deletions(-) New commits: commit 06c3eafce490fbfb8f8c477cb8dfe7f83e1fca9c Author: Marco Pinto AuthorDate: Tue Feb 23 10:59:13 2021 +0100 Commit: Andras Timar CommitDate: Sun Feb 28 16:50:43 2021 +0100 [en-GB] Added the 500 or so missing emojis from the US autocorrect and replaced "airplane" with "aeroplane". Change-Id: Iaffe6d6fe33f0b038002ee1ed173cbe1c51a9e13 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111326 Tested-by: Jenkins Reviewed-by: Andras Timar diff --git a/extras/source/autocorr/lang/en-GB/DocumentList.xml b/extras/source/autocorr/lang/en-GB/DocumentList.xml index bdc6a40451f9..c41fbdd24cf9 100644 --- a/extras/source/autocorr/lang/en-GB/DocumentList.xml +++ b/extras/source/autocorr/lang/en-GB/DocumentList.xml @@ -897,1143 +897,1642 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[Libreoffice-commits] core.git: sc/source
sc/source/ui/view/tabvwsh3.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 3f1aabf8d93764b906dc1b0db0e160b9411febff Author: Andras Timar AuthorDate: Fri Feb 26 16:05:12 2021 +0100 Commit: Andras Timar CommitDate: Sun Feb 28 16:48:07 2021 +0100 lok: mark calc document as modified when adjusting split-panes (2) Change-Id: I91231770ebf02218ae0380ddf76a8664dc6e5e19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111589 Tested-by: Jenkins Reviewed-by: Andras Timar diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx index 06aac0a795db..e8fb0d8a413d 100644 --- a/sc/source/ui/view/tabvwsh3.cxx +++ b/sc/source/ui/view/tabvwsh3.cxx @@ -1068,6 +1068,8 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) rOtherBind.Invalidate( SID_WINDOW_FIX ); rOtherBind.Invalidate(nSlot); }); +if (!GetViewData().GetDocShell()->IsReadOnly()) +GetViewData().GetDocShell()->SetDocumentModified(); } } else ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/qa sw/source
sw/qa/extras/ooxmlexport/data/tdf121666_lostPage.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport13.cxx| 10 ++ sw/source/filter/ww8/attributeoutputbase.hxx |2 +- sw/source/filter/ww8/docxattributeoutput.cxx | 14 +- sw/source/filter/ww8/docxattributeoutput.hxx |2 +- sw/source/filter/ww8/docxexport.cxx |4 ++-- sw/source/filter/ww8/docxexport.hxx |3 ++- sw/source/filter/ww8/rtfattributeoutput.cxx |2 +- sw/source/filter/ww8/rtfattributeoutput.hxx |4 ++-- sw/source/filter/ww8/rtfexport.cxx|5 +++-- sw/source/filter/ww8/rtfexport.hxx|4 ++-- sw/source/filter/ww8/wrtww8.hxx |6 -- sw/source/filter/ww8/ww8atr.cxx | 16 +--- sw/source/filter/ww8/ww8attributeoutput.hxx |2 +- 14 files changed, 55 insertions(+), 19 deletions(-) New commits: commit d58229d61b8bbf9eb0db841826e361940c7b2a4a Author: Attila Szűcs AuthorDate: Thu Feb 25 13:29:46 2021 +0100 Commit: László Németh CommitDate: Sun Feb 28 12:47:34 2021 +0100 tdf#121666 DOCX export: fix missing page break When an empty paragraph has both page break and section break, only the section break was exported to DOCX, the page break was not, while MSO needs that to show all page breaks. The DOC and RTF exports were not changed by this fix (not sure if the problem are present with them or not). Co-authored-by: Tibor Nagy (NISZ) Change-Id: I5deac0390666415e36a541c731dda4bc0a2ad6ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111543 Tested-by: László Németh Reviewed-by: László Németh diff --git a/sw/qa/extras/ooxmlexport/data/tdf121666_lostPage.docx b/sw/qa/extras/ooxmlexport/data/tdf121666_lostPage.docx new file mode 100644 index ..195f574d1c5d Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf121666_lostPage.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx index 78c12d93a4ff..5ce06fdacb6c 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx @@ -86,6 +86,16 @@ DECLARE_OOXMLEXPORT_TEST(testTdf121374_sectionHF2, "tdf121374_sectionHF2.doc") CPPUNIT_ASSERT( xHeaderText->getString().startsWith("virkamatka-anomus") ); } +DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf121666_lostPage, "tdf121666_lostPage.docx") +{ +xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml"); +assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[2]/w:br", "type", "page"); +// The second page break is exported too. +// Before this fix, if a node had both section break and page break, then only the section break was exported. +assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/w:br", "type", "page"); +assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:sectPr/w:type", "val", "nextPage"); +} + DECLARE_OOXMLEXPORT_TEST(testTdf95848, "tdf95848.docx") { OUString listId; diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx b/sw/source/filter/ww8/attributeoutputbase.hxx index 2a54795e05cc..e102b3f7012b 100644 --- a/sw/source/filter/ww8/attributeoutputbase.hxx +++ b/sw/source/filter/ww8/attributeoutputbase.hxx @@ -298,7 +298,7 @@ public: /// Write a section break /// msword::ColumnBreak or msword::PageBreak /// bBreakAfter: the break must be scheduled for insertion in the end of current paragraph -virtual void SectionBreak( sal_uInt8 nC, bool bBreakAfter, const WW8_SepInfo* pSectionInfo = nullptr ) = 0; +virtual void SectionBreak( sal_uInt8 nC, bool bBreakAfter, const WW8_SepInfo* pSectionInfo = nullptr, bool bExtraPageBreak = false ) = 0; // preserve page vertical alignment virtual void TextVerticalAdjustment( const css::drawing::TextVerticalAdjust) {}; diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 7a9ddc9e79a5..457366ee2a6c 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -6521,7 +6521,7 @@ void DocxAttributeOutput::PageBreakBefore( bool bBreak ) FSNS( XML_w, XML_val ), "false" ); } -void DocxAttributeOutput::SectionBreak( sal_uInt8 nC, bool bBreakAfter, const WW8_SepInfo* pSectionInfo ) +void DocxAttributeOutput::SectionBreak( sal_uInt8 nC, bool bBreakAfter, const WW8_SepInfo* pSectionInfo, bool bExtraPageBreak) { switch ( nC ) { @@ -6572,10 +6572,22 @@ void DocxAttributeOutput::SectionBreak( sal_uInt8 nC, bool bBreakAfter, const WW m_rExport.SectionProperties( *pSectionInfo ); m_pSerializer->endElementNS( XML_w, XML_pPr ); +if (bExtraPageBreak) +{ +
[Libreoffice-commits] core.git: sc/source
sc/source/core/tool/dbdata.cxx |7 +-- sc/source/ui/view/cellsh.cxx |2 +- 2 files changed, 6 insertions(+), 3 deletions(-) New commits: commit f604e1a305bd858bbe424811dc06b611caf8cd2b Author: Balazs Varga AuthorDate: Wed Jan 27 20:45:09 2021 +0100 Commit: László Németh CommitDate: Sun Feb 28 11:25:29 2021 +0100 tdf#124701 sc status bar: hide bad filtered row count After loading the document, positioning the cell cursor on filtered data, the status bar showed always the maximum amount of the filtered data, e.g. "9 of 9 records found", regardless of the real result, e.g. "6 of 9 records found", because the ScTable::Query() function will not run until we refresh the filters. As a workaround, we hide the (often false) data in the meantime. Change-Id: I904ca0c55e3afb276b11491c05430f985557f914 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110032 Tested-by: László Németh Reviewed-by: László Németh diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx index 9f8b68215856..f5ffea0984be 100644 --- a/sc/source/core/tool/dbdata.cxx +++ b/sc/source/core/tool/dbdata.cxx @@ -82,7 +82,7 @@ ScDBData::ScDBData( const OUString& rName, bAutoFilter (false), bModified (false), mbTableColumnNamesDirty(true), -nFilteredRowCount(0) +nFilteredRowCount(SCSIZE_MAX) { aUpper = ScGlobal::getCharClassPtr()->uppercase(aUpper); } @@ -936,7 +936,10 @@ void ScDBData::GetFilterSelCount( SCSIZE& nSelected, SCSIZE& nTotal ) nTotal = nEndRow - nStartRow + 1; if ( bHasHeader ) nTotal -= 1; -nSelected = nTotal - nFilteredRowCount; +if( nFilteredRowCount != SCSIZE_MAX ) +nSelected = nTotal - nFilteredRowCount; +else +nSelected = nFilteredRowCount; } namespace { diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx index f4194d3b4706..65640e0e87bf 100644 --- a/sc/source/ui/view/cellsh.cxx +++ b/sc/source/ui/view/cellsh.cxx @@ -781,7 +781,7 @@ void ScCellShell::GetState(SfxItemSet &rSet) { SCSIZE nSelected, nTotal; rDoc.GetFilterSelCount( nPosX, nPosY, nTab, nSelected, nTotal ); -if( nTotal ) +if( nTotal && nSelected != SCSIZE_MAX ) { OUString aStr = ScResId( STR_FILTER_SELCOUNT ); aStr = aStr.replaceAll( "$1", OUString::number( nSelected ) ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: fpicker/source
fpicker/source/win32/VistaFilePickerImpl.hxx | 40 +-- 1 file changed, 20 insertions(+), 20 deletions(-) New commits: commit dbc28bc2960f882753a11bb4d8cfbaae5edd7c0d Author: Mike Kaganski AuthorDate: Sun Feb 28 07:00:42 2021 +0100 Commit: Mike Kaganski CommitDate: Sun Feb 28 11:10:35 2021 +0100 Convert some const OUString to OUStringLiteral Change-Id: I7cb56da6b58325781446d6c001c49638d1ec1769 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111698 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/fpicker/source/win32/VistaFilePickerImpl.hxx b/fpicker/source/win32/VistaFilePickerImpl.hxx index 6e6e04ad56fc..c191330f4f16 100644 --- a/fpicker/source/win32/VistaFilePickerImpl.hxx +++ b/fpicker/source/win32/VistaFilePickerImpl.hxx @@ -60,26 +60,26 @@ const ::sal_Int32 FEATURE_VERSION= 1024; const ::sal_Int32 FEATURE_GPGPASSWORD= 2048; const ::sal_Int32 FEATURE_IMAGEANCHOR= 4096; -const OUString PROP_PICKER_LISTENER("picker_listener" ); // [XFilePickerListenert] -const OUString PROP_DIALOG_SHOW_RESULT("dialog_show_result" ); // [sal_Bool] true=OK, false=CANCEL -const OUString PROP_SELECTED_FILES("selected_files" ); // [seq< OUString >] contains all user selected files (can be empty!) -const OUString PROP_MULTISELECTION_MODE("multiselection_mode"); // [sal_Bool] true=ON, false=OFF -const OUString PROP_TITLE("title" ); // [OUString] -const OUString PROP_FILENAME("filename" ); // [OUString] -const OUString PROP_DIRECTORY("directory" ); // [OUString] -const OUString PROP_FEATURES("features" ); // [sal_Int32] -const OUString PROP_TEMPLATE_DESCR("templatedescription"); // [sal_Int32] -const OUString PROP_FILTER_TITLE("filter_title" ); // [OUString] -const OUString PROP_FILTER_VALUE("filter_value" ); // [OUString] -const OUString PROP_FILTER_GROUP("filter-group" ); // [seq< css:beans::StringPair >] contains a group of filters - -const OUString PROP_CONTROL_ID("control_id" ); // [sal_Int16] -const OUString PROP_CONTROL_ACTION("control_action" ); // [sal_Int16] -const OUString PROP_CONTROL_VALUE("control_value" ); // [Any] -const OUString PROP_CONTROL_LABEL("control_label" ); // [OUString] -const OUString PROP_CONTROL_ENABLE("control_enable" ); // [sal_Bool] true=ON, false=OFF -const OUString PROP_PARENT_WINDOW("ParentWindow"); //[css::awt::XWindow] preferred parent window -const OUString STRING_SEPARATOR("--" ); +constexpr OUStringLiteral PROP_PICKER_LISTENER(u"picker_listener" ); // [XFilePickerListenert] +constexpr OUStringLiteral PROP_DIALOG_SHOW_RESULT(u"dialog_show_result" ); // [sal_Bool] true=OK, false=CANCEL +constexpr OUStringLiteral PROP_SELECTED_FILES(u"selected_files" ); // [seq< OUString >] contains all user selected files (can be empty!) +constexpr OUStringLiteral PROP_MULTISELECTION_MODE(u"multiselection_mode"); // [sal_Bool] true=ON, false=OFF +constexpr OUStringLiteral PROP_TITLE(u"title" ); // [OUString] +constexpr OUStringLiteral PROP_FILENAME(u"filename" ); // [OUString] +constexpr OUStringLiteral PROP_DIRECTORY(u"directory" ); // [OUString] +constexpr OUStringLiteral PROP_FEATURES(u"features" ); // [sal_Int32] +constexpr OUStringLiteral PROP_TEMPLATE_DESCR(u"templatedescription"); // [sal_Int32] +constexpr OUStringLiteral PROP_FILTER_TITLE(u"filter_title" ); // [OUString] +constexpr OUStringLiteral PROP_FILTER_VALUE(u"filter_value" ); // [OUString] +constexpr OUStringLiteral PROP_FILTER_GROUP(u"filter-group" ); // [seq< css:beans::StringPair >] contains a group of filters + +constexpr OUStringLiteral PROP_CONTROL_ID(u"control_id" ); // [sal_Int16] +constexpr OUStringLiteral PROP_CONTROL_ACTION(u"control_action" ); // [sal_Int16] +constexpr OUStringLiteral PROP_CONTROL_VALUE(u"control_value" ); // [Any] +constexpr OUStringLiteral PROP_CONTROL_LABEL(u"control_label" ); // [OUString] +constexpr OUStringLiteral PROP_CONTROL_ENABLE(u"control_enable" ); // [sal_Bool] true=ON, false=OFF +constexpr OUStringLiteral PROP_PARENT_WINDOW(u"ParentWindow"); //[css::awt::XWindow] preferred parent window +constexpr OUStringLiteral STRING_SEPARATOR(u"--" ); class TDialogImplBase; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source
sw/source/core/view/vprint.hxx |7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) New commits: commit b337df8e74214241b3c2d2facd46331eb62c17be Author: Suhaas Joshi AuthorDate: Wed Jan 6 20:36:10 2021 +0530 Commit: Ilmari Lauhakangas CommitDate: Sun Feb 28 10:51:49 2021 +0100 tdf#124176 Use pragma once in sw/source/core/view Change-Id: I89fdf4a38eac6d69f2d432eefbf13d036cfb1a14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108876 Reviewed-by: Ilmari Lauhakangas Tested-by: Ilmari Lauhakangas diff --git a/sw/source/core/view/vprint.hxx b/sw/source/core/view/vprint.hxx index 2d91e3f90d4c..60f2750caeb9 100644 --- a/sw/source/core/view/vprint.hxx +++ b/sw/source/core/view/vprint.hxx @@ -16,17 +16,12 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - -#ifndef INCLUDED_SW_SOURCE_CORE_VIEW_VPRINT_HXX -#define INCLUDED_SW_SOURCE_CORE_VIEW_VPRINT_HXX +#pragma once #include class SwRootFrame; class SwPageFrame; - SwPageFrame const* sw_getPage(SwRootFrame const& rLayout, sal_Int32 const nPage); -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/source
sc/source/core/opencl/op_array.hxx |6 +- 1 file changed, 1 insertion(+), 5 deletions(-) New commits: commit 414490ddba424b38ef1c627decdb4af8bbdbd717 Author: Suhaas Joshi AuthorDate: Thu Jan 7 08:45:14 2021 +0530 Commit: Ilmari Lauhakangas CommitDate: Sun Feb 28 10:51:30 2021 +0100 tdf#124176 Use pragma once in sc/source/core/opencl Change-Id: I90253fdf9528116379cf06cb00a3342944e3351a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108918 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas diff --git a/sc/source/core/opencl/op_array.hxx b/sc/source/core/opencl/op_array.hxx index b70f3109f85d..cd0ba8c135a9 100644 --- a/sc/source/core/opencl/op_array.hxx +++ b/sc/source/core/opencl/op_array.hxx @@ -6,9 +6,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#ifndef INCLUDED_SC_SOURCE_CORE_OPENCL_OP_ARRAY_HXX -#define INCLUDED_SC_SOURCE_CORE_OPENCL_OP_ARRAY_HXX +#pragma once #include "opbase.hxx" @@ -39,6 +37,4 @@ public: }; } -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/qa
0 files changed New commits: commit 272da86e36c6e3e7ff13690c5fee534b044934bc Author: Andrea Gelmini AuthorDate: Fri Feb 26 16:01:52 2021 +0100 Commit: Julien Nabet CommitDate: Sun Feb 28 09:19:09 2021 +0100 Removed executable permission on file Change-Id: I1a7b356573f424bbf594f038ab8478f68248fbd5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111650 Reviewed-by: Julien Nabet Tested-by: Jenkins diff --git a/sw/qa/extras/layout/data/tdf138465min.docx b/sw/qa/extras/layout/data/tdf138465min.docx old mode 100755 new mode 100644 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits