[Libreoffice-commits] core.git: editeng/inc editeng/source solenv/clang-format
editeng/inc/helpids.h | 24 - editeng/source/editeng/editview.cxx | 155 ++-- solenv/clang-format/excludelist |1 3 files changed, 78 insertions(+), 102 deletions(-) New commits: commit 57544b075b77331b7b1cc7cb18898a52e7bb21a6 Author: Caolán McNamara AuthorDate: Sat Dec 12 21:21:09 2020 + Commit: Caolán McNamara CommitDate: Thu Dec 17 22:02:35 2020 +0100 weld editview menu Change-Id: I26bd2d011b5665f198f18d35b8433becca904991 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107572 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/editeng/inc/helpids.h b/editeng/inc/helpids.h deleted file mode 100644 index 8c4639e8951d.. --- a/editeng/inc/helpids.h +++ /dev/null @@ -1,24 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#pragma once - -#define HID_EDITENG_SPELLER_WORDLANGUAGE "EDITENG_HID_EDITENG_SPELLER_WORDLANGUAGE" -#define HID_EDITENG_SPELLER_PARALANGUAGE "EDITENG_HID_EDITENG_SPELLER_PARALANGUAGE" - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index 491c88670f44..877c59f1c520 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -20,7 +20,6 @@ #include #include -#include #include #include @@ -47,9 +46,7 @@ #include #include #include -#include #include -#include #include #include #include @@ -874,7 +871,7 @@ bool EditView::IsWrongSpelledWordAtPos( const Point& rPosPixel, bool bMarkIfWron return pImpEditView->IsWrongSpelledWord( aPaM , bMarkIfWrong ); } -static void LOKSendSpellPopupMenu(Menu* pMenu, LanguageType nGuessLangWord, +static void LOKSendSpellPopupMenu(const weld::Menu& rMenu, LanguageType nGuessLangWord, LanguageType nGuessLangPara, sal_uInt16 nSuggestions) { if (!comphelper::LibreOfficeKit::isActive()) @@ -892,13 +889,13 @@ static void LOKSendSpellPopupMenu(Menu* pMenu, LanguageType nGuessLangWord, { for(int i = 0; i < nSuggestions; ++i) { -sal_uInt16 nItemId = MN_ALTSTART + i; -OUString sText = pMenu->GetItemText(nItemId); +OString sItemId = OString::number(MN_ALTSTART + i); +OUString sText = rMenu.get_label(sItemId); aItemTree.put("text", sText.toUtf8().getStr()); aItemTree.put("type", "command"); OUString sCommandString = ".uno:SpellCheckApplySuggestion?ApplyRule:string=Spelling_" + sText; aItemTree.put("command", sCommandString.toUtf8().getStr()); -aItemTree.put("enabled", pMenu->IsItemEnabled(nItemId)); +aItemTree.put("enabled", rMenu.get_sensitive(sItemId)); aMenu.push_back(std::make_pair("", aItemTree)); aItemTree.clear(); } @@ -912,10 +909,10 @@ static void LOKSendSpellPopupMenu(Menu* pMenu, LanguageType nGuessLangWord, OUString aTmpWord( SvtLanguageTable::GetLanguageString( nGuessLangWord ) ); OUString aTmpPara( SvtLanguageTable::GetLanguageString( nGuessLangPara ) ); -aItemTree.put("text", pMenu->GetItemText(pMenu->GetItemId("ignore")).toUtf8().getStr()); +aItemTree.put("text", rMenu.get_label("ignore").toUtf8().getStr()); aItemTree.put("type", "command"); aItemTree.put("command", ".uno:SpellCheckIgnoreAll?Type:string=Spelling"); -aItemTree.put("enabled", pMenu->IsItemEnabled(pMenu->GetItemId("ignore"))); +aItemTree.put("enabled", rMenu.get_sensitive("ignore")); aMenu.push_back(std::make_pair("", aItemTree)); aItemTree.clear(); @@ -923,19 +920,19 @@ static void LOKSendSpellPopupMenu(Menu* pMenu, LanguageType nGuessLangWord, aMenu.push_back(std::make_pair("", aItemTree)); aItemTree.clear(); -aItemTree.put("text", pMenu->GetItemText(MN_WORDLANGUAGE).toUtf8().getStr()); +aItemTree.put("text", rMenu.get_label("wordlanguage").toUtf8().getStr()); aItemTree.put("type", "command"); OUString
[Libreoffice-commits] core.git: editeng/inc editeng/source solenv/clang-format
editeng/inc/editeng.hxx | 10 +++ editeng/inc/editxml.hxx |5 +-- editeng/inc/unopracc.hxx | 17 +--- editeng/source/items/svdfield.cxx|5 --- editeng/source/misc/edtdlg.cxx |7 + editeng/source/misc/forbiddencharacterstable.cxx | 32 --- solenv/clang-format/excludelist |6 7 files changed, 36 insertions(+), 46 deletions(-) New commits: commit 32b57a159ea6ab3b0cdef7ca9d746639d42aa192 Author: Philipp Hofer AuthorDate: Thu Nov 12 12:55:03 2020 +0100 Commit: Christian Lohmaier CommitDate: Fri Nov 13 15:15:59 2020 +0100 tdf#123936 Formatting files in module editeng with clang-format Change-Id: I745057f4a6dc0d8103ed7fa29d0f662226a5cee5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105663 Tested-by: Jenkins Reviewed-by: Christian Lohmaier diff --git a/editeng/inc/editeng.hxx b/editeng/inc/editeng.hxx index cce3d79d4e10..5b831efa3b5e 100644 --- a/editeng/inc/editeng.hxx +++ b/editeng/inc/editeng.hxx @@ -19,10 +19,10 @@ #pragma once -#define MN_WORDLANGUAGE 998 -#define MN_PARALANGUAGE 999 -#define MN_ALTSTART 1000 -#define MN_AUTOSTART2000 -#define MN_DICTSTART3000 +#define MN_WORDLANGUAGE 998 +#define MN_PARALANGUAGE 999 +#define MN_ALTSTART 1000 +#define MN_AUTOSTART 2000 +#define MN_DICTSTART 3000 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editxml.hxx b/editeng/inc/editxml.hxx index 51ded36f684e..650b7dfdef48 100644 --- a/editeng/inc/editxml.hxx +++ b/editeng/inc/editxml.hxx @@ -25,10 +25,9 @@ struct ESelection; class EditPaM; /** this function exports the selected content of an edit engine into a xml stream*/ -extern void SvxWriteXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection& rSel ); +extern void SvxWriteXML(EditEngine& rEditEngine, SvStream& rStream, const ESelection& rSel); /** this function imports xml from the stream into the selected of an edit engine */ -extern EditPaM SvxReadXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection& rSel ); - +extern EditPaM SvxReadXML(EditEngine& rEditEngine, SvStream& rStream, const ESelection& rSel); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/unopracc.hxx b/editeng/inc/unopracc.hxx index 7617bed0a86e..d6b8b8235762 100644 --- a/editeng/inc/unopracc.hxx +++ b/editeng/inc/unopracc.hxx @@ -21,7 +21,6 @@ #include - class SvxEditSource; /** Wraps SvxUnoTextRangeBase and provides us with the text properties @@ -31,27 +30,27 @@ class SvxEditSource; required text range and return a reference to a XPropertySet. */ class SvxAccessibleTextPropertySet final : public SvxUnoTextRangeBase, - public css::lang::XTypeProvider, - public ::cppu::OWeakObject + public css::lang::XTypeProvider, + public ::cppu::OWeakObject { public: -SvxAccessibleTextPropertySet( const SvxEditSource*, const SvxItemPropertySet* ); +SvxAccessibleTextPropertySet(const SvxEditSource*, const SvxItemPropertySet*); virtual ~SvxAccessibleTextPropertySet() throw() override; // XTextRange -virtual css::uno::Reference< css::text::XText > SAL_CALL getText() override; +virtual css::uno::Reference SAL_CALL getText() override; -virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override; +virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& rType) override; virtual void SAL_CALL acquire() throw() override; virtual void SAL_CALL release() throw() override; // lang::XServiceInfo virtual OUString SAL_CALL getImplementationName() override; -virtual sal_Bool SAL_CALL supportsService( const OUString& ) override; +virtual sal_Bool SAL_CALL supportsService(const OUString&) override; // lang::XTypeProvider -virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override; -virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override; +virtual css::uno::Sequence SAL_CALL getTypes() override; +virtual css::uno::Sequence SAL_CALL getImplementationId() override; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/items/svdfield.cxx b/editeng/source/items/svdfield.cxx index 288826406551..a9b78148c003 100644 --- a/editeng/source/items/svdfield.cxx +++ b/editeng/source/items/svdfield.cxx @@ -17,12 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include -SdrMeasureField::~SdrMeasureField() -{ -} +SdrMeasureField::~SdrMeasureField() {} std::unique_ptr SdrMeasureField::Clone() const { diff --git a/editeng/source/misc/edtdlg.cxx b/editeng/source/misc/edtdlg.cxx