core.git: sc/source
sc/source/ui/view/gridwin.cxx | 62 +++--- 1 file changed, 34 insertions(+), 28 deletions(-) New commits: commit dbb0892ad1f576de4b4910c4b1683f3c88a7c0e7 Author: sahil AuthorDate: Fri Oct 27 02:27:03 2023 +0530 Commit: Michael Weghorn CommitDate: Thu Mar 28 21:40:56 2024 +0100 Refactor ScGridWindow::GetEditUrl() To avoid code copy/pasting, common code is refactored to `lcl_SetEngineTextKeepingDefaults` to be used later in tdf#123159 Change-Id: I1889c8eee931ef8950e95af8aec73a1884b07302 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158516 Reviewed-by: Michael Weghorn Tested-by: Jenkins diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 013a994500df..07d2d3a71b63 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -5765,6 +5765,39 @@ bool extractURLInfo( const SvxFieldItem* pFieldItem, OUString* pName, OUString* } +static void lcl_SetEngineTextKeepingDefaults(const std::shared_ptr& pEngine, + ScDocument& rDoc, ScRefCellValue& rCell, const OUString& rURL) +{ +std::unique_ptr pTextObj; +if (rCell.getType() == CELLTYPE_EDIT) +{ +if (rCell.getEditText()) +pEngine->SetTextCurrentDefaults(*rCell.getEditText()); +} +else // Not an Edit cell and is a formula cell with 'Hyperlink' + // function if we have no URL, otherwise it could be a formula + // cell ( or other type ? ) with a hyperlink associated with it. +{ +if (rURL.isEmpty()) +pTextObj = rCell.getFormula()->CreateURLObject(); +else +{ +OUString aRepres = rURL; + +// TODO: text content of formatted numbers can be different +if (rCell.hasNumeric()) +aRepres = OUString::number(rCell.getValue()); +else if (rCell.getType() == CELLTYPE_FORMULA) +aRepres = rCell.getFormula()->GetString().getString(); + +pTextObj = ScEditUtil::CreateURLObjectFromURL(rDoc, rURL, aRepres); +} + +if (pTextObj) +pEngine->SetTextCurrentDefaults(*pTextObj); +} +} + bool ScGridWindow::GetEditUrl( const Point& rPos, OUString* pName, OUString* pUrl, OUString* pTarget ) { @@ -5826,34 +5859,7 @@ bool ScGridWindow::GetEditUrl( const Point& rPos, aPaperSize.setWidth( nThisColLogic ); pEngine->SetPaperSize( aPaperSize ); -std::unique_ptr pTextObj; -if (aCell.getType() == CELLTYPE_EDIT) -{ -if (aCell.getEditText()) -pEngine->SetTextCurrentDefaults(*aCell.getEditText()); -} -else // Not an Edit cell and is a formula cell with 'Hyperlink' - // function if we have no URL, otherwise it could be a formula - // cell ( or other type ? ) with a hyperlink associated with it. -{ -if (sURL.isEmpty()) -pTextObj = aCell.getFormula()->CreateURLObject(); -else -{ -OUString aRepres = sURL; - -// TODO: text content of formatted numbers can be different -if (aCell.hasNumeric()) -aRepres = OUString::number(aCell.getValue()); -else if (aCell.getType() == CELLTYPE_FORMULA) -aRepres = aCell.getFormula()->GetString().getString(); - -pTextObj = ScEditUtil::CreateURLObjectFromURL(rDoc, sURL, aRepres); -} - -if (pTextObj) -pEngine->SetTextCurrentDefaults(*pTextObj); -} +lcl_SetEngineTextKeepingDefaults(pEngine, rDoc, aCell, sURL); tools::Long nStartX = aLogicEdit.Left();
core.git: sc/source sc/uiconfig
sc/source/ui/cctrl/checklistmenu.cxx | 150 + sc/source/ui/inc/checklistmenu.hxx |6 + sc/uiconfig/scalc/ui/filterdropdown.ui | 24 - 3 files changed, 139 insertions(+), 41 deletions(-) New commits: commit d4c34206bcf64b94eac4f0761aeacc285e08af55 Author: Sahil AuthorDate: Wed Dec 27 16:01:07 2023 +0530 Commit: Heiko Tietze CommitDate: Mon Feb 12 12:53:39 2024 +0100 tdf#133836 Autofilter allow adding up members to the current selection Added a new checkbox [x] Lock, which if checked locks the current selection, and further items then can be added to that locked selection Change-Id: If8a5da308443458abfed59b303ee25feffa0aa6d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159737 Tested-by: Heiko Tietze Tested-by: Jenkins Reviewed-by: Heiko Tietze diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx index d11d5405347e..60078c335437 100644 --- a/sc/source/ui/cctrl/checklistmenu.cxx +++ b/sc/source/ui/cctrl/checklistmenu.cxx @@ -474,6 +474,8 @@ ScCheckListMenuControl::Config::Config() : ScCheckListMember::ScCheckListMember() : mnValue(0.0) , mbVisible(true) +, mbMarked(false) +, mbCheck(true) , mbHiddenByOtherFilter(false) , mbDate(false) , mbLeaf(false) @@ -504,6 +506,7 @@ ScCheckListMenuControl::ScCheckListMenuControl(weld::Widget* pParent, ScViewData , mxListChecks(mxBuilder->weld_tree_view("check_list_box")) , mxTreeChecks(mxBuilder->weld_tree_view("check_tree_box")) , mxChkToggleAll(mxBuilder->weld_check_button("toggle_all")) +, mxChkLockChecked(mxBuilder->weld_check_button("lock_checked")) , mxBtnSelectSingle(mxBuilder->weld_button("select_current")) , mxBtnUnselectSingle(mxBuilder->weld_button("unselect_current")) , mxButtonBox(mxBuilder->weld_box("buttonbox")) @@ -536,6 +539,7 @@ ScCheckListMenuControl::ScCheckListMenuControl(weld::Widget* pParent, ScViewData mxListChecks->connect_popup_menu(LINK(this, ScCheckListMenuControl, CommandHdl)); mxTreeChecks->connect_popup_menu(LINK(this, ScCheckListMenuControl, CommandHdl)); mxChkToggleAll->connect_mouse_move(LINK(this, ScCheckListMenuControl, MouseEnterHdl)); +mxChkLockChecked->connect_mouse_move(LINK(this, ScCheckListMenuControl, MouseEnterHdl)); mxBtnSelectSingle->connect_mouse_move(LINK(this, ScCheckListMenuControl, MouseEnterHdl)); mxBtnUnselectSingle->connect_mouse_move(LINK(this, ScCheckListMenuControl, MouseEnterHdl)); mxBtnOk->connect_mouse_move(LINK(this, ScCheckListMenuControl, MouseEnterHdl)); @@ -601,6 +605,7 @@ ScCheckListMenuControl::ScCheckListMenuControl(weld::Widget* pParent, ScViewData mxListChecks->connect_toggled(LINK(this, ScCheckListMenuControl, CheckHdl)); mxListChecks->connect_key_press(LINK(this, ScCheckListMenuControl, KeyInputHdl)); mxChkToggleAll->connect_toggled(LINK(this, ScCheckListMenuControl, TriStateHdl)); +mxChkLockChecked->connect_toggled(LINK(this, ScCheckListMenuControl, LockCheckedHdl)); mxBtnSelectSingle->connect_clicked(LINK(this, ScCheckListMenuControl, ButtonHdl)); mxBtnUnselectSingle->connect_clicked(LINK(this, ScCheckListMenuControl, ButtonHdl)); @@ -745,6 +750,104 @@ IMPL_LINK(ScCheckListMenuControl, ButtonHdl, weld::Button&, rBtn, void) } } +namespace +{ +void insertMember(weld::TreeView& rView, const weld::TreeIter& rIter, const ScCheckListMember& rMember, bool bChecked, bool bLock=false) +{ +OUString aLabel = rMember.maName; +if (aLabel.isEmpty()) +aLabel = ScResId(STR_EMPTYDATA); +rView.set_toggle(rIter, bChecked ? TRISTATE_TRUE : TRISTATE_FALSE); +rView.set_text(rIter, aLabel, 0); + +if (bLock) +rView.set_sensitive(rIter, !rMember.mbHiddenByOtherFilter && !rMember.mbMarked); +else +rView.set_sensitive(rIter, !rMember.mbHiddenByOtherFilter); +} + +void loadSearchedMembers(std::vector& rSearchedMembers, std::vector& rMembers, + const OUString& rSearchText, bool bLock=false) +{ +const OUString aSearchText = ScGlobal::getCharClass().lowercase( rSearchText ); + +for (size_t i = 0; i < rMembers.size(); ++i) +{ +assert(!rMembers[i].mbDate); + +OUString aLabelDisp = rMembers[i].maName; +if ( aLabelDisp.isEmpty() ) +aLabelDisp = ScResId( STR_EMPTYDATA ); + +bool bPartialMatch = ScGlobal::getCharClass().lowercase( aLabelDisp ).indexOf( aSearchText ) != -1; + +if (!bPartialMatch) +continue; +if (!bLock || (!rMembers[i].mbMarked && !rMembers[i].mbHiddenByOtherFilter)) +rSearchedMembers.push_back(i); +} + +if (bLock) +for (size_t i = 0; i < rMembers.size(); ++i) +if (rMembers[i].mbMarked &&
core.git: cui/source cui/uiconfig include/svtools officecfg/registry sc/source svtools/source
cui/source/options/optcolor.cxx|1 cui/uiconfig/ui/colorconfigwin.ui | 97 +++-- include/svtools/colorcfg.hxx |1 officecfg/registry/data/org/openoffice/Office/UI.xcu |5 officecfg/registry/schema/org/openoffice/Office/UI.xcs | 10 + sc/source/ui/view/gridwin.cxx |6 - sc/source/ui/view/hdrcont.cxx |6 - sc/source/ui/view/tabvwsh4.cxx | 44 +-- svtools/source/config/colorcfg.cxx |6 + 9 files changed, 131 insertions(+), 45 deletions(-) New commits: commit 4377341dd287b863573bb40ed77e2e2caa92b358 Author: Sahil AuthorDate: Mon Jan 15 08:02:38 2024 +0530 Commit: Heiko Tietze CommitDate: Tue Jan 23 11:27:43 2024 +0100 tdf#158891 Make cell cursor more accessible for color blind * Add an option to configure the accent color, which is blue by default might not be visible to color blind people. Change-Id: I72cbb0f57e864407a7c9315b5c46645a891d4764 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162055 Tested-by: Heiko Tietze Reviewed-by: Heiko Tietze Tested-by: Jenkins diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx index 7bb8b2f44ea5..d2c94669fa9f 100644 --- a/cui/source/options/optcolor.cxx +++ b/cui/source/options/optcolor.cxx @@ -132,6 +132,7 @@ const vEntryInfo[] = { Group_Html,IDS(unknown), std::u16string_view(u"/HTMLUnknown") }, { Group_Calc,IDS(calcgrid), std::u16string_view(u"/CalcGrid") }, +{ Group_Calc,IDS(calccellfocus), std::u16string_view(u"/CalcCellFocus") }, { Group_Calc,IDS(brk), std::u16string_view(u"/CalcPageBreak") }, { Group_Calc,IDS(brkmanual), std::u16string_view(u"/CalcPageBreakManual") }, { Group_Calc,IDS(brkauto), std::u16string_view(u"/CalcPageBreakAutomatic") }, diff --git a/cui/uiconfig/ui/colorconfigwin.ui b/cui/uiconfig/ui/colorconfigwin.ui index bc5603ef6651..d81a14520b66 100644 --- a/cui/uiconfig/ui/colorconfigwin.ui +++ b/cui/uiconfig/ui/colorconfigwin.ui @@ -847,7 +847,7 @@ 0 none - + True False @@ -901,7 +901,7 @@ 0 -1 +2 @@ -919,7 +919,7 @@ 1 -1 +2 @@ -934,7 +934,7 @@ 0 -2 +3 @@ -952,7 +952,7 @@ 1 -2 +3 @@ -967,7 +967,7 @@ 0 -3 +4 @@ -985,7 +985,7 @@ 1 -3 +4 @@ -1000,7 +1000,7 @@ 0 -7 +8 @@ -1018,7 +1018,7 @@ 1 -7 +8 @@ -1036,7 +1036,7 @@ 1 -8 +9 @@ -1051,7 +1051,7 @@ 0 -8 +9 @@ -1069,7 +1069,7 @@ 1 -9 +10 @@ -1084,7 +1084,7 @@ 0 -9 +10 @@ -1102,7 +1102,7 @@ 1 -10 +11 @@ -1117,7 +1117,7 @@ 0 -10 +11 @@ -1135,7 +1135,7 @@ 1 -11 +12 @@ -1150,7 +1150,7 @@ 0 -11 +12 @@ -1168,7 +1168,7 @@ 1 -12 +13 @@ -1183,7 +1183,7 @@
core.git: sc/source sc/uiconfig
sc/source/ui/cctrl/tbzoomsliderctrl.cxx | 30 +++- sc/source/ui/inc/tbzoomsliderctrl.hxx |5 sc/uiconfig/scalc/ui/zoombox.ui | 34 3 files changed, 56 insertions(+), 13 deletions(-) New commits: commit 986b5bb3c183b038ecc1ce4e16cff1dca837932a Author: Sahil AuthorDate: Thu Jan 4 16:47:17 2024 +0530 Commit: Heiko Tietze CommitDate: Wed Jan 10 18:01:24 2024 +0100 tdf#42030 Add UI label for page preview zoom slider * Scale before the page preview zoom slider * zoom % after the page preview zoom slider Change-Id: I893852bf48e31b36a028f9ee282d47a627bb0086 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159362 Tested-by: Jenkins Reviewed-by: Heiko Tietze diff --git a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx index 4ec776de100c..d14dd1cb08c0 100644 --- a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx +++ b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #include +#include +#include #include #include @@ -102,8 +104,7 @@ const tools::Long nSnappingPointsMinDist = nSnappingEpsilon; // minimum distance sal_uInt16 ScZoomSlider::Offset2Zoom( tools::Long nOffset ) const { -Size aSliderWindowSize = GetOutputSizePixel(); -const tools::Long nControlWidth = aSliderWindowSize.Width(); +const tools::Long nControlWidth = GetSliderLength(); sal_uInt16 nRet = 0; if( nOffset < nSliderXOffset ) @@ -154,8 +155,7 @@ sal_uInt16 ScZoomSlider::Offset2Zoom( tools::Long nOffset ) const tools::Long ScZoomSlider::Zoom2Offset( sal_uInt16 nCurrentZoom ) const { -Size aSliderWindowSize = GetOutputSizePixel(); -const tools::Long nControlWidth = aSliderWindowSize.Width(); +const tools::Long nControlWidth = GetSliderLength(); tools::Long nRect = nSliderXOffset; const tools::Long nHalfSliderWidth = nControlWidth/2 - nSliderXOffset; @@ -183,6 +183,8 @@ ScZoomSliderWnd::ScZoomSliderWnd( vcl::Window* pParent, sal_uInt16 nCurrentZoom ): InterimItemWindow(pParent, "modules/scalc/ui/zoombox.ui", "ZoomBox"), mxWidget(new ScZoomSlider(rDispatchProvider, nCurrentZoom)), +mxPercentage(m_xBuilder->weld_label("current_zoom")), +mxLabel(m_xBuilder->weld_label("zoom_label")), mxWeld(new weld::CustomWeld(*m_xBuilder, "zoom", *mxWidget)) { Size aLogicalSize( 115, 40 ); @@ -190,7 +192,14 @@ ScZoomSliderWnd::ScZoomSliderWnd( vcl::Window* pParent, Size aPreferredSize(aSliderSize.Width() * nSliderWidth-1, aSliderSize.Height() + nSliderHeight); mxWidget->GetDrawingArea()->set_size_request(aPreferredSize.Width(), aPreferredSize.Height()); mxWidget->SetOutputSizePixel(aPreferredSize); +mxWidget->SetSliderLength(aPreferredSize.Width() + nIncDecWidth); + +aPreferredSize.setWidth(aPreferredSize.Width() + mxLabel->get_pixel_size(mxLabel->get_label()).Width() + + mxPercentage->get_pixel_size(mxPercentage->get_label()).Width()); + SetSizePixel(aPreferredSize); +OUString sCurrentZoom(unicode::formatPercent(nCurrentZoom, Application::GetSettings().GetUILanguageTag())); +mxPercentage->set_label(sCurrentZoom); } ScZoomSliderWnd::~ScZoomSliderWnd() @@ -236,12 +245,12 @@ bool ScZoomSlider::MouseButtonDown( const MouseEvent& rMEvt ) mnCurrentZoom = mnCurrentZoom - 5; } // click to + button -else if ( aPoint.X() >= aSliderWindowSize.Width() - nSliderXOffset + nButtonLeftOffset && - aPoint.X() <= aSliderWindowSize.Width() - nSliderXOffset + nButtonRightOffset ) +else if ( aPoint.X() >= GetSliderLength() - nSliderXOffset + nButtonLeftOffset && + aPoint.X() <= GetSliderLength() - nSliderXOffset + nButtonRightOffset ) { mnCurrentZoom = mnCurrentZoom + 5; } -else if( aPoint.X() >= nSliderXOffset && aPoint.X() <= aSliderWindowSize.Width() - nSliderXOffset ) +else if( aPoint.X() >= nSliderXOffset && aPoint.X() <= GetSliderLength() - nSliderXOffset ) { mnCurrentZoom = Offset2Zoom( aPoint.X() ); } @@ -276,7 +285,7 @@ bool ScZoomSlider::MouseButtonDown( const MouseEvent& rMEvt ) bool ScZoomSlider::MouseMove( const MouseEvent& rMEvt ) { Size aSliderWindowSize = GetOutputSizePixel(); -const tools::Long nControlWidth = aSliderWindowSize.Width(); +const tools::Long nControlWidth = GetSliderLength(); const short nButtons = rMEvt.GetButtons(); // check mouse move with button pressed @@ -312,6 +321,8 @@ bool ScZoomSlider::MouseMove( const MouseEvent& rMEvt ) void ScZoomSliderWnd::UpdateFromItem( const SvxZoomSliderItem* pZoomSliderItem ) { +OUString sCurrentZoom(unicode::formatPercent(pZoomSliderItem->GetValue(), Application::GetSettings().GetUILanguageTag())); +
core.git: sc/inc sc/qa sc/source
sc/inc/document.hxx |4 +-- sc/inc/table.hxx |2 - sc/qa/unit/ucalc_condformat.cxx | 38 +++--- sc/source/core/data/documen4.cxx | 10 +++ sc/source/core/data/table1.cxx|2 - sc/source/filter/excel/xicontent.cxx |2 - sc/source/filter/oox/condformatbuffer.cxx |2 - sc/source/filter/xml/xmlcondformat.cxx|2 - sc/source/filter/xml/xmlstyli.cxx |2 - sc/source/ui/docshell/docfunc.cxx |2 - sc/source/ui/docshell/docsh6.cxx |2 - 11 files changed, 34 insertions(+), 34 deletions(-) New commits: commit 0decafad011cf84cf9cc7d8bdcad6d7ebfba6073 Author: sahil AuthorDate: Wed Aug 23 18:05:53 2023 +0530 Commit: Hossein CommitDate: Tue Jan 9 19:56:26 2024 +0100 tdf#114441 - Convert sal_uLong to better integer types Change-Id: I55c758f6391cecb261adca79ae1b93006bcae806 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155979 Tested-by: Jenkins Reviewed-by: Hossein diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 5a92140973a5..55d0b57cd914 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -1886,11 +1886,11 @@ public: voidClearSelectionItems( const sal_uInt16* pWhich, const ScMarkData& rMark ); voidChangeSelectionIndent( bool bIncrement, const ScMarkData& rMark ); -SC_DLLPUBLIC sal_uLong AddCondFormat( std::unique_ptr pNew, SCTAB nTab ); +SC_DLLPUBLIC sal_uInt32 AddCondFormat( std::unique_ptr pNew, SCTAB nTab ); voidDeleteConditionalFormat( sal_uLong nIndex, SCTAB nTab ); voidSetCondFormList( ScConditionalFormatList* pList, SCTAB nTab ); -SC_DLLPUBLIC sal_uLong AddValidationEntry( const ScValidationData& rNew ); +SC_DLLPUBLIC sal_uInt32 AddValidationEntry( const ScValidationData& rNew ); SC_DLLPUBLIC const ScValidationData*GetValidationEntry( sal_uInt32 nIndex ) const; SC_DLLPUBLIC ScConditionalFormatList* GetCondFormList( SCTAB nTab ) const; diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index 8f749a273707..1761d0cdeed4 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -1065,7 +1065,7 @@ public: void DeleteConditionalFormat(sal_uLong nOldIndex); -sal_uLong AddCondFormat( std::unique_ptr pNew ); +sal_uInt32 AddCondFormat( std::unique_ptr pNew ); SvtScriptType GetScriptType( SCCOL nCol, SCROW nRow ) const; void SetScriptType( SCCOL nCol, SCROW nRow, SvtScriptType nType ); diff --git a/sc/qa/unit/ucalc_condformat.cxx b/sc/qa/unit/ucalc_condformat.cxx index 7a0abc7cf026..a9c289c0aca8 100644 --- a/sc/qa/unit/ucalc_condformat.cxx +++ b/sc/qa/unit/ucalc_condformat.cxx @@ -188,7 +188,7 @@ CPPUNIT_TEST_FIXTURE(TestCondformat, testCondFormatInsertDeleteSheets) pFormat->SetRange(ScRange(1,1,0,1,3,0)); auto pFormatTmp = pFormat.get(); -sal_uLong nKey = m_pDoc->AddCondFormat(std::move(pFormat), 0); +sal_uInt32 nKey = m_pDoc->AddCondFormat(std::move(pFormat), 0); // Add condition in which if the value equals 2, set the "Result" style. ScCondFormatEntry* pEntry = new ScCondFormatEntry( @@ -305,7 +305,7 @@ CPPUNIT_TEST_FIXTURE(TestCondformat, testDataBarCondCopyPaste) pDatabar->SetDataBarData(pFormatData); pFormat->AddEntry(pDatabar); -sal_uLong nIndex = m_pDoc->AddCondFormat(std::move(pFormat), 0); +sal_uInt32 nIndex = m_pDoc->AddCondFormat(std::move(pFormat), 0); ScDocument aClipDoc(SCDOCMODE_CLIP); copyToClip(m_pDoc, aCondFormatRange, ); @@ -324,14 +324,14 @@ CPPUNIT_TEST_FIXTURE(TestCondformat, testDataBarCondCopyPaste) CPPUNIT_ASSERT(pPastedFormat); CPPUNIT_ASSERT_EQUAL(aRangeList, pPastedFormat->GetRange()); -sal_uLong nPastedKey = pPastedFormat->GetKey(); +sal_uInt32 nPastedKey = pPastedFormat->GetKey(); CPPUNIT_ASSERT_EQUAL(nIndex, nPastedKey); const SfxPoolItem* pItem = m_pDoc->GetAttr(nCol, 3, 0, ATTR_CONDITIONAL); const ScCondFormatItem* pCondFormatItem = static_cast(pItem); CPPUNIT_ASSERT(pCondFormatItem); CPPUNIT_ASSERT_EQUAL(size_t(1), pCondFormatItem->GetCondFormatData().size()); -CPPUNIT_ASSERT_EQUAL(sal_uInt32(nIndex), pCondFormatItem->GetCondFormatData().front()); +CPPUNIT_ASSERT_EQUAL(nIndex, pCondFormatItem->GetCondFormatData().front()); } m_pDoc->DeleteTab(0); @@ -346,7 +346,7 @@ CPPUNIT_TEST_FIXTURE(TestCondformat, testColorScaleInMergedCell) auto pFormat = std::make_unique(1, m_pDoc); pFormat->SetRange(ScRange(0, 0, 0, 0, 0, 0)); auto pFormatTmp = pFormat.get(); -sal_uLong nKey = m_pDoc->AddCondFormat(std::move(pFormat), 0); +sal_uInt32 nKey = m_pDoc->AddCondFormat(std::move(pFormat), 0); // Add color scale entries. //
core.git: officecfg/registry
officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu|2 +- officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit 68d074fb910de7298cbefb6a3c3e192dae201837 Author: Sahil AuthorDate: Fri Dec 22 04:53:15 2023 +0530 Commit: Heiko Tietze CommitDate: Fri Dec 22 08:15:17 2023 +0100 tdf#136003 Make Delete Rows/Columns labels more descriptive Delete Rows/Columns is only allowed for unprotected cells. Change-Id: I0c3b9d79a329a5b540018e350f114a1807ce649e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160834 Tested-by: Jenkins Reviewed-by: Heiko Tietze diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu index 723ece46d7ce..ad4508627230 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu @@ -1241,7 +1241,7 @@ - Delete Rows + Delete Rows (for unprotected cells) 1 diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu index 98332bbb434e..7d596b8e2319 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu @@ -7120,7 +7120,7 @@ bit 3 (0x8): #define UICOMMANDDESCRIPTION_PROPERTIES_TOGGLEBUTTON 8 Delete Columns - Delete ~Columns + Delete ~Columns (for unprotected cells) Delete selected columns
core.git: Branch 'libreoffice-24-2' - 2 commits - officecfg/registry sc/inc sc/sdi sc/source sc/uiconfig sw/source
officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu |8 +++ officecfg/registry/schema/org/openoffice/Office/Writer.xcs|7 +++ sc/inc/sc.hrc |1 sc/sdi/scalc.sdi | 18 +++ sc/sdi/tabvwsh.sdi|1 sc/source/ui/view/tabvwsh3.cxx| 13 + sc/source/ui/view/tabvwsha.cxx|7 +++ sc/uiconfig/scalc/menubar/menubar.xml |1 sw/source/uibase/inc/navicfg.hxx | 12 + sw/source/uibase/utlui/content.cxx| 23 -- sw/source/uibase/utlui/navicfg.cxx|5 +- 11 files changed, 92 insertions(+), 4 deletions(-) New commits: commit 4dc019cc752013692b74df7d110f415533f4dd12 Author: Sahil AuthorDate: Sat Dec 9 22:03:33 2023 +0530 Commit: Xisco Fauli CommitDate: Fri Dec 15 09:01:18 2023 +0100 tdf#33201 Add UNO command for Column/Row Highlighting * Add uno command * Add menubar Entry [x] Column/Row Highlighting under View Change-Id: I86cb0034d5bd7d64bd6bfd64cf6e20507d14e5fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159364 Reviewed-by: Mike Kaganski Tested-by: Jenkins (cherry picked from commit d981ee6256a905eb8a45557869288a06eb5ae0fc) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160641 Reviewed-by: Xisco Fauli diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu index fe726492ffb4..723ece46d7ce 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu @@ -1378,6 +1378,14 @@ 1 + + + Column/Row Highlighting + + + 1 + + Show Hidden Row/Column Indicator diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc index f9c04a6e2e53..f6f445fc5a2e 100644 --- a/sc/inc/sc.hrc +++ b/sc/inc/sc.hrc @@ -277,6 +277,7 @@ class SvxZoomSliderItem; #define FID_TOGGLEHEADERS (VIEW_MENU_START + 2) #define FID_SCALE TypedWhichId(VIEW_MENU_START + 4) #define FID_TOGGLESYNTAX(VIEW_MENU_START + 5) +#define FID_TOGGLECOLROWHIGHLIGHTING (VIEW_MENU_START + 6) #define FID_PAGEBREAKMODE (VIEW_MENU_START + 7) #define FID_FUNCTION_BOX(VIEW_MENU_START + 8) #define FID_NORMALVIEWMODE (VIEW_MENU_START + 9) diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi index 614293cc90bb..d26e99ce2f5d 100644 --- a/sc/sdi/scalc.sdi +++ b/sc/sdi/scalc.sdi @@ -6054,6 +6054,24 @@ SfxBoolItem ViewValueHighlighting FID_TOGGLESYNTAX GroupId = SfxGroupId::View; ] +SfxBoolItem ViewColumnRowHighlighting FID_TOGGLECOLROWHIGHLIGHTING + +[ +AutoUpdate = FALSE, +FastCall = FALSE, +ReadOnlyDoc = TRUE, +Toggle = FALSE, +Container = FALSE, +RecordAbsolute = FALSE, +RecordPerSet; + + +AccelConfig = TRUE, +MenuConfig = TRUE, +ToolBoxConfig = FALSE, +GroupId = SfxGroupId::View; +] + SfxBoolItem ViewHiddenColRow FID_TOGGLEHIDDENCOLROW [ diff --git a/sc/sdi/tabvwsh.sdi b/sc/sdi/tabvwsh.sdi index e1da8b2f5d14..7130ff4cabd8 100644 --- a/sc/sdi/tabvwsh.sdi +++ b/sc/sdi/tabvwsh.sdi @@ -174,6 +174,7 @@ interface TableEditView FID_SCALESTATUS [ ExecMethod = Execute; StateMethod = GetState; ] FID_TOGGLESYNTAX[ ExecMethod = Execute; StateMethod = GetState; ] +FID_TOGGLECOLROWHIGHLIGHTING [ ExecMethod = Execute; StateMethod = GetState; ] FID_TOGGLEHEADERS [ ExecMethod = Execute; StateMethod = GetState; ] FID_TOGGLEFORMULA [ ExecMethod = Execute; StateMethod = GetState; ] FID_NORMALVIEWMODE [ ExecMethod = Execute; StateMethod = GetState; ] diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx index 60754c58baff..208748b7110f 100644 --- a/sc/source/ui/view/tabvwsh3.cxx +++ b/sc/source/ui/view/tabvwsh3.cxx @@ -56,6 +56,7 @@ #include #include #include +#include #include @@ -696,6 +697,18 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) rReq.Done(); } break; +case FID_TOGGLECOLROWHIGHLIGHTING: +{ +bool bNewVal = !officecfg::Office::Calc::Content::Display::ColumnRowHighlighting::get(); + +auto pChange(comphelper::ConfigurationChanges::create()); + officecfg::Office::Calc::Content::Display::ColumnRowHighlighting::set(bNewVal, pChange); +pChange->commit(); + +rReq.AppendItem(SfxBoolItem(nSlot, bNewVal)); +rReq.Done(); +} +break; case FID_TOGGLEHEADERS:
core.git: officecfg/registry sc/inc sc/sdi sc/source sc/uiconfig
officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu |8 sc/inc/sc.hrc |1 sc/sdi/scalc.sdi | 18 ++ sc/sdi/tabvwsh.sdi|1 sc/source/ui/view/tabvwsh3.cxx| 13 +++ sc/source/ui/view/tabvwsha.cxx|7 +++ sc/uiconfig/scalc/menubar/menubar.xml |1 7 files changed, 49 insertions(+) New commits: commit d981ee6256a905eb8a45557869288a06eb5ae0fc Author: Sahil AuthorDate: Sat Dec 9 22:03:33 2023 +0530 Commit: Mike Kaganski CommitDate: Tue Dec 12 22:18:05 2023 +0100 tdf#33201 Add UNO command for Column/Row Highlighting * Add uno command * Add menubar Entry [x] Column/Row Highlighting under View Change-Id: I86cb0034d5bd7d64bd6bfd64cf6e20507d14e5fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159364 Reviewed-by: Mike Kaganski Tested-by: Jenkins diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu index fe726492ffb4..723ece46d7ce 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu @@ -1378,6 +1378,14 @@ 1 + + + Column/Row Highlighting + + + 1 + + Show Hidden Row/Column Indicator diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc index f9c04a6e2e53..f6f445fc5a2e 100644 --- a/sc/inc/sc.hrc +++ b/sc/inc/sc.hrc @@ -277,6 +277,7 @@ class SvxZoomSliderItem; #define FID_TOGGLEHEADERS (VIEW_MENU_START + 2) #define FID_SCALE TypedWhichId(VIEW_MENU_START + 4) #define FID_TOGGLESYNTAX(VIEW_MENU_START + 5) +#define FID_TOGGLECOLROWHIGHLIGHTING (VIEW_MENU_START + 6) #define FID_PAGEBREAKMODE (VIEW_MENU_START + 7) #define FID_FUNCTION_BOX(VIEW_MENU_START + 8) #define FID_NORMALVIEWMODE (VIEW_MENU_START + 9) diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi index 614293cc90bb..d26e99ce2f5d 100644 --- a/sc/sdi/scalc.sdi +++ b/sc/sdi/scalc.sdi @@ -6054,6 +6054,24 @@ SfxBoolItem ViewValueHighlighting FID_TOGGLESYNTAX GroupId = SfxGroupId::View; ] +SfxBoolItem ViewColumnRowHighlighting FID_TOGGLECOLROWHIGHLIGHTING + +[ +AutoUpdate = FALSE, +FastCall = FALSE, +ReadOnlyDoc = TRUE, +Toggle = FALSE, +Container = FALSE, +RecordAbsolute = FALSE, +RecordPerSet; + + +AccelConfig = TRUE, +MenuConfig = TRUE, +ToolBoxConfig = FALSE, +GroupId = SfxGroupId::View; +] + SfxBoolItem ViewHiddenColRow FID_TOGGLEHIDDENCOLROW [ diff --git a/sc/sdi/tabvwsh.sdi b/sc/sdi/tabvwsh.sdi index e1da8b2f5d14..7130ff4cabd8 100644 --- a/sc/sdi/tabvwsh.sdi +++ b/sc/sdi/tabvwsh.sdi @@ -174,6 +174,7 @@ interface TableEditView FID_SCALESTATUS [ ExecMethod = Execute; StateMethod = GetState; ] FID_TOGGLESYNTAX[ ExecMethod = Execute; StateMethod = GetState; ] +FID_TOGGLECOLROWHIGHLIGHTING [ ExecMethod = Execute; StateMethod = GetState; ] FID_TOGGLEHEADERS [ ExecMethod = Execute; StateMethod = GetState; ] FID_TOGGLEFORMULA [ ExecMethod = Execute; StateMethod = GetState; ] FID_NORMALVIEWMODE [ ExecMethod = Execute; StateMethod = GetState; ] diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx index 60754c58baff..208748b7110f 100644 --- a/sc/source/ui/view/tabvwsh3.cxx +++ b/sc/source/ui/view/tabvwsh3.cxx @@ -56,6 +56,7 @@ #include #include #include +#include #include @@ -696,6 +697,18 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) rReq.Done(); } break; +case FID_TOGGLECOLROWHIGHLIGHTING: +{ +bool bNewVal = !officecfg::Office::Calc::Content::Display::ColumnRowHighlighting::get(); + +auto pChange(comphelper::ConfigurationChanges::create()); + officecfg::Office::Calc::Content::Display::ColumnRowHighlighting::set(bNewVal, pChange); +pChange->commit(); + +rReq.AppendItem(SfxBoolItem(nSlot, bNewVal)); +rReq.Done(); +} +break; case FID_TOGGLEHEADERS: { bool bSet = !GetViewData().IsHeaderMode(); diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx index 84a3acbcdf44..c332c9542a66 100644 --- a/sc/source/ui/view/tabvwsha.cxx +++ b/sc/source/ui/view/tabvwsha.cxx @@ -18,6 +18,7 @@ */ #include +#include #include #include @@ -378,6 +379,12 @@ void ScTabViewShell::GetState( SfxItemSet& rSet ) rSet.Put(SfxBoolItem(nWhich, GetViewData().IsSyntaxMode()));
core.git: sc/source
sc/source/ui/view/tabvwsh4.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 6e712d5bfaf8b14aacddf903d616447ef22e14f7 Author: Sahil AuthorDate: Sat Dec 9 20:02:19 2023 +0530 Commit: Mike Kaganski CommitDate: Sun Dec 10 10:29:31 2023 +0100 tdf#33210 Directly call the method, as it is inherited ScTabViewShell inherits ScTabView, therefore HighlightOverlay() can directly be called from ScTabViewShell instance. Change-Id: I3804ee2fd8598a338bbafe01df7756190ade660c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159365 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx index 2989d63b5f99..4b849ee7637d 100644 --- a/sc/source/ui/view/tabvwsh4.cxx +++ b/sc/source/ui/view/tabvwsh4.cxx @@ -1717,7 +1717,7 @@ void SAL_CALL ScViewOptiChangesListener::changesOccurred(const util::ChangesEven if (OUString sChangedEntry; (change.Accessor >>= sChangedEntry) && sChangedEntry == "ColumnRowHighlighting") { -mrViewShell.GetViewData().GetView()->HighlightOverlay(); +mrViewShell.HighlightOverlay(); break; } }
core.git: sc/source
sc/source/ui/inc/tabvwsh.hxx |2 + sc/source/ui/view/tabvwsh4.cxx | 65 + 2 files changed, 67 insertions(+) New commits: commit cad62803ba39c560a3e5bc3a51300cc1136b5afd Author: Sahil AuthorDate: Sun Dec 3 05:48:20 2023 +0530 Commit: Mike Kaganski CommitDate: Sat Dec 9 08:18:27 2023 +0100 tdf#33210 Add Listener for ColumnRowHighlighting changes Listener updates Column/Row highlight if the expert configuration is changed Change-Id: Ibc220c4dd8f0b253029c7a0e54dd08f54f573114 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160152 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx index b537af6900d2..dc05f235c990 100644 --- a/sc/source/ui/inc/tabvwsh.hxx +++ b/sc/source/ui/inc/tabvwsh.hxx @@ -91,8 +91,10 @@ enum ObjectSelectionType }; class ScFormEditData; +class ScViewOptiChangesListener; class SC_DLLPUBLIC ScTabViewShell : public SfxViewShell, public ScDBFunc { +rtl::Reference mChangesListener; private: struct SendFormulabarUpdate { diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx index 345a33534d1c..986be06b4041 100644 --- a/sc/source/ui/view/tabvwsh4.cxx +++ b/sc/source/ui/view/tabvwsh4.cxx @@ -80,6 +80,8 @@ #include #include +#include +#include #include #include #include @@ -1687,6 +1689,65 @@ void ScTabViewShell::Construct( TriState nForceDesignMode ) SetBorderPixel( aBorder ); } +class ScViewOptiChangesListener : public cppu::WeakImplHelper +{ +public: +ScViewOptiChangesListener(ScTabViewShell&); +void stopListening(); + +virtual void SAL_CALL changesOccurred(const util::ChangesEvent& Event) override; +virtual void SAL_CALL disposing(const lang::EventObject& rEvent) override; + +private: +ScTabViewShell& mrViewShell; +uno::Reference m_xChangesNotifier; +}; + +void ScViewOptiChangesListener::stopListening() +{ +if (m_xChangesNotifier.is()) +m_xChangesNotifier->removeChangesListener(this); +} + +// virtual +void SAL_CALL ScViewOptiChangesListener::changesOccurred(const util::ChangesEvent& rEvent) +{ +OUString sChangedEntry; +rEvent.Changes[0].Accessor >>= sChangedEntry; + +if (sChangedEntry == "Display/ColumnRowHighlighting") +mrViewShell.GetViewData().GetView()->HighlightOverlay(); +} + +// virtual +void SAL_CALL ScViewOptiChangesListener::disposing(const lang::EventObject& /* rEvent */) +{ +m_xChangesNotifier.clear(); +} + +ScViewOptiChangesListener::ScViewOptiChangesListener(ScTabViewShell& rViewShell) +: mrViewShell(rViewShell) +{ +// add a listener for configuration changes (ColumnRowHighlighting Checkbox) +uno::Reference xConfigurationProvider( + configuration::theDefaultProvider::get(comphelper::getProcessComponentContext())); + +beans::NamedValue aProperty; +aProperty.Name = "nodepath"; +aProperty.Value <<= OUString("/org.openoffice.Office.Calc/Content"); + +uno::Sequence aArgumentList{ uno::Any(aProperty) }; + +uno::Reference xConfigurationAccess += xConfigurationProvider->createInstanceWithArguments( +"com.sun.star.configuration.ConfigurationAccess", aArgumentList); + +m_xChangesNotifier.set(xConfigurationAccess, uno::UNO_QUERY); + +if (m_xChangesNotifier.is()) +m_xChangesNotifier->addChangesListener(this); +} + ScTabViewShell::ScTabViewShell( SfxViewFrame& rViewFrame, SfxViewShell* pOldSh ) : SfxViewShell(rViewFrame, SfxViewShellFlags::HAS_PRINTOPTIONS), @@ -1772,6 +1833,8 @@ ScTabViewShell::ScTabViewShell( SfxViewFrame& rViewFrame, if (bInstalledScTabViewObjAsTempController) GetViewData().GetDocShell()->GetModel()->setCurrentController(nullptr); +mChangesListener.set(new ScViewOptiChangesListener(*this)); + // formula mode in online is not usable in collaborative mode, // this is a workaround for disabling formula mode in online // when there is more than a single view @@ -1813,6 +1876,8 @@ ScTabViewShell::ScTabViewShell( SfxViewFrame& rViewFrame, ScTabViewShell::~ScTabViewShell() { bInDispose = true; +mChangesListener->stopListening(); +mChangesListener.clear(); // Notify other LOK views that we are going away. SfxLokHelper::notifyOtherViews(this, LOK_CALLBACK_VIEW_CURSOR_VISIBLE, "visible", "false"_ostr);
core.git: sc/source
sc/source/ui/inc/tabview.hxx |2 +- sc/source/ui/view/tabview3.cxx | 17 - 2 files changed, 9 insertions(+), 10 deletions(-) New commits: commit 0e942c11e074244224a9968046da105dc62656e8 Author: Sahil AuthorDate: Wed Nov 29 15:38:10 2023 +0530 Commit: Mike Kaganski CommitDate: Thu Dec 7 12:03:17 2023 +0100 tdf#33201 Move Cell position logic inside the function Previously to Highlight some cell's row/column, one had to get the current cell cursor position, and pass it to HighlightOverlay(), but now that is not required. Change-Id: I4d08bf1fa84fcbd4820fd166c1d137bd3d950413 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160151 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx index 8c69933cc1af..23419f463923 100644 --- a/sc/source/ui/inc/tabview.hxx +++ b/sc/source/ui/inc/tabview.hxx @@ -566,7 +566,7 @@ public: * @param nModifier: 0, KEY_SHIFT, KEY_MOD1, KEY_SHIFT | KEY_MOD1 */ voidMarkRows(SCROW nRow, sal_Int16 nModifier); -voidHighlightOverlay(const ScAddress& rCell); +voidHighlightOverlay(); voidMarkDataArea( bool bIncludeCursor = true ); voidMarkMatrixFormula(); diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx index 96209c1a123d..4a78aa38e710 100644 --- a/sc/source/ui/view/tabview3.cxx +++ b/sc/source/ui/view/tabview3.cxx @@ -376,8 +376,7 @@ void ScTabView::SetCursor( SCCOL nPosX, SCROW nPosY, bool bNew ) if ( !(nPosX != nOldX || nPosY != nOldY || bNew) ) { -ScAddress aCell = GetViewData().GetCurPos(); -HighlightOverlay(aCell); +HighlightOverlay(); return; } @@ -395,8 +394,7 @@ void ScTabView::SetCursor( SCCOL nPosX, SCROW nPosY, bool bNew ) ShowAllCursors(); -ScAddress aCell = aViewData.GetCurPos(); -HighlightOverlay(aCell); +HighlightOverlay(); CursorPosChanged(); @@ -1692,7 +1690,7 @@ void ScTabView::MarkRows(SCROW nRow, sal_Int16 nModifier) } } -void ScTabView::HighlightOverlay(const ScAddress& rCell) +void ScTabView::HighlightOverlay() { if (!officecfg::Office::Calc::Content::Display::ColumnRowHighlighting::get()) { @@ -1701,15 +1699,16 @@ void ScTabView::HighlightOverlay(const ScAddress& rCell) return; } -SCROW nRow = rCell.Row(); -SCCOL nCol = rCell.Col(); +ScAddress aCell = GetViewData().GetCurPos(); +SCROW nRow = aCell.Row(); +SCCOL nCol = aCell.Col(); bool nModifier = false; // modifier key pressed? DoneBlockModeHighlight( nModifier ); -InitBlockModeHighlight( nCol, 0, rCell.Tab(), true, false); +InitBlockModeHighlight( nCol, 0, aCell.Tab(), true, false); nModifier = true; DoneBlockModeHighlight( nModifier ); -InitBlockModeHighlight( 0, nRow, rCell.Tab(), false, true ); +InitBlockModeHighlight( 0, nRow, aCell.Tab(), false, true ); } void ScTabView::MarkDataArea( bool bIncludeCursor )
[Libreoffice-commits] core.git: sc/source
sc/source/ui/view/gridwin.cxx |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) New commits: commit b6f274f3d0a415e84cda45f5929d89130974ee2d Author: Sahil AuthorDate: Tue Nov 21 16:54:57 2023 +0530 Commit: Heiko Tietze CommitDate: Mon Nov 27 12:56:31 2023 +0100 tdf#33201 Change default HighlightOverlay color Change-Id: I734b780808da35cdc58c55ede914f87e96fbdd99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159778 Tested-by: Jenkins Reviewed-by: Heiko Tietze diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 67568e2ce21a..3f4f6b219c67 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -6719,11 +6719,13 @@ void ScGridWindow::UpdateHighlightOverlay() } } -const Color aHighlight = SC_MOD()->GetColorConfig().GetColorValue(svtools::APPBACKGROUND ).nColor; +const Color aBackgroundColor = SC_MOD()->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor; +Color aHighlightColor = Application::GetSettings().GetStyleSettings().GetAccentColor(); +aHighlightColor.Merge(aBackgroundColor, 100); std::unique_ptr pOverlay(new sdr::overlay::OverlaySelection( sdr::overlay::OverlayType::Transparent, -aHighlight, +aHighlightColor, std::move(aRanges), false));
[Libreoffice-commits] core.git: 2 commits - include/vcl sc/source sw/qa vcl/source
include/vcl/seleng.hxx | 12 ++-- sc/source/ui/inc/select.hxx |2 +- sc/source/ui/view/select.cxx | 12 ++-- sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx | 15 +++ sw/qa/core/accessibilitycheck/data/TOCHyperlinkTest.odt |binary vcl/source/window/seleng.cxx |2 +- 6 files changed, 29 insertions(+), 14 deletions(-) New commits: commit e558cbed9b350f2e6cbe948d648471499e0deffc Author: sahil AuthorDate: Wed Aug 23 22:03:34 2023 +0530 Commit: Hossein CommitDate: Wed Oct 25 11:27:28 2023 +0200 tdf#114441 - Convert use of sal_uLong to better integer types nUpdateInterval (sal_uLong --> sal_uInt64) because it is passed as argument to Timer::SetTimeout function that takes a sal_uInt64 func CalcUpdateInterval (sal_uLong --> sal_uInt64 return type) because this function is only being called once, and in that call, the return value is passed to a function which takes sal_uInt64 type int. line 412 (https://opengrok.libreoffice.org/xref/core/sc/source/ui/view/select.cxx?r=b6b26421#412) two lines after which it is passed to a function ... and the function changed in vcl/source/window/seleng.cxx is the one to which the value of nUpdateInterval is being passed as explained in the lines above. Change-Id: I73441c2d3520a222ddb39b8c0c205b4dd61d4751 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156015 Tested-by: Jenkins Reviewed-by: Hossein diff --git a/include/vcl/seleng.hxx b/include/vcl/seleng.hxx index 580ae74177bf..a0f069e04c1e 100644 --- a/include/vcl/seleng.hxx +++ b/include/vcl/seleng.hxx @@ -33,10 +33,10 @@ namespace vcl { } // Timerticks -#define SELENG_DRAGDROP_TIMEOUT 400 -#define SELENG_AUTOREPEAT_INTERVAL 50 -#define SELENG_AUTOREPEAT_INTERVAL_MIN 25 -#define SELENG_AUTOREPEAT_INTERVAL_MAX 300 +constexpr sal_uInt64 SELENG_DRAGDROP_TIMEOUT = 400; +constexpr sal_uInt64 SELENG_AUTOREPEAT_INTERVAL = 50; +constexpr sal_uInt64 SELENG_AUTOREPEAT_INTERVAL_MIN = 25; +constexpr sal_uInt64 SELENG_AUTOREPEAT_INTERVAL_MAX = 300; class VCL_DLLPUBLIC FunctionSet { @@ -84,7 +84,7 @@ private: Timer aWTimer; // generate fake mouse moves MouseEvent aLastMove; SelectionMode eSelMode; -sal_uLong nUpdateInterval; +sal_uInt64 nUpdateInterval; sal_uInt16 nLockedMods; SelectionEngineFlagsnFlags; DECL_DLLPRIVATE_LINK( ImpWatchDog, Timer*, void ); @@ -159,7 +159,7 @@ public: boolHasAnchor() const; voidSetAnchor( bool bAnchor ); -voidSetUpdateInterval( sal_uLong nInterval ); +voidSetUpdateInterval( sal_uInt64 nInterval ); // is switched on in the Ctor voidExpandSelectionOnMouseMove( bool bExpand = true ) diff --git a/sc/source/ui/inc/select.hxx b/sc/source/ui/inc/select.hxx index e1223f91e793..299463afddd2 100644 --- a/sc/source/ui/inc/select.hxx +++ b/sc/source/ui/inc/select.hxx @@ -49,7 +49,7 @@ private: ScSplitPos GetWhich() const; -sal_uLong CalcUpdateInterval( const Size& rWinSize, const Point& rEffPos, +sal_uInt64 CalcUpdateInterval( const Size& rWinSize, const Point& rEffPos, bool bLeftScroll, bool bTopScroll, bool bRightScroll, bool bBottomScroll ); public: diff --git a/sc/source/ui/view/select.cxx b/sc/source/ui/view/select.cxx index 961f511131ba..d972c9b4eb8d 100644 --- a/sc/source/ui/view/select.cxx +++ b/sc/source/ui/view/select.cxx @@ -60,10 +60,10 @@ ScSplitPos ScViewFunctionSet::GetWhich() const return m_pViewData->GetActivePart(); } -sal_uLong ScViewFunctionSet::CalcUpdateInterval( const Size& rWinSize, const Point& rEffPos, +sal_uInt64 ScViewFunctionSet::CalcUpdateInterval( const Size& rWinSize, const Point& rEffPos, bool bLeftScroll, bool bTopScroll, bool bRightScroll, bool bBottomScroll ) { -sal_uLong nUpdateInterval = SELENG_AUTOREPEAT_INTERVAL_MAX; +sal_uInt64 nUpdateInterval = SELENG_AUTOREPEAT_INTERVAL_MAX; vcl::Window* pWin = m_pEngine->GetWindow(); AbsoluteScreenPixelRectangle aScrRect = pWin->GetDesktopRectPixel(); AbsoluteScreenPixelPoint aRootPos = pWin->OutputToAbsoluteScreenPixel(Point(0,0)); @@ -77,7 +77,7 @@ sal_uLong ScViewFunctionSet::CalcUpdateInterval( const Size& rWinSize, const Poi if (nHAccelRate > 1.0) nHAccelRate = 1.0; -nUpdateInterval = static_cast(SELENG_AUTOREPEAT_INTERVAL_MAX*(1.0 - nHAccelRate)); +nUpdateInterval = SELENG_AUTOREPEAT_INTERVAL_MAX*(1.0 - nHAccelRate); } if (bLeftScroll) @@ -104,7 +104,7 @@ sal_uLong ScViewFunctionSet::CalcUpdateInterval( const
[Libreoffice-commits] core.git: include/sal
include/sal/log-areas.dox |1 - 1 file changed, 1 deletion(-) New commits: commit 20ce362ee29642251a92d086debaac06746d9d08 Author: sahil AuthorDate: Tue Oct 24 12:29:32 2023 +0530 Commit: Hossein CommitDate: Tue Oct 24 17:53:42 2023 +0200 Remove unused entry from log-areas.dox Change-Id: I1d7bb4183c45f752cddf118411259695a294b2cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158371 Reviewed-by: Hossein Tested-by: Hossein diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox index 1b4fa4813a41..23bbed1a916b 100644 --- a/include/sal/log-areas.dox +++ b/include/sal/log-areas.dox @@ -348,7 +348,6 @@ certain functionality. @section pyuno -@li @c pyuno @li @c pyuno.runtime @section sdext
[Libreoffice-commits] core.git: lotuswordpro/source
lotuswordpro/source/filter/bencont.cxx |2 +- lotuswordpro/source/filter/bento.hxx |2 +- lotuswordpro/source/filter/lwpfilter.cxx |2 +- lotuswordpro/source/filter/lwpgrfobj.cxx |6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) New commits: commit e2c9b9056182dfb1fc1145ab627bc5db4e73d62b Author: sahil AuthorDate: Thu Sep 14 01:02:48 2023 +0530 Commit: Hossein CommitDate: Tue Oct 24 09:41:12 2023 +0200 changed sal_uInt8 to BenError (enum) Change-Id: Ia7cb2f879b7be833d1a5ccf845a8dc8bfb94befd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156900 Tested-by: Jenkins Reviewed-by: Hossein diff --git a/lotuswordpro/source/filter/bencont.cxx b/lotuswordpro/source/filter/bencont.cxx index 3677c7809a7a..29153ee0a828 100644 --- a/lotuswordpro/source/filter/bencont.cxx +++ b/lotuswordpro/source/filter/bencont.cxx @@ -71,7 +71,7 @@ const char gsBenMagicBytes[] = BEN_MAGIC_BYTES; * @param pointer to pointer of Bento Container object * @return error code */ -sal_uInt8 BenOpenContainer(LwpSvStream * pStream, std::unique_ptr* ppContainer) +BenError BenOpenContainer(LwpSvStream * pStream, std::unique_ptr* ppContainer) { *ppContainer = nullptr; diff --git a/lotuswordpro/source/filter/bento.hxx b/lotuswordpro/source/filter/bento.hxx index acf7a6e21a38..86d79b40c0b0 100644 --- a/lotuswordpro/source/filter/bento.hxx +++ b/lotuswordpro/source/filter/bento.hxx @@ -135,7 +135,7 @@ typedef sal_uInt32 BenContainerPos; typedef sal_uInt32 BenObjectID; typedef sal_uInt32 BenGeneration; -sal_uInt8 BenOpenContainer(LwpSvStream * pStream, std::unique_ptr* ppContainer); +BenError BenOpenContainer(LwpSvStream * pStream, std::unique_ptr* ppContainer); class CBenIDListElmt : public CUtListElmt { diff --git a/lotuswordpro/source/filter/lwpfilter.cxx b/lotuswordpro/source/filter/lwpfilter.cxx index 5a8d4169a199..9a8f8ef4d026 100644 --- a/lotuswordpro/source/filter/lwpfilter.cxx +++ b/lotuswordpro/source/filter/lwpfilter.cxx @@ -96,7 +96,7 @@ static bool Decompress(SvStream* pCompressed, SvStream*& pOutDecompressed) LwpSvStream aLwpStream(pCompressed); std::unique_ptr pBentoContainer; { -sal_uInt8 ulRet = BenOpenContainer(, ); +BenError ulRet = BenOpenContainer(, ); if (ulRet != BenErr_OK) return false; } diff --git a/lotuswordpro/source/filter/lwpgrfobj.cxx b/lotuswordpro/source/filter/lwpgrfobj.cxx index f17ea8e98f93..202e662ae02f 100644 --- a/lotuswordpro/source/filter/lwpgrfobj.cxx +++ b/lotuswordpro/source/filter/lwpgrfobj.cxx @@ -286,7 +286,7 @@ void LwpGraphicObject::CreateDrawObjects() LwpSvStream* pStream = m_pStrm->GetCompressedStream() ? m_pStrm->GetCompressedStream(): m_pStrm; std::unique_ptr pBentoContainer; -sal_uInt8 ulRet = OpenStormBento::BenOpenContainer(pStream, ); +OpenStormBento::BenError ulRet = OpenStormBento::BenOpenContainer(pStream, ); if (ulRet != OpenStormBento::BenErr_OK) return; @@ -333,7 +333,7 @@ std::vector LwpGraphicObject::GetRawGrafData() std::unique_ptr pBentoContainer; { -sal_uInt8 ulRet = OpenStormBento::BenOpenContainer(pStream, ); +OpenStormBento::BenError ulRet = OpenStormBento::BenOpenContainer(pStream, ); if (ulRet != OpenStormBento::BenErr_OK) return aGrafData; } @@ -359,7 +359,7 @@ sal_uInt32 LwpGraphicObject::GetGrafData(std::unique_ptr& pGrafData LwpSvStream* pStream = m_pStrm->GetCompressedStream() ? m_pStrm->GetCompressedStream(): m_pStrm; std::unique_ptr pBentoContainer; -sal_uInt8 ulRet = OpenStormBento::BenOpenContainer(pStream, ); +OpenStormBento::BenError ulRet = OpenStormBento::BenOpenContainer(pStream, ); if (ulRet != OpenStormBento::BenErr_OK) return 0;
[Libreoffice-commits] core.git: include/sal pyuno/source
include/sal/log-areas.dox |5 + pyuno/source/module/pyuno_runtime.cxx |6 ++ 2 files changed, 7 insertions(+), 4 deletions(-) New commits: commit c0e687edf47f9bd2735a4e71116a9c1e50900de6 Author: sahil AuthorDate: Fri Sep 1 22:35:58 2023 +0530 Commit: Hossein CommitDate: Mon Oct 23 16:54:59 2023 +0200 tdf#130924 replace '*printf' with 'SAL_*' logging macros in pyuno Change-Id: I2c491629f52fe0b90517c563f221d7d0345b6ee9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156452 Tested-by: Jenkins Reviewed-by: Hossein diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox index 53e1e3ae0cdd..1b4fa4813a41 100644 --- a/include/sal/log-areas.dox +++ b/include/sal/log-areas.dox @@ -346,6 +346,11 @@ certain functionality. @li @c package.xstor @li @c package.threadeddeflate +@section pyuno + +@li @c pyuno +@li @c pyuno.runtime + @section sdext @li @c sdext diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx index 68b1ea508293..cb95e5a46dc1 100644 --- a/pyuno/source/module/pyuno_runtime.cxx +++ b/pyuno/source/module/pyuno_runtime.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include #include #include "pyuno_impl.hxx" @@ -944,10 +945,7 @@ Any Runtime::extractUnoException( const PyRef & excType, const PyRef , buf.append( ", no traceback available\n" ); } RuntimeException e(buf.makeStringAndClear()); -#if OSL_DEBUG_LEVEL > 0 -fprintf( stderr, "Python exception: %s\n", - OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).getStr() ); -#endif +SAL_WARN("pyuno.runtime", "Python exception: " << e.Message); ret <<= e; } return ret;
[Libreoffice-commits] core.git: tools/source
tools/source/stream/strmunx.cxx | 16 1 file changed, 4 insertions(+), 12 deletions(-) New commits: commit d56b61975330329c5dc1e99cc7750a690d3206ed Author: sahil AuthorDate: Wed Sep 13 03:43:07 2023 +0530 Commit: Hossein CommitDate: Mon Oct 23 15:50:09 2023 +0200 tdf#130924 replace '*printf' with 'SAL_*' logging macros in tools Change-Id: I9721bfd3783fd6c5d41b2d9a0e8468c583ede0c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156864 Tested-by: Jenkins Reviewed-by: Hossein diff --git a/tools/source/stream/strmunx.cxx b/tools/source/stream/strmunx.cxx index c19d5b00b4b2..881d7a28c0af 100644 --- a/tools/source/stream/strmunx.cxx +++ b/tools/source/stream/strmunx.cxx @@ -321,10 +321,7 @@ bool SvFileStream::LockFile() if( !lockFile( this ) ) { -#if OSL_DEBUG_LEVEL > 1 -fprintf( stderr, "InternalLock on %s failed\n", - OUStringToOString(aFilename, osl_getThreadTextEncoding()).getStr() ); -#endif +SAL_WARN("tools.stream", "InternalLock on " << aFilename << "failed"); return false; } @@ -403,14 +400,9 @@ void SvFileStream::Open( const OUString& rFilename, StreamMode nOpenMode ) if (osl::File::remove( aFileURL ) == osl::FileBase::E_None ) { File::copy( aStatus.getLinkTargetURL(), aFileURL ); -#if OSL_DEBUG_LEVEL > 0 -fprintf( stderr, - "Removing link and replacing with file contents (%s) -> (%s).\n", - OUStringToOString( aStatus.getLinkTargetURL(), - RTL_TEXTENCODING_UTF8).getStr(), - OUStringToOString( aFileURL, - RTL_TEXTENCODING_UTF8).getStr() ); -#endif +SAL_INFO("tools.stream", +"Removing link and replacing with file contents (" << +aStatus.getLinkTargetURL() << ") -> (" << aFileURL << ")."); } } }
[Libreoffice-commits] core.git: sw/qa
sw/qa/extras/ooxmlexport/data/151384Hyperlink.odt |binary sw/qa/extras/ooxmlexport/ooxmlexport16.cxx|9 + 2 files changed, 9 insertions(+) New commits: commit 11b06806e7b674ee3992e684d8f9dfd6cfc6999a Author: sahil AuthorDate: Tue Sep 26 16:24:14 2023 +0530 Commit: Xisco Fauli CommitDate: Tue Oct 3 13:34:33 2023 +0200 tdf#151384 Character Style internet link.. Test Change-Id: Ia402648b9b3feea64b7a8ba16c72dc439dbd6679 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157281 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/sw/qa/extras/ooxmlexport/data/151384Hyperlink.odt b/sw/qa/extras/ooxmlexport/data/151384Hyperlink.odt new file mode 100644 index ..223fda16df33 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/151384Hyperlink.odt differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx index 502a8d9c6797..e4eb392faf16 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx @@ -211,6 +211,15 @@ DECLARE_OOXMLEXPORT_TEST(testTdf142486_LeftMarginShadowLeft, "tdf142486_LeftMarg CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(953), getProperty(xFrame, "LeftMargin"), 1); } +DECLARE_OOXMLEXPORT_TEST(testTdf151384Hyperlink, "151384Hyperlink.odt") +{ +loadAndSave("151384Hyperlink.odt"); +xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml"); +xmlDocUniquePtr pXmlStyles = parseExport("word/styles.xml"); +assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:hyperlink/w:r/w:rPr/w:rStyle", "val", "Hyperlink"); +assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Hyperlink']/w:name", "val", "Hyperlink"); +} + DECLARE_OOXMLEXPORT_TEST(testTdf66039, "tdf66039.docx") { // This bugdoc has a groupshape (WPG) with a table inside its each member shape.
[Libreoffice-commits] core.git: include/vcl vcl/source
include/vcl/font.hxx |2 ++ vcl/source/font/font.cxx | 34 ++ 2 files changed, 20 insertions(+), 16 deletions(-) New commits: commit bf81be2641e8c66d78374289497b117fe3dfb024 Author: sahil AuthorDate: Mon Sep 11 04:40:26 2023 +0530 Commit: Mike Kaganski CommitDate: Wed Sep 13 06:30:59 2023 +0200 tdf#90341 Clean up excessive const_cast'ing Change-Id: I5e3cc14ed75309d0569a4bad710e7adea007329f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156807 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/include/vcl/font.hxx b/include/vcl/font.hxx index 8f7363d816b7..944b43fae22f 100644 --- a/include/vcl/font.hxx +++ b/include/vcl/font.hxx @@ -108,6 +108,8 @@ public: tools::LongGetFontHeight() const; voidSetAverageFontWidth( tools::Long nWidth ); tools::LongGetAverageFontWidth() const; +const Size& GetAverageFontSize() const; +const FontFamily& GetFontFamily() const; // tdf#127471 for corrections on EMF/WMF we need the AvgFontWidth in Windows-specific notation tools::Long GetOrCalculateAverageFontWidth() const; diff --git a/vcl/source/font/font.cxx b/vcl/source/font/font.cxx index 5c2857770a73..7b48855f247a 100644 --- a/vcl/source/font/font.cxx +++ b/vcl/source/font/font.cxx @@ -70,8 +70,8 @@ Font::Font( vcl::Font&& rFont ) noexcept : mpImplFont( std::move(rFont.mpImplFon Font::Font( const OUString& rFamilyName, const Size& rSize ) { -if (const_cast(mpImplFont)->maFamilyName != rFamilyName -|| const_cast(mpImplFont)->maAverageFontSize != rSize) +if (GetFamilyName() != rFamilyName +|| GetAverageFontSize() != rSize) { mpImplFont->SetFamilyName( rFamilyName ); mpImplFont->SetFontSize( rSize ); @@ -80,9 +80,9 @@ Font::Font( const OUString& rFamilyName, const Size& rSize ) Font::Font( const OUString& rFamilyName, const OUString& rStyleName, const Size& rSize ) { -if (const_cast(mpImplFont)->maFamilyName != rFamilyName -|| const_cast(mpImplFont)->maStyleName != rStyleName -|| const_cast(mpImplFont)->maAverageFontSize != rSize) +if (GetFamilyName() != rFamilyName +|| GetStyleName() != rStyleName +|| GetAverageFontSize() != rSize) { mpImplFont->SetFamilyName( rFamilyName ); mpImplFont->SetStyleName( rStyleName ); @@ -92,8 +92,8 @@ Font::Font( const OUString& rFamilyName, const OUString& rStyleName, const Size& Font::Font( FontFamily eFamily, const Size& rSize ) { -if (const_cast(mpImplFont)->meFamily != eFamily -|| const_cast(mpImplFont)->maAverageFontSize != rSize) +if (GetFontFamily() != eFamily +|| GetAverageFontSize() != rSize) { mpImplFont->SetFamilyType( eFamily ); mpImplFont->SetFontSize( rSize ); @@ -106,7 +106,7 @@ Font::~Font() void Font::SetColor( const Color& rColor ) { -if (const_cast(mpImplFont)->maColor != rColor) +if (GetColor() != rColor) { mpImplFont->maColor = rColor; } @@ -114,7 +114,7 @@ void Font::SetColor( const Color& rColor ) void Font::SetFillColor( const Color& rColor ) { -if (const_cast(mpImplFont)->maFillColor != rColor) +if (GetFillColor() != rColor) { mpImplFont->maFillColor = rColor; if ( rColor.IsTransparent() ) @@ -124,7 +124,7 @@ void Font::SetFillColor( const Color& rColor ) void Font::SetTransparent( bool bTransparent ) { -if (const_cast(mpImplFont)->mbTransparent != bTransparent) +if (IsTransparent() != bTransparent) mpImplFont->mbTransparent = bTransparent; } @@ -136,13 +136,13 @@ void Font::SetAlignment( TextAlign eAlign ) void Font::SetFamilyName( const OUString& rFamilyName ) { -if (const_cast(mpImplFont)->maFamilyName != rFamilyName) +if (GetFamilyName() != rFamilyName) mpImplFont->SetFamilyName( rFamilyName ); } void Font::SetStyleName( const OUString& rStyleName ) { -if (const_cast(mpImplFont)->maStyleName != rStyleName) +if (GetStyleName() != rStyleName) mpImplFont->maStyleName = rStyleName; } @@ -166,25 +166,25 @@ void Font::SetCharSet( rtl_TextEncoding eCharSet ) void Font::SetLanguageTag( const LanguageTag& rLanguageTag ) { -if (const_cast(mpImplFont)->maLanguageTag != rLanguageTag) +if (GetLanguageTag() != rLanguageTag) mpImplFont->maLanguageTag = rLanguageTag; } void Font::SetCJKContextLanguageTag( const LanguageTag& rLanguageTag ) { -if (const_cast(mpImplFont)->maCJKLanguageTag != rLanguageTag) +if (GetCJKContextLanguageTag() != rLanguageTag) mpImplFont->maCJKLanguageTag = rLanguageTag; } void Font::SetLanguage( LanguageType eLanguage ) { -if (const_cast(mpImplFont)->maLanguageTag.getLanguageType(false) != eLanguage) +if (GetLanguage() != eLanguage) mpImplFont->maLanguageTag.reset( eLanguage); } void
[Libreoffice-commits] core.git: lotuswordpro/source
lotuswordpro/source/filter/bencont.cxx |4 ++-- lotuswordpro/source/filter/bento.hxx | 12 ++-- lotuswordpro/source/filter/lwpfilter.cxx |4 ++-- lotuswordpro/source/filter/lwpgrfobj.cxx |6 +++--- lotuswordpro/source/filter/tocread.cxx |4 ++-- 5 files changed, 15 insertions(+), 15 deletions(-) New commits: commit f5bcc34580d02f92af01963155f2d54776a5249b Author: sahil AuthorDate: Mon Aug 21 00:21:32 2023 +0530 Commit: Hossein CommitDate: Tue Sep 12 02:36:35 2023 +0200 tdf#114441 - Convert sal_uLong to better integer types Change-Id: Idc6de0c0275ce9913e248548466b77aaef180d7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155873 Tested-by: Jenkins Reviewed-by: Hossein diff --git a/lotuswordpro/source/filter/bencont.cxx b/lotuswordpro/source/filter/bencont.cxx index 60e644ce212d..3677c7809a7a 100644 --- a/lotuswordpro/source/filter/bencont.cxx +++ b/lotuswordpro/source/filter/bencont.cxx @@ -71,7 +71,7 @@ const char gsBenMagicBytes[] = BEN_MAGIC_BYTES; * @param pointer to pointer of Bento Container object * @return error code */ -sal_uLong BenOpenContainer(LwpSvStream * pStream, std::unique_ptr* ppContainer) +sal_uInt8 BenOpenContainer(LwpSvStream * pStream, std::unique_ptr* ppContainer) { *ppContainer = nullptr; @@ -318,7 +318,7 @@ std::vector LtcBenContainer::GetGraphicData(const char *pObjectName) return aData; } -sal_uLong LtcBenContainer::remainingSize() const +sal_uInt64 LtcBenContainer::remainingSize() const { return m_ulLength - cpStream->Tell(); } diff --git a/lotuswordpro/source/filter/bento.hxx b/lotuswordpro/source/filter/bento.hxx index d2c1cb90d703..acf7a6e21a38 100644 --- a/lotuswordpro/source/filter/bento.hxx +++ b/lotuswordpro/source/filter/bento.hxx @@ -135,7 +135,7 @@ typedef sal_uInt32 BenContainerPos; typedef sal_uInt32 BenObjectID; typedef sal_uInt32 BenGeneration; -sal_uLong BenOpenContainer(LwpSvStream * pStream, std::unique_ptr* ppContainer); +sal_uInt8 BenOpenContainer(LwpSvStream * pStream, std::unique_ptr* ppContainer); class CBenIDListElmt : public CUtListElmt { @@ -175,7 +175,7 @@ public: public: // Overridden methods /* added by */ -sal_uLong GetSize() const { return m_ulValueLength; }; +sal_uInt64 GetSize() const { return m_ulValueLength; }; protected: // Overridden methods virtual std::size_t GetData(void* pData, std::size_t nSize) override; @@ -188,7 +188,7 @@ private: // Data CBenValue * cpValue; size_t cCurrentPosition; -sal_uLong m_ulValueLength; // Added by , sum of length of all sub-valuesegments +sal_uInt64 m_ulValueLength; // Added by , sum of length of all sub-valuesegments }; class LtcBenContainer @@ -207,7 +207,7 @@ public: // Internal methods explicit LtcBenContainer(LwpSvStream * pStream); ~LtcBenContainer(); -sal_uLong remainingSize() const; +sal_uInt64 remainingSize() const; void Read(void * pBuffer, size_t MaxSize, size_t* pAmtRead); BenError ReadKnownSize(void * pBuffer, size_t Amt); @@ -222,12 +222,12 @@ public: // Internal methods LtcUtBenValueStream * FindValueStreamWithPropertyName(const char * sPropertyName); std::vector GetGraphicData(const char *pObjectName); -sal_uLong GetSize() const { return m_ulLength; } +sal_uInt64 GetSize() const { return m_ulLength; } private: // Data CUtOwningList cObjects; CUtList cNamedObjects; LwpSvStream * cpStream; -sal_uLong m_ulLength; // Added for TOCRead.cpp +sal_uInt64 m_ulLength; // Added for TOCRead.cpp BenObjectID cNextAvailObjectID; // for new object }; diff --git a/lotuswordpro/source/filter/lwpfilter.cxx b/lotuswordpro/source/filter/lwpfilter.cxx index e8ba358ae8c7..5a8d4169a199 100644 --- a/lotuswordpro/source/filter/lwpfilter.cxx +++ b/lotuswordpro/source/filter/lwpfilter.cxx @@ -96,7 +96,7 @@ static bool Decompress(SvStream* pCompressed, SvStream*& pOutDecompressed) LwpSvStream aLwpStream(pCompressed); std::unique_ptr pBentoContainer; { -sal_uLong ulRet = BenOpenContainer(, ); +sal_uInt8 ulRet = BenOpenContainer(, ); if (ulRet != BenErr_OK) return false; } @@ -112,7 +112,7 @@ static bool Decompress(SvStream* pCompressed, SvStream*& pOutDecompressed) if (0 != decompress.explode()) return false; -sal_uInt32 nPos = aWordProData->GetSize(); +sal_uInt64 nPos = aWordProData->GetSize(); nPos += 0x10; pCompressed->Seek(nPos); diff --git a/lotuswordpro/source/filter/lwpgrfobj.cxx b/lotuswordpro/source/filter/lwpgrfobj.cxx index 3c8f3d03a381..f17ea8e98f93 100644 --- a/lotuswordpro/source/filter/lwpgrfobj.cxx +++ b/lotuswordpro/source/filter/lwpgrfobj.cxx @@ -286,7 +286,7 @@ void LwpGraphicObject::CreateDrawObjects() LwpSvStream* pStream = m_pStrm->GetCompressedStream() ? m_pStrm->GetCompressedStream(): m_pStrm; std::unique_ptr
[Libreoffice-commits] core.git: include/vcl sd/source vcl/source
include/vcl/commandevent.hxx|2 +- sd/source/ui/view/viewshel.cxx |2 +- vcl/source/control/imivctl1.cxx |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) New commits: commit b4dd91f3a10610924e736445e17506b49b619a70 Author: sahil AuthorDate: Sun Aug 13 14:17:20 2023 +0530 Commit: Hossein CommitDate: Tue Sep 5 22:51:55 2023 +0200 tdf#114441 - Convert use of sal_uLong to better integer types Updated scrolling related variables to double from sal_uLong Change-Id: Ibf4bb3d55b074b5d2e369e4bc708b87bdfa302b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155644 Tested-by: Jenkins Reviewed-by: Hossein diff --git a/include/vcl/commandevent.hxx b/include/vcl/commandevent.hxx index fc6ba290793f..9491137acea8 100644 --- a/include/vcl/commandevent.hxx +++ b/include/vcl/commandevent.hxx @@ -139,7 +139,7 @@ enum class CommandWheelMode }; // Magic value used in mnLines field in CommandWheelData -#define COMMAND_WHEEL_PAGESCROLL(sal_uLong(0x)) +#define COMMAND_WHEEL_PAGESCROLL(double(0x)) class VCL_DLLPUBLIC CommandWheelData { diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx index d4007eb77510..91fa6a2e4b53 100644 --- a/sd/source/ui/view/viewshel.cxx +++ b/sd/source/ui/view/viewshel.cxx @@ -736,7 +736,7 @@ bool ViewShell::HandleScrollCommand(const CommandEvent& rCEvt, ::sd::Window* pWi { if( mpContentWindow.get() == pWin ) { -sal_uLong nScrollLines = pData->GetScrollLines(); +double nScrollLines = pData->GetScrollLines(); if(IsPageFlipMode()) nScrollLines = COMMAND_WHEEL_PAGESCROLL; CommandWheelData aWheelData( pData->GetDelta(),pData->GetNotchDelta(), diff --git a/vcl/source/control/imivctl1.cxx b/vcl/source/control/imivctl1.cxx index ae297a82e107..1364dc4f44d0 100644 --- a/vcl/source/control/imivctl1.cxx +++ b/vcl/source/control/imivctl1.cxx @@ -1844,7 +1844,7 @@ bool SvxIconChoiceCtrl_Impl::HandleScrollCommand( const CommandEvent& rCmd ) const CommandWheelData* pData = rCmd.GetWheelData(); if( pData && (CommandWheelMode::SCROLL == pData->GetMode()) && !pData->IsHorz() ) { -sal_uLong nScrollLines = pData->GetScrollLines(); +double nScrollLines = pData->GetScrollLines(); if( nScrollLines == COMMAND_WHEEL_PAGESCROLL ) { nScrollDY = GetScrollBarPageSize( aVisSize.Width() );
[Libreoffice-commits] core.git: basic/qa include/sal
basic/qa/cppunit/basic_coverage.cxx |7 +++ basic/qa/cppunit/basictest.cxx |8 basic/qa/cppunit/test_vba.cxx | 11 +-- include/sal/log-areas.dox |1 + 4 files changed, 13 insertions(+), 14 deletions(-) New commits: commit df0db4132428e95d276e923d8d5fb603dbb7f7bb Author: sahil AuthorDate: Wed Aug 30 17:25:08 2023 +0530 Commit: Ilmari Lauhakangas CommitDate: Thu Aug 31 19:50:23 2023 +0200 tdf#130924 replace '*printf' with 'SAL_*' logging macros. Change-Id: I5bb4052ded82c355f7d71e4f38ebdefe3fcc25da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156283 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas Reviewed-by: Ilmari Lauhakangas diff --git a/basic/qa/cppunit/basic_coverage.cxx b/basic/qa/cppunit/basic_coverage.cxx index 0f0722917232..ee36f2d1309f 100644 --- a/basic/qa/cppunit/basic_coverage.cxx +++ b/basic/qa/cppunit/basic_coverage.cxx @@ -81,16 +81,15 @@ void Coverage::process_directory(const OUString& sDirName) testMacro.LoadSourceFromFile("TestModule", sFileURL); SbxVariableRef pReturn = testMacro.Run(); CPPUNIT_ASSERT_MESSAGE("No return variable huh?", pReturn.is()); -fprintf(stderr, "macro result for %s\n", OUStringToOString(sFileURL,RTL_TEXTENCODING_UTF8).getStr()); -fprintf(stderr, "macro returned:\n%s\n", -OUStringToOString(pReturn->GetOUString(), RTL_TEXTENCODING_UTF8).getStr()); +SAL_INFO("basic.qa", "macro result for " << sFileURL); +SAL_INFO("basic.qa", "macro returned:\n" << pReturn->GetOUString()); CPPUNIT_ASSERT_EQUAL_MESSAGE("Result not as expected", OUString("OK"), pReturn->GetOUString()); } } } } -fprintf(stderr,"end process directory\n"); +SAL_INFO("basic.qa", "end process directory"); } void Coverage::Coverage_Iterator() diff --git a/basic/qa/cppunit/basictest.cxx b/basic/qa/cppunit/basictest.cxx index 8cf9812d5212..ebf39635620a 100644 --- a/basic/qa/cppunit/basictest.cxx +++ b/basic/qa/cppunit/basictest.cxx @@ -7,6 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include #include "basictest.hxx" #include #include @@ -42,7 +43,7 @@ MacroSnippet::MacroSnippet() void MacroSnippet::LoadSourceFromFile(const OUString& sModuleName, const OUString& sMacroFileURL) { OUString sSource; -fprintf(stderr,"loadSource opening macro file %s\n", OUStringToOString( sMacroFileURL, RTL_TEXTENCODING_UTF8 ).getStr() ); +SAL_INFO("basic.qa", "loadSource opening macro file" << sMacroFileURL); osl::File aFile(sMacroFileURL); if(aFile.open(osl_File_OpenFlag_Read) == osl::FileBase::E_None) @@ -112,9 +113,8 @@ const ErrCode& MacroSnippet::getError() const { return maErrCode; } IMPL_LINK( MacroSnippet, BasicErrorHdl, StarBASIC *, /*pBasic*/, bool) { -fprintf(stderr,"(%d:%d)\n", -StarBASIC::GetLine(), StarBASIC::GetCol1()); -fprintf(stderr,"Basic error: %s\n", OUStringToOString( StarBASIC::GetErrorText(), RTL_TEXTENCODING_UTF8 ).getStr() ); +SAL_INFO("basic.qa", '(' << StarBASIC::GetLine() << ':' << StarBASIC::GetCol1() << ")"); +SAL_INFO("basic.qa", "Basic error: " << StarBASIC::GetErrorText()); mbError = true; maErrCode = StarBASIC::GetErrorCode(); return false; diff --git a/basic/qa/cppunit/test_vba.cxx b/basic/qa/cppunit/test_vba.cxx index 8a15ba7234e8..a95e2db6a7bd 100644 --- a/basic/qa/cppunit/test_vba.cxx +++ b/basic/qa/cppunit/test_vba.cxx @@ -6,6 +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/. */ +#include #include "basictest.hxx" #include @@ -168,9 +169,8 @@ void VBATest::testMiscVBAFunctions() myMacro.LoadSourceFromFile("TestModule", sMacroURL); SbxVariableRef pReturn = myMacro.Run(); CPPUNIT_ASSERT_MESSAGE("No return variable huh?", pReturn.is()); -fprintf(stderr, "macro result for %s\n", macroSource[i]); -fprintf(stderr, "macro returned:\n%s\n", -OUStringToOString(pReturn->GetOUString(), RTL_TEXTENCODING_UTF8).getStr()); +SAL_INFO("basic.qa", "macro result for" << macroSource[i]); +SAL_INFO("basic.qa", "macro returned:\n" << pReturn->GetOUString()); CPPUNIT_ASSERT_EQUAL_MESSAGE("Result not as expected", OUString("OK"), pReturn->GetOUString()); } @@ -248,9 +248,8 @@ void VBATest::testMiscOLEStuff() myMacro.LoadSourceFromFile("TestModule", sMacroURL); SbxVariableRef pReturn = myMacro.Run( aArgs ); CPPUNIT_ASSERT_MESSAGE("No return variable huh?", pReturn.is()); -fprintf(stderr, "macro result for %s\n", macroSource[i]); -
[Libreoffice-commits] core.git: basic/source
basic/source/runtime/methods.cxx | 36 1 file changed, 12 insertions(+), 24 deletions(-) New commits: commit a00cf4bc779b1da85423371fec43f8638c77e423 Author: sahil AuthorDate: Fri Jul 28 15:22:40 2023 +0530 Commit: Hossein CommitDate: Wed Aug 9 09:58:21 2023 +0200 tdf#147132 Flatten Basic function implementations Change-Id: I0ba6e7c1e128f3216eb3b77246c659a728df1324 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155011 Tested-by: Jenkins Reviewed-by: Hossein diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 986860c935a3..0c01e31126f1 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -379,16 +379,12 @@ void SbRtl_CurDir(StarBASIC *, SbxArray & rPar, bool) { OUString aDrive = rPar.Get(1)->GetOUString(); if ( aDrive.getLength() != 1 ) -{ -StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); -return; -} +return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); + auto c = rtl::toAsciiUpperCase(aDrive[0]); if ( !rtl::isAsciiUpperCase( c ) ) -{ -StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); -return; -} +return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); + nCurDir = c - 'A' + 1; } wchar_t pBuffer[ _MAX_PATH ]; @@ -398,14 +394,10 @@ void SbRtl_CurDir(StarBASIC *, SbxArray & rPar, bool) auto const handler = _set_thread_local_invalid_parameter_handler(); auto const ok = _wgetdcwd( nCurDir, pBuffer, _MAX_PATH ) != nullptr; _set_thread_local_invalid_parameter_handler(handler); -if ( ok ) -{ -rPar.Get(0)->PutString(OUString(o3tl::toU(pBuffer))); -} -else -{ -StarBASIC::Error( ERRCODE_BASIC_NO_DEVICE ); -} +if ( !ok ) +return StarBASIC::Error( ERRCODE_BASIC_NO_DEVICE ); + +rPar.Get(0)->PutString(OUString(o3tl::toU(pBuffer))); #else @@ -417,20 +409,16 @@ void SbRtl_CurDir(StarBASIC *, SbxArray & rPar, bool) { pMem.reset(new char[nSize]); if( !pMem ) -{ -StarBASIC::Error( ERRCODE_BASIC_NO_MEMORY ); -return; -} +return StarBASIC::Error( ERRCODE_BASIC_NO_MEMORY ); + if( getcwd( pMem.get(), nSize-1 ) != nullptr ) { rPar.Get(0)->PutString(OUString::createFromAscii(pMem.get())); return; } if( errno != ERANGE ) -{ -StarBASIC::Error( ERRCODE_BASIC_INTERNAL_ERROR ); -return; -} +return StarBASIC::Error( ERRCODE_BASIC_INTERNAL_ERROR ); + nSize += PATH_INCR; };
[Libreoffice-commits] core.git: vcl/source
vcl/source/filter/imet/ios2met.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 6e12b7f296930c6f37e036407e9fb832d9a9f027 Author: sahil AuthorDate: Mon Jul 31 00:43:00 2023 +0530 Commit: Hossein CommitDate: Mon Aug 7 02:49:30 2023 +0200 tdf#147906 used std::hypot for Pythagorean addition Change-Id: I8a926c621dee746e47ebdaaff4e0c558d7a7e6a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155073 Tested-by: Jenkins Reviewed-by: Hossein diff --git a/vcl/source/filter/imet/ios2met.cxx b/vcl/source/filter/imet/ios2met.cxx index fe856c1d7bb6..e055ea83824a 100644 --- a/vcl/source/filter/imet/ios2met.cxx +++ b/vcl/source/filter/imet/ios2met.cxx @@ -1124,7 +1124,7 @@ void OS2METReader::ReadArc(bool bGivenPos) p*p*((y3*y3-y1*y1)*(x2-x1)+(y2*y2-y1*y1)*(x1-x3)) ) / ncy; cx=( q*q*(x2*x2-x1*x1)+p*p*(y2*y2-y1*y1)+cy*2*p*p*(y1-y2) ) / ncx; // now we still need the radius in x and y direction: -r=sqrt(q*q*(x1-cx)*(x1-cx)+p*p*(y1-cy)*(y1-cy)); +r=hypot(q*(x1-cx), p*(y1-cy)); rx=r/q; ry=r/p; // We now have to find out how the starting and the end point // have to be chosen so that point no. 2 lies inside the drawn arc:
[Libreoffice-commits] core.git: l10ntools/source
l10ntools/source/localize.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 0c45d90cfb1cc60218fbce3743df442b1f1d3f70 Author: sahil AuthorDate: Fri Jul 28 02:04:09 2023 +0530 Commit: Ilmari Lauhakangas CommitDate: Fri Jul 28 07:07:11 2023 +0200 tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro Change-Id: I7217c04aa13082c1d2006c0c6a145b1b4fdbac0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155003 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas Reviewed-by: Ilmari Lauhakangas diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx index 7f9587b4c22b..96da93e139e2 100644 --- a/l10ntools/source/localize.cxx +++ b/l10ntools/source/localize.cxx @@ -203,7 +203,7 @@ bool handleFile(std::string_view rProject, const OUString& rUrl, std::string_vie { std::u16string_view(u".properties"), "propex", false }, { std::u16string_view(u".ui"), "uiex", false }, { std::u16string_view(u".tree"), "treex", false } }; -for (size_t i = 0; i != SAL_N_ELEMENTS(commands); ++i) +for (size_t i = 0; i != std::size(commands); ++i) { if (rUrl.endsWith(commands[i].extension) && (commands[i].executable != "propex" || rUrl.indexOf("en_US") != -1))
[Libreoffice-commits] core.git: sw/inc
sw/inc/mdiexp.hxx |5 + 1 file changed, 1 insertion(+), 4 deletions(-) New commits: commit e9dcbb2a5965e062c84b2e39e83fdf3f3227 Author: sahil AuthorDate: Thu Jul 20 02:48:59 2023 +0530 Commit: Ilmari Lauhakangas CommitDate: Thu Jul 20 12:47:59 2023 +0200 tdf#143148 Use pragma once in sw Change-Id: Ibb1fc8d8419dd4e1c805134fab3ee91476e5c5ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154662 Tested-by: Ilmari Lauhakangas Reviewed-by: Ilmari Lauhakangas diff --git a/sw/inc/mdiexp.hxx b/sw/inc/mdiexp.hxx index 80c7397b470c..afe308e1ad89 100644 --- a/sw/inc/mdiexp.hxx +++ b/sw/inc/mdiexp.hxx @@ -16,8 +16,7 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_SW_INC_MDIEXP_HXX -#define INCLUDED_SW_INC_MDIEXP_HXX +#pragma once #include #include "tblenum.hxx" @@ -53,6 +52,4 @@ TableChgMode GetTableChgDefaultMode(); bool JumpToSwMark( SwViewShell const * pVwSh, std::u16string_view rMark ); -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
[Libreoffice-commits] core.git: vcl/inc
vcl/inc/osx/keyboardfocuslistener.hxx |5 + 1 file changed, 1 insertion(+), 4 deletions(-) New commits: commit e99f7feb57e62d395d5b31f12e1c54194ffbf99d Author: sahil AuthorDate: Wed Jul 19 22:11:11 2023 +0530 Commit: Ilmari Lauhakangas CommitDate: Thu Jul 20 12:47:36 2023 +0200 tdf#143148 Use pragma once in vcl Change-Id: I4cf05114c7568d6c7b7ddba1b3c4a862d7a24dce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154656 Tested-by: Ilmari Lauhakangas Reviewed-by: Ilmari Lauhakangas diff --git a/vcl/inc/osx/keyboardfocuslistener.hxx b/vcl/inc/osx/keyboardfocuslistener.hxx index 9589a471e733..f94afaaf4f31 100644 --- a/vcl/inc/osx/keyboardfocuslistener.hxx +++ b/vcl/inc/osx/keyboardfocuslistener.hxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_VCL_INC_OSX_KEYBOARDFOCUSLISTENER_HXX -#define INCLUDED_VCL_INC_OSX_KEYBOARDFOCUSLISTENER_HXX +#pragma once #include @@ -33,6 +32,4 @@ public: = 0; }; -#endif // INCLUDED_VCL_INC_OSX_KEYBOARDFOCUSLISTENER_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */