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

2021-07-25 Thread Kevin Suo (via logerrit)
 sdext/source/pdfimport/wrapper/wrapper.cxx|   97 +++---
 sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx |5 
 2 files changed, 89 insertions(+), 13 deletions(-)

New commits:
commit 2ee3d4076481262c1e3014dc9341cdf3d1922ff7
Author: Kevin Suo 
AuthorDate: Sat Jul 17 14:25:45 2021 +0800
Commit: Noel Grandin 
CommitDate: Mon Jul 26 08:28:20 2021 +0200

sdext.pdfimport: Restore to read font file for the determination...

of font attributes, as suggested by Mike Kaganski in
https://gerrit.libreoffice.org/c/core/+/118977.

This partially reverts da59686672fd2bc98f8cb28d5f04dc978b50ac13
but did some modification of the previous code with some
explanationary comments.

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

diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx 
b/sdext/source/pdfimport/wrapper/wrapper.cxx
index e22fe0aeca72..ffa29b1f7b7b 100644
--- a/sdext/source/pdfimport/wrapper/wrapper.cxx
+++ b/sdext/source/pdfimport/wrapper/wrapper.cxx
@@ -49,6 +49,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -503,25 +504,36 @@ void LineParser::parseFontFamilyName( FontAttributes& 
rResult )
 
 void LineParser::readFont()
 {
-OString aFontName;
+/*
+xpdf line is like (separated by space):
+updateFont  
  
+updateFont 14   100  0 
1200.00   23068TimesNewRomanPSMT
+
+If nEmbedSize > 0, then a fontFile is followed as a stream.
+*/
+
+OStringaFontName;
 sal_Int64  nFontID;
 sal_Int32  nIsEmbedded, nIsBold, nIsItalic, nIsUnderline, nFileLen;
 double nSize;
 
-readInt64(nFontID);
-readInt32(nIsEmbedded);
-readInt32(nIsBold);
-readInt32(nIsItalic);
-readInt32(nIsUnderline);
-readDouble(nSize);
-readInt32(nFileLen);
+readInt64(nFontID); // read FontID
+readInt32(nIsEmbedded); // read isEmbedded
+readInt32(nIsBold); // read isBold
+readInt32(nIsItalic);   // read isItalic
+readInt32(nIsUnderline);// read isUnderline
+readDouble(nSize);  // read TransformedFontSize
+readInt32(nFileLen);// read nEmbedSize
 
 nSize = nSize < 0.0 ? -nSize : nSize;
-aFontName = lcl_unescapeLineFeeds( m_aLine.subView( m_nCharIndex ) );
+// Read FontName. From the current position to the end (any white spaces 
will be included).
+aFontName = lcl_unescapeLineFeeds(m_aLine.subView(m_nCharIndex));
 
 // name gobbles up rest of line
 m_nCharIndex = std::string_view::npos;
 
+// Check if this font is already in our font map list.
+// If yes, update the font size and skip.
 Parser::FontMapType::const_iterator pFont( 
m_parser.m_aFontMap.find(nFontID) );
 if( pFont != m_parser.m_aFontMap.end() )
 {
@@ -534,16 +546,75 @@ void LineParser::readFont()
 }
 
 // yet unknown font - get info and add to map
-FontAttributes aResult( OStringToOUString( aFontName,
-RTL_TEXTENCODING_UTF8 ),
+FontAttributes aResult( OStringToOUString( aFontName, 
RTL_TEXTENCODING_UTF8 ),
 nIsBold != 0,
 nIsItalic != 0,
 nIsUnderline != 0,
 nSize,
 1.0);
 
-// extract textual attributes (bold, italic in the name, etc.)
-parseFontFamilyName(aResult);
+/* The above font attributes (fontName, bold, italic) are based on
+   xpdf line output and may not be reliable. To get correct attributes,
+   we do the following:
+1. Read the embeded font file and determine the attributes based on the
+   font file.
+2. If we failed to read the font file, or empty result is returned, then
+   determine the font attributes from the font name.
+3. If all these attemps have failed, then use a fallback font.
+*/
+if (nFileLen > 0)
+{
+uno::Sequence aFontFile(nFileLen);
+readBinaryData(aFontFile);  // Read fontFile.
+
+uno::Sequence aArgs(1);
+awt::FontDescriptor aFontDescriptor;
+aArgs[0] <<= aFontFile;
+
+try
+{
+uno::Reference xHolder(
+
m_parser.m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
+"com.sun.star.awt.FontIdentificator", aArgs, 
m_parser.m_xContext),
+uno::UNO_QUERY);
+if (xHolder.is())
+{
+uno::Any aFontReadResult(xHolder->getMaterial());
+aFontReadResult >>= aFontDescriptor;
+if (!aFontDescriptor.Name.isEmpty())
+{
+aResult.familyName = aFontDescriptor.Name;
+aResult.isBold = (aFontDescripto

[Libreoffice-commits] core.git: cui/source desktop/source framework/source include/svtools include/unotools svtools/Library_svt.mk svtools/source

2021-07-25 Thread Noel Grandin (via logerrit)
 cui/source/options/optgdlg.cxx|   42 +-
 desktop/source/app/app.cxx|9 
 framework/source/uielement/menubarmanager.cxx |3 
 framework/source/uielement/toolbarmanager.cxx |4 
 include/svtools/menuoptions.hxx   |   90 -
 include/unotools/itemholderbase.hxx   |1 
 svtools/Library_svt.mk|1 
 svtools/source/config/itemholder2.cxx |5 
 svtools/source/config/menuoptions.cxx |  413 --
 9 files changed, 28 insertions(+), 540 deletions(-)

New commits:
commit 131759a3db51140c21594308ed99c71aa7aba43a
Author: Noel Grandin 
AuthorDate: Sun Jul 25 16:21:39 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Jul 26 08:26:18 2021 +0200

use officecfg for menu options

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

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 30ca6b79a068..e55eca6dcf09 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -30,7 +30,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -661,11 +660,10 @@ std::unique_ptr OfaViewTabPage::Create( 
weld::Container* pPage, weld
 
 bool OfaViewTabPage::FillItemSet( SfxItemSet* )
 {
-SvtMenuOptions aMenuOpt;
-
 bool bModified = false;
 bool bMenuOptModified = false;
 bool bRepaintWindows(false);
+std::shared_ptr 
xChanges(comphelper::ConfigurationChanges::create());
 
 SvtMiscOptions aMiscOptions;
 const sal_Int32 nSizeLB_NewSelection = m_xIconSizeLB->get_active();
@@ -698,9 +696,7 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* )
 default:
 OSL_FAIL( "OfaViewTabPage::FillItemSet(): This state of 
m_xSidebarIconSizeLB should not be possible!" );
 }
-auto xChanges = comphelper::ConfigurationChanges::create();
 
officecfg::Office::Common::Misc::SidebarIconSize::set(static_cast(eSet),
 xChanges);
-xChanges->commit();
 }
 
 const sal_Int32 nNotebookbarSizeLB_NewSelection = 
m_xNotebookbarIconSizeLB->get_active();
@@ -716,9 +712,7 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* )
 default:
 OSL_FAIL( "OfaViewTabPage::FillItemSet(): This state of 
m_xNotebookbarIconSizeLB should not be possible!" );
 }
-auto xChanges = comphelper::ConfigurationChanges::create();
 
officecfg::Office::Common::Misc::NotebookbarIconSize::set(static_cast(eSet),
 xChanges);
-xChanges->commit();
 }
 
 const sal_Int32 nStyleLB_NewSelection = m_xIconStyleLB->get_active();
@@ -768,17 +762,19 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* )
 
 if (m_xFontShowCB->get_state_changed_from_saved())
 {
-std::shared_ptr 
batch(comphelper::ConfigurationChanges::create());
-
officecfg::Office::Common::Font::View::ShowFontBoxWYSIWYG::set(m_xFontShowCB->get_active(),
 batch);
-batch->commit();
+
officecfg::Office::Common::Font::View::ShowFontBoxWYSIWYG::set(m_xFontShowCB->get_active(),
 xChanges);
 bModified = true;
 }
 
 if (m_xMenuIconsLB->get_value_changed_from_saved())
 {
-aMenuOpt.SetMenuIconsState(m_xMenuIconsLB->get_active() == 0 ?
+TriState eMenuIcons = m_xMenuIconsLB->get_active() == 0 ?
 TRISTATE_INDET :
-static_cast(m_xMenuIconsLB->get_active() - 1));
+static_cast(m_xMenuIconsLB->get_active() - 1);
+// Output cache of current setting as possibly modified by System 
Theme for older version
+bool bMenuIcons = 
Application::GetSettings().GetStyleSettings().GetUseImagesInMenus();
+
officecfg::Office::Common::View::Menu::IsSystemIconsInMenus::set(eMenuIcons == 
TRISTATE_INDET, xChanges);
+
officecfg::Office::Common::View::Menu::ShowIconsInMenues::set(bMenuIcons, 
xChanges);
 bModified = true;
 bMenuOptModified = true;
 bAppearanceChanged = true;
@@ -786,9 +782,11 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* )
 
 if (m_xContextMenuShortcutsLB->get_value_changed_from_saved())
 {
-
aMenuOpt.SetContextMenuShortcuts(m_xContextMenuShortcutsLB->get_active() == 0 ?
+officecfg::Office::Common::View::Menu::ShortcutsInContextMenus::set(
+m_xContextMenuShortcutsLB->get_active() == 0 ?
 TRISTATE_INDET :
-static_cast(m_xContextMenuShortcutsLB->get_active() - 
1));
+static_cast(m_xContextMenuShortcutsLB->get_active() - 1),
+xChanges);
 bModified = true;
 bMenuOptModified = true;
 bAppearanceChanged = true;
@@ -818,13 +816,13 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* )
 if (m_xUseSkia->get_state_changed_from_saved() ||
 m_xForceSkiaRaster->get_state_changed_from_saved())
 {

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

2021-07-25 Thread Tomaž Vajngerl (via logerrit)
 sw/CppunitTest_sw_indexingexport.mk   |1 
 sw/Library_sw.mk  |1 
 sw/qa/extras/indexing/SearchResultLocatorTest.cxx |   72 ++
 sw/source/core/inc/SearchResultLocator.hxx|   45 +
 sw/source/core/model/SearchResultLocator.cxx  |   47 ++
 5 files changed, 166 insertions(+)

New commits:
commit 6e155959de6f46afbe0b68057200c3da822d81f9
Author: Tomaž Vajngerl 
AuthorDate: Mon Jul 5 10:57:41 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Mon Jul 26 05:55:58 2021 +0200

indexing: search result locator to return the rect of the result

Returns the rectangle(s) where the search result is located in the
document.

Change-Id: Ib2333584fbc460cc16b1bf205fc3d674a1c06957
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118668
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sw/CppunitTest_sw_indexingexport.mk 
b/sw/CppunitTest_sw_indexingexport.mk
index a3884fee8fb6..7210fbe33042 100644
--- a/sw/CppunitTest_sw_indexingexport.mk
+++ b/sw/CppunitTest_sw_indexingexport.mk
@@ -15,6 +15,7 @@ $(eval $(call 
gb_CppunitTest_use_common_precompiled_header,sw_indexingexport))
 
 $(eval $(call gb_CppunitTest_add_exception_objects,sw_indexingexport, \
 sw/qa/extras/indexing/IndexingExportTest \
+sw/qa/extras/indexing/SearchResultLocatorTest \
 ))
 
 $(eval $(call gb_CppunitTest_use_libraries,sw_indexingexport, \
diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk
index 02d12d171295..8f9398d2ab8b 100644
--- a/sw/Library_sw.mk
+++ b/sw/Library_sw.mk
@@ -353,6 +353,7 @@ $(eval $(call gb_Library_add_exception_objects,sw,\
 sw/source/core/layout/virtoutp \
 sw/source/core/layout/wsfrm \
 sw/source/core/model/ModelTraverser \
+sw/source/core/model/SearchResultLocator \
 sw/source/core/objectpositioning/anchoredobjectposition \
 sw/source/core/objectpositioning/ascharanchoredobjectposition \
 sw/source/core/objectpositioning/environmentofanchoredobject \
diff --git a/sw/qa/extras/indexing/SearchResultLocatorTest.cxx 
b/sw/qa/extras/indexing/SearchResultLocatorTest.cxx
new file mode 100644
index ..933c96159a51
--- /dev/null
+++ b/sw/qa/extras/indexing/SearchResultLocatorTest.cxx
@@ -0,0 +1,72 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+namespace
+{
+constexpr OUStringLiteral DATA_DIRECTORY = u"sw/qa/extras/indexing/data/";
+}
+
+class SearchResultLocatorTest : public SwModelTestBase
+{
+private:
+SwDoc* createDoc(const char* pName = nullptr);
+
+public:
+void testSearchResultLocator();
+
+CPPUNIT_TEST_SUITE(SearchResultLocatorTest);
+CPPUNIT_TEST(testSearchResultLocator);
+CPPUNIT_TEST_SUITE_END();
+};
+
+SwDoc* SearchResultLocatorTest::createDoc(const char* pName)
+{
+if (!pName)
+loadURL("private:factory/swriter", nullptr);
+else
+load(DATA_DIRECTORY, pName);
+
+SwXTextDocument* pTextDoc = 
dynamic_cast(mxComponent.get());
+CPPUNIT_ASSERT(pTextDoc);
+return pTextDoc->GetDocShell()->GetDoc();
+}
+
+void SearchResultLocatorTest::testSearchResultLocator()
+{
+#ifndef MACOSX
+SwDoc* pDoc = createDoc("IndexingExport_VariousParagraphs.odt");
+CPPUNIT_ASSERT(pDoc);
+
+sw::SearchResultLocator aLocator(pDoc);
+sw::SearchIndexData aData;
+aData.nNodeIndex = 14;
+
+sw::LocationResult aResult = aLocator.find(aData);
+CPPUNIT_ASSERT_EQUAL(size_t(1), aResult.maRectangles.size());
+auto aRectangle = aResult.maRectangles[0];
+
+CPPUNIT_ASSERT_DOUBLES_EQUAL(1418.0, aRectangle.getMinX(), 1e-4);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(.0, aRectangle.getMinY(), 1e-4);
+
+CPPUNIT_ASSERT_DOUBLES_EQUAL(9638.0, aRectangle.getWidth(), 1e-4);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(276.0, aRectangle.getHeight(), 1e-4);
+#endif
+}
+
+CPPUNIT_TEST_SUITE_REGISTRATION(SearchResultLocatorTest);
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/SearchResultLocator.hxx 
b/sw/source/core/inc/SearchResultLocator.hxx
new file mode 100644
index ..f9e3aab6929b
--- /dev/null
+++ b/sw/source/core/inc/SearchResultLocator.hxx
@@ -0,0 +1,45 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#pragma once
+
+#include 
+#include 
+#include 
+
+namespace sw
+{
+stru

New Defects reported by Coverity Scan for LibreOffice

2021-07-25 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

124 new defect(s) introduced to LibreOffice found with Coverity Scan.
1 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent 
build analyzed by Coverity Scan.

New defect(s) Reported-by: Coverity Scan
Showing 20 of 124 defect(s)


** CID 1489541:  Performance inefficiencies  (PASS_BY_VALUE)
/xmlsecurity/source/helper/xsecparser.cxx: 754 in 
XSecParser::XadesCertificateValuesContext::CreateChildContext(std::optional,
 unsigned short, const rtl::OUString &)()



*** CID 1489541:  Performance inefficiencies  (PASS_BY_VALUE)
/xmlsecurity/source/helper/xsecparser.cxx: 754 in 
XSecParser::XadesCertificateValuesContext::CreateChildContext(std::optional,
 unsigned short, const rtl::OUString &)()
748 css::uno::Reference const& 
xAttrs) override
749 {
750 m_rParser.HandleIdAttr(xAttrs);
751 }
752 
753 virtual std::unique_ptr CreateChildContext(
>>> CID 1489541:  Performance inefficiencies  (PASS_BY_VALUE)
>>> Passing parameter pOldNamespaceMap of type 
>>> "std::optional" (size 240 bytes) by value.
754 std::optional pOldNamespaceMap,
755 sal_uInt16 const nNamespace, OUString const& rName) override
756 {
757 if (nNamespace == XML_NAMESPACE_XADES132 && rName == 
"EncapsulatedX509Certificate")
758 {
759 return 
std::make_unique(m_rParser, 
std::move(pOldNamespaceMap));

** CID 1489540:  Performance inefficiencies  (PASS_BY_VALUE)
/xmlsecurity/source/helper/xsecparser.cxx: 1339 in 
XSecParser::DsObjectContext::DsObjectContext(XSecParser&, 
std::optional)()



*** CID 1489540:  Performance inefficiencies  (PASS_BY_VALUE)
/xmlsecurity/source/helper/xsecparser.cxx: 1339 in 
XSecParser::DsObjectContext::DsObjectContext(XSecParser&, 
std::optional)()
1333 
1334 class XSecParser::DsObjectContext
1335 : public XSecParser::ReferencedContextImpl
1336 {
1337 public:
1338 DsObjectContext(XSecParser & rParser,
>>> CID 1489540:  Performance inefficiencies  (PASS_BY_VALUE)
>>> Passing parameter pOldNamespaceMap of type 
>>> "std::optional" (size 240 bytes) by value.
1339 std::optional pOldNamespaceMap)
1340 // init with "false" here - the Signature element can't be 
referenced by its child
1341 : XSecParser::ReferencedContextImpl(rParser, 
std::move(pOldNamespaceMap), false)
1342 {
1343 }
1344 

** CID 1489539:  Performance inefficiencies  (PASS_BY_VALUE)
/xmlsecurity/source/helper/ooxmlsecparser.cxx: 675 in 
OOXMLSecParser::XadesSigningCertificateContext::CreateChildContext(std::optional,
 unsigned short, const rtl::OUString &)()



*** CID 1489539:  Performance inefficiencies  (PASS_BY_VALUE)
/xmlsecurity/source/helper/ooxmlsecparser.cxx: 675 in 
OOXMLSecParser::XadesSigningCertificateContext::CreateChildContext(std::optional,
 unsigned short, const rtl::OUString &)()
669 bool const isReferenced)
670 : ReferencedContextImpl(rParser, 
std::move(pOldNamespaceMap), isReferenced)
671 {
672 }
673 
674 virtual std::unique_ptr CreateChildContext(
>>> CID 1489539:  Performance inefficiencies  (PASS_BY_VALUE)
>>> Passing parameter pOldNamespaceMap of type 
>>> "std::optional" (size 240 bytes) by value.
675 std::optional pOldNamespaceMap,
676 sal_uInt16 const nNamespace, OUString const& rName) override
677 {
678 if (nNamespace == XML_NAMESPACE_XADES132 && rName == "Cert")
679 {
680 return std::make_unique(m_rParser, 
std::move(pOldNamespaceMap), m_isReferenced);

** CID 1489538:  Performance inefficiencies  (PASS_BY_VALUE)
/xmlsecurity/source/helper/xsecparser.cxx: 846 in 
XSecParser::LoSignatureLineIdContext::LoSignatureLineIdContext(XSecParser&, 
std::optional, bool)()



*** CID 1489538:  Performance inefficiencies  (PASS_BY_VALUE)
/xmlsecurity/source/helper/xsecparser.cxx: 846 in 
XSecParser::LoSignatureLineIdContext::LoSignatureLineIdContext(XSecParser&, 
std::optional, bool)()
840 {
841 private:
842 OUString m_Value;
843 
844 public:
845 LoSignatureLineIdContext(XSecParser & rParser,
>>> CID 1489538:  Performance inefficiencies  (PASS_BY_VALUE)
>>> Passing parameter pOl

How to create a lockedCanvas in MSWord?

2021-07-25 Thread Regina Henschel

Hi all,

does someone know, how to create a document in MSWord, which uses a 
lockedCanvas? Or is that only possible via macro? It would be good to be 
able to generate own test documents.


Kind regards
Regina
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2021-07-25 Thread Tomaž Vajngerl (via logerrit)
 include/vcl/BitmapTools.hxx   |5 -
 vcl/source/bitmap/BitmapTools.cxx |7 +--
 2 files changed, 9 insertions(+), 3 deletions(-)

New commits:
commit 2a151d1d5bc055d5e0011460b6ec42ea9f34f880
Author: Tomaž Vajngerl 
AuthorDate: Fri Jul 9 14:08:39 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Mon Jul 26 01:53:09 2021 +0200

vcl: bitmap::CreateFromData add option to reverse alpha (0xff - a)

Change-Id: If69225f86afb315ad432789178188a66264ab3ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118669
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/include/vcl/BitmapTools.hxx b/include/vcl/BitmapTools.hxx
index 8b1a81413d01..7ca5891f5f90 100644
--- a/include/vcl/BitmapTools.hxx
+++ b/include/vcl/BitmapTools.hxx
@@ -46,7 +46,10 @@ void loadFromSvg(SvStream& rStream, const OUString& sPath, 
BitmapEx& rBitmapEx,
 @param nStride
 The number of bytes in a scanline, must be >= (width * bitcount / 8)
 */
-BitmapEx VCL_DLLPUBLIC CreateFromData( sal_uInt8 const *pData, sal_Int32 
nWidth, sal_Int32 nHeight, sal_Int32 nStride, vcl::PixelFormat ePixelFormat, 
bool bReversColors = false);
+BitmapEx VCL_DLLPUBLIC CreateFromData(sal_uInt8 const *pData,
+  sal_Int32 nWidth, sal_Int32 nHeight, 
sal_Int32 nStride,
+  vcl::PixelFormat ePixelFormat,
+  bool bReversColors = false, bool 
bReverseAlpha = false);
 
 BitmapEx VCL_DLLPUBLIC CreateFromData( RawBitmap && data );
 
diff --git a/vcl/source/bitmap/BitmapTools.cxx 
b/vcl/source/bitmap/BitmapTools.cxx
index 92b3175143f2..eddef22cfb53 100644
--- a/vcl/source/bitmap/BitmapTools.cxx
+++ b/vcl/source/bitmap/BitmapTools.cxx
@@ -128,7 +128,9 @@ void loadFromSvg(SvStream& rStream, const OUString& sPath, 
BitmapEx& rBitmapEx,
 @param bReversColors
 In case the endianness of pData is wrong, you could reverse colors
 */
-BitmapEx CreateFromData( sal_uInt8 const *pData, sal_Int32 nWidth, sal_Int32 
nHeight, sal_Int32 nStride, vcl::PixelFormat ePixelFormat, bool bReversColors )
+BitmapEx CreateFromData(sal_uInt8 const *pData, sal_Int32 nWidth, sal_Int32 
nHeight,
+sal_Int32 nStride, vcl::PixelFormat ePixelFormat,
+bool bReversColors, bool bReverseAlpha)
 {
 auto nBitCount = sal_uInt16(ePixelFormat);
 
@@ -184,7 +186,8 @@ BitmapEx CreateFromData( sal_uInt8 const *pData, sal_Int32 
nWidth, sal_Int32 nHe
 Scanline pMaskScanLine = xMaskAcc->GetScanline(y);
 for (tools::Long x = 0; x < nWidth; ++x)
 {
-xMaskAcc->SetPixelOnData(pMaskScanLine, x, 
BitmapColor(*p));
+const sal_uInt8 nValue = bReverseAlpha ? 0xff - *p : *p;
+xMaskAcc->SetPixelOnData(pMaskScanLine, x, 
BitmapColor(nValue));
 p += 4;
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-07-25 Thread Stephan Bergmann (via logerrit)
 sd/source/ui/view/sdwindow.cxx |   10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 3f88c646a911e4b25f4866eda75ac38b978c4fd0
Author: Stephan Bergmann 
AuthorDate: Sun Jul 25 21:50:37 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Sun Jul 25 22:35:46 2021 +0200

Avoid some division by zero

...as seen when running under UBSan `instdir/program/soffice --headless
--convert-to epub` of 
caolan/SIGSEGV-270412-142321-SIGSEGV-150412-121455-91.pptx
from the crash-testing corpus

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

diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx
index c69b0cf3211b..8c0d58f50cec 100644
--- a/sd/source/ui/view/sdwindow.cxx
+++ b/sd/source/ui/view/sdwindow.cxx
@@ -630,7 +630,7 @@ void Window::UpdateMapMode()
  */
 double Window::GetVisibleX() const
 {
-return (static_cast(maWinPos.X()) / maViewSize.Width());
+return maViewSize.Width() == 0 ? 0 : (static_cast(maWinPos.X()) / 
maViewSize.Width());
 }
 
 /**
@@ -639,7 +639,7 @@ double Window::GetVisibleX() const
  */
 double Window::GetVisibleY() const
 {
-return (static_cast(maWinPos.Y()) / maViewSize.Height());
+return maViewSize.Height() == 0 ? 0 : (static_cast(maWinPos.Y()) / 
maViewSize.Height());
 }
 
 /**
@@ -669,7 +669,8 @@ double Window::GetVisibleWidth() const
 Size aWinSize = PixelToLogic(GetOutputSizePixel());
 if ( aWinSize.Width() > maViewSize.Width() )
 aWinSize.setWidth( maViewSize.Width() );
-return (static_cast(aWinSize.Width()) / maViewSize.Width());
+return
+maViewSize.Width() == 0 ? 0 : (static_cast(aWinSize.Width()) / 
maViewSize.Width());
 }
 
 /**
@@ -681,7 +682,8 @@ double Window::GetVisibleHeight() const
 Size aWinSize = PixelToLogic(GetOutputSizePixel());
 if ( aWinSize.Height() > maViewSize.Height() )
 aWinSize.setHeight( maViewSize.Height() );
-return (static_cast(aWinSize.Height()) / maViewSize.Height());
+return maViewSize.Height() == 0
+? 0 : (static_cast(aWinSize.Height()) / maViewSize.Height());
 }
 
 Point Window::GetVisibleCenter()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: chart2/qa cui/source dbaccess/source include/unotools sax/source sc/source sfx2/source sw/source unotools/source xmloff/source

2021-07-25 Thread Noel Grandin (via logerrit)
 chart2/qa/extras/chart2geometry.cxx  |7 
 cui/source/options/optsave.cxx   |8 
 dbaccess/source/core/dataaccess/databasedocument.cxx |2 
 include/unotools/saveopt.hxx |   35 --
 sax/source/tools/converter.cxx   |1 
 sc/source/filter/excel/xeroot.cxx|1 
 sfx2/source/appl/appcfg.cxx  |2 
 sfx2/source/dialog/alienwarn.cxx |1 
 sfx2/source/inc/appdata.hxx  |1 
 sw/source/filter/ww8/attributeoutputbase.hxx |2 
 unotools/source/config/saveopt.cxx   |  298 ++-
 xmloff/source/core/xmlexp.cxx|5 
 xmloff/source/style/xmlexppr.cxx |2 
 13 files changed, 58 insertions(+), 307 deletions(-)

New commits:
commit 134f40136a9bea265d8f2fedfdb41a1e65d81b49
Author: Noel Grandin 
AuthorDate: Sat Jul 24 16:56:15 2021 +0200
Commit: Noel Grandin 
CommitDate: Sun Jul 25 20:05:30 2021 +0200

use officecfg to retrieve OdfDefaultVersion

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

diff --git a/chart2/qa/extras/chart2geometry.cxx 
b/chart2/qa/extras/chart2geometry.cxx
index c1fe65fa927d..bcfa0d7276af 100644
--- a/chart2/qa/extras/chart2geometry.cxx
+++ b/chart2/qa/extras/chart2geometry.cxx
@@ -440,9 +440,8 @@ void Chart2GeometryTest::testTdf135366_CustomLabelText()
 {
 // Error was, that custom text in a data label was only exported in ODF 
extended,
 // although the used  element exists since ODF 1.2.
-SvtSaveOptions aSaveOpt;
-const SvtSaveOptions::ODFDefaultVersion 
nCurrentODFVersion(aSaveOpt.GetODFDefaultVersion());
-aSaveOpt.SetODFDefaultVersion(SvtSaveOptions::ODFVER_012);
+const SvtSaveOptions::ODFDefaultVersion 
nCurrentODFVersion(GetODFDefaultVersion());
+SetODFDefaultVersion(SvtSaveOptions::ODFVER_012);
 load(u"/chart2/qa/extras/data/pptx/", "tdf135366_CustomLabelText.pptx");
 xmlDocUniquePtr pXmlDoc = parseExport("Object 1/content.xml", "impress8");
 CPPUNIT_ASSERT(pXmlDoc);
@@ -457,7 +456,7 @@ void Chart2GeometryTest::testTdf135366_CustomLabelText()
 const OUString sOUTextContent = getXPathContent(pXmlDoc, sCustomTextPath);
 CPPUNIT_ASSERT_EQUAL(OUString("Custom"), sOUTextContent);
 
-aSaveOpt.SetODFDefaultVersion(nCurrentODFVersion);
+SetODFDefaultVersion(nCurrentODFVersion);
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(Chart2GeometryTest);
diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index 208bf8289f2e..14194720b7c0 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -227,7 +227,6 @@ bool SvxSaveTabPage::FillItemSet( SfxItemSet* rSet )
 {
 auto xChanges = comphelper::ConfigurationChanges::create();
 bool bModified = false;
-SvtSaveOptions aSaveOpt;
 if(m_xLoadUserSettingsCB->get_state_changed_from_saved())
 
officecfg::Office::Common::Load::UserDefinedSettings::set(m_xLoadUserSettingsCB->get_active(),
 xChanges);
 
@@ -237,7 +236,7 @@ bool SvxSaveTabPage::FillItemSet( SfxItemSet* rSet )
 if ( m_xODFVersionLB->get_value_changed_from_saved() )
 {
 sal_Int32 nVersion = m_xODFVersionLB->get_active_id().toInt32();
-aSaveOpt.SetODFDefaultVersion( SvtSaveOptions::ODFDefaultVersion( 
nVersion ) );
+SetODFDefaultVersion( SvtSaveOptions::ODFDefaultVersion( nVersion ), 
xChanges );
 }
 
 if ( m_xDocInfoCB->get_state_changed_from_saved() )
@@ -364,7 +363,6 @@ static bool isODFFormat( const OUString& sFilter )
 
 void SvxSaveTabPage::Reset( const SfxItemSet* )
 {
-SvtSaveOptions aSaveOpt;
 
m_xLoadUserSettingsCB->set_active(officecfg::Office::Common::Load::UserDefinedSettings::get());
 m_xLoadUserSettingsCB->save_state();
 
m_xLoadUserSettingsCB->set_sensitive(!officecfg::Office::Common::Load::UserDefinedSettings::isReadOnly());
@@ -456,9 +454,9 @@ void SvxSaveTabPage::Reset( const SfxItemSet* )
 
m_xRelativeInetCB->set_active(officecfg::Office::Common::Save::URL::Internet::get());
 
m_xRelativeInetCB->set_sensitive(!officecfg::Office::Common::Save::URL::Internet::isReadOnly());
 
-sal_Int32 nDefaultVersion = aSaveOpt.GetODFDefaultVersion();
+sal_Int32 nDefaultVersion = GetODFDefaultVersion();
 m_xODFVersionLB->set_active_id(OUString::number(nDefaultVersion));
-
m_xODFVersionLB->set_sensitive(!aSaveOpt.IsReadOnly(SvtSaveOptions::EOption::OdfDefaultVersion));
+
m_xODFVersionLB->set_sensitive(!officecfg::Office::Common::Save::ODF::DefaultVersion::isReadOnly());
 
 AutoClickHdl_Impl(*m_xAutoSaveCB);
 ODFVersionHdl_Impl(*m_xODFVersionLB);
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx 
b/dbaccess/source/core/dataaccess/databasedocument.cxx
index c8a75c1e725

[Libreoffice-commits] core.git: cui/source drawinglayer/inc drawinglayer/source include/svtools include/svx sc/source sd/source sfx2/source svtools/source svx/source sw/source

2021-07-25 Thread Noel Grandin (via logerrit)
 cui/source/dialogs/screenshotannotationdlg.cxx  |7 
 cui/source/options/optgdlg.cxx  |9 
 cui/source/options/optgdlg.hxx  |2 
 cui/source/tabpages/grfpage.cxx |7 
 cui/source/tabpages/page.cxx|   17 
 drawinglayer/inc/processor3d/defaultprocessor3d.hxx |7 
 drawinglayer/source/primitive2d/controlprimitive2d.cxx  |3 
 drawinglayer/source/primitive2d/sceneprimitive2d.cxx|5 
 drawinglayer/source/processor2d/vclpixelprocessor2d.cxx |   15 
 drawinglayer/source/processor2d/vclprocessor2d.cxx  |   10 
 drawinglayer/source/processor2d/vclprocessor2d.hxx  |7 
 drawinglayer/source/processor3d/defaultprocessor3d.cxx  |1 
 drawinglayer/source/processor3d/zbufferprocessor3d.cxx  |3 
 include/svtools/optionsdrawinglayer.hxx |  182 +--
 include/svx/sdr/overlay/overlaymanager.hxx  |7 
 include/svx/svdpntv.hxx |9 
 sc/source/ui/view/drawvie3.cxx  |5 
 sc/source/ui/view/gridwin.cxx   |4 
 sd/source/ui/view/sdview.cxx|5 
 sfx2/source/control/thumbnailview.cxx   |3 
 svtools/source/config/optionsdrawinglayer.cxx   |  941 +---
 svx/source/dialog/weldeditview.cxx  |3 
 svx/source/sdr/contact/viewcontactofsdrpathobj.cxx  |5 
 svx/source/sdr/overlay/overlaymanager.cxx   |6 
 svx/source/sdr/overlay/overlaymanagerbuffered.cxx   |3 
 svx/source/sdr/overlay/overlaypolypolygon.cxx   |6 
 svx/source/sdr/overlay/overlayrollingrectangle.cxx  |6 
 svx/source/sdr/overlay/overlayselection.cxx |7 
 svx/source/svdraw/sdrpagewindow.cxx |4 
 svx/source/svdraw/sdrpaintwindow.cxx|9 
 svx/source/svdraw/svddrgmt.cxx  |   22 
 svx/source/svdraw/svddrgv.cxx   |5 
 svx/source/svdraw/svdedxv.cxx   |   12 
 svx/source/svdraw/svdhdl.cxx|9 
 svx/source/svdraw/svdmrkv.cxx   |4 
 svx/source/svdraw/svdpntv.cxx   |5 
 svx/source/table/tablehandles.cxx   |6 
 svx/source/unodraw/UnoGraphicExporter.cxx   |8 
 sw/source/core/crsr/viscrs.cxx  |8 
 sw/source/core/doc/notxtfrm.cxx |8 
 sw/source/core/draw/dview.cxx   |9 
 sw/source/core/inc/dview.hxx|2 
 sw/source/core/layout/paintfrm.cxx  |5 
 sw/source/uibase/docvw/OverlayRanges.cxx|4 
 sw/source/uibase/sidebar/PageFormatPanel.cxx|5 
 45 files changed, 283 insertions(+), 1127 deletions(-)

New commits:
commit 28993c0a8d8628c650b661767fd8ab2228c507d9
Author: Noel Grandin 
AuthorDate: Sun Jul 25 15:05:51 2021 +0200
Commit: Noel Grandin 
CommitDate: Sun Jul 25 20:05:10 2021 +0200

use officecfg for drawing options

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

diff --git a/cui/source/dialogs/screenshotannotationdlg.cxx 
b/cui/source/dialogs/screenshotannotationdlg.cxx
index 4a93d7b16aad..bdae7f003b8d 100644
--- a/cui/source/dialogs/screenshotannotationdlg.cxx
+++ b/cui/source/dialogs/screenshotannotationdlg.cxx
@@ -440,10 +440,9 @@ void ScreenshotAnnotationDlg_Impl::RepaintToBuffer(
 bUseDimmed ? maDimmedDialogBitmap : maParentDialogBitmap);
 
 // get various options
-const SvtOptionsDrawinglayer aSvtOptionsDrawinglayer;
-const Color aHilightColor(aSvtOptionsDrawinglayer.getHilightColor());
-const double 
fTransparence(aSvtOptionsDrawinglayer.GetTransparentSelectionPercent() * 0.01);
-const bool bIsAntiAliasing(aSvtOptionsDrawinglayer.IsAntiAliasing());
+const Color aHilightColor(SvtOptionsDrawinglayer::getHilightColor());
+const double 
fTransparence(SvtOptionsDrawinglayer::GetTransparentSelectionPercent() * 0.01);
+const bool bIsAntiAliasing(SvtOptionsDrawinglayer::IsAntiAliasing());
 const AntialiasingFlags nOldAA(mxVirtualBufferDevice->GetAntialiasing());
 
 if (bIsAntiAliasing)
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index f1f46e144701..30ca6b79a068 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -522,7 +522,6 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, 
weld::DialogController* p
 , nStyleLB_InitialSelection(0)
 , pAppearanceCfg(new SvtTabAppearanceCfg)
 , pCanvasSettings(new CanvasSettings)
-, mpDrawinglayerOpt(new SvtOptionsDrawinglayer)
 , m_xIconSi

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

2021-07-25 Thread Noel Grandin (via logerrit)
 cui/source/options/optsave.cxx |   12 ++-
 include/unotools/saveopt.hxx   |3 -
 sw/source/filter/xml/xmlimp.cxx|4 +-
 unotools/source/config/saveopt.cxx |   59 -
 4 files changed, 6 insertions(+), 72 deletions(-)

New commits:
commit 2b71e0683cf8a34aaddce3558b941ba62b1b4ec5
Author: Noel Grandin 
AuthorDate: Sat Jul 24 14:23:54 2021 +0200
Commit: Noel Grandin 
CommitDate: Sun Jul 25 16:50:03 2021 +0200

use officecfg to retrieve LoadUserSettings

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

diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index 3ac609d8e64f..208bf8289f2e 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -225,19 +225,14 @@ void SvxSaveTabPage::DetectHiddenControls()
 
 bool SvxSaveTabPage::FillItemSet( SfxItemSet* rSet )
 {
+auto xChanges = comphelper::ConfigurationChanges::create();
 bool bModified = false;
 SvtSaveOptions aSaveOpt;
 if(m_xLoadUserSettingsCB->get_state_changed_from_saved())
-{
-aSaveOpt.SetLoadUserSettings(m_xLoadUserSettingsCB->get_active());
-}
+
officecfg::Office::Common::Load::UserDefinedSettings::set(m_xLoadUserSettingsCB->get_active(),
 xChanges);
 
 if ( m_xLoadDocPrinterCB->get_state_changed_from_saved() )
-{
-auto xChanges = comphelper::ConfigurationChanges::create();
 
officecfg::Office::Common::Save::Document::LoadPrinter::set(m_xLoadDocPrinterCB->get_active(),
 xChanges);
-xChanges->commit();
-}
 
 if ( m_xODFVersionLB->get_value_changed_from_saved() )
 {
@@ -329,6 +324,7 @@ bool SvxSaveTabPage::FillItemSet( SfxItemSet* rSet )
 pImpl->aDefaultArr[APP_WRITER_GLOBAL] != 
aModuleOpt.GetFactoryDefaultFilter(SvtModuleOptions::EFactory::WRITERGLOBAL))
 
aModuleOpt.SetFactoryDefaultFilter(SvtModuleOptions::EFactory::WRITERGLOBAL, 
pImpl->aDefaultArr[APP_WRITER_GLOBAL]);
 
+xChanges->commit();
 return bModified;
 }
 
@@ -369,7 +365,7 @@ static bool isODFFormat( const OUString& sFilter )
 void SvxSaveTabPage::Reset( const SfxItemSet* )
 {
 SvtSaveOptions aSaveOpt;
-m_xLoadUserSettingsCB->set_active(aSaveOpt.IsLoadUserSettings());
+
m_xLoadUserSettingsCB->set_active(officecfg::Office::Common::Load::UserDefinedSettings::get());
 m_xLoadUserSettingsCB->save_state();
 
m_xLoadUserSettingsCB->set_sensitive(!officecfg::Office::Common::Load::UserDefinedSettings::isReadOnly());
 m_xLoadDocPrinterCB->set_active( 
officecfg::Office::Common::Save::Document::LoadPrinter::get() );
diff --git a/include/unotools/saveopt.hxx b/include/unotools/saveopt.hxx
index 17fcf3affdfd..2793187ec621 100644
--- a/include/unotools/saveopt.hxx
+++ b/include/unotools/saveopt.hxx
@@ -77,9 +77,6 @@ public:
 SvtSaveOptions();
 virtual ~SvtSaveOptions() override;
 
-voidSetLoadUserSettings(bool b);
-boolIsLoadUserSettings() const;
-
 voidSetODFDefaultVersion( ODFDefaultVersion eVersion );
 ODFDefaultVersion   GetODFDefaultVersion() const;
 ODFSaneDefaultVersion   GetODFSaneDefaultVersion() const;
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index 4fd946b8f0e5..4e03cb1ae623 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -76,6 +76,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -1283,8 +1284,7 @@ void SwXMLImport::SetConfigurationSettings(const Sequence 
< PropertyValue > & aC
 "EmptyDbFieldHidesPara"
 };
 
-SvtSaveOptions aSaveOpt;
-bool bAreUserSettingsFromDocument = aSaveOpt.IsLoadUserSettings();
+bool bAreUserSettingsFromDocument = 
officecfg::Office::Common::Load::UserDefinedSettings::get();
 
 // for some properties we don't want to use the application
 // default if they're missing. So we watch for them in the loop
diff --git a/unotools/source/config/saveopt.cxx 
b/unotools/source/config/saveopt.cxx
index 615cc033acd3..aa7e875e1d97 100644
--- a/unotools/source/config/saveopt.cxx
+++ b/unotools/source/config/saveopt.cxx
@@ -48,7 +48,6 @@ class SvtLoadOptions_Impl;
 struct SvtLoadSaveOptions_Impl
 {
 std::unique_ptr pSaveOpt;
-std::unique_ptr pLoadOpt;
 };
 
 static std::unique_ptr pOptions;
@@ -233,51 +232,6 @@ void SvtSaveOptions_Impl::Notify( const 
Sequence& )
 {
 }
 
-namespace {
-
-class SvtLoadOptions_Impl : public utl::ConfigItem
-{
-private:
-boolbLoadUserDefinedSettings;
-
-virtual voidImplCommit() override;
-
-public:
-SvtLoadOptions_Impl();
-
-virtual voidNotify( const css::uno::Sequence< OUString >& 
aPropertyNames ) override;
-
-voidSetLoadUserSettings(bool 
b){

[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - desktop/source sc/source

2021-07-25 Thread Eike Rathke (via logerrit)
 desktop/source/app/dispatchwatcher.cxx |   19 +++--
 sc/source/ui/docshell/docsh.cxx|   48 +++--
 2 files changed, 45 insertions(+), 22 deletions(-)

New commits:
commit 55f0121dd7ed2d7e84adc597bdd24ca40e0b0ce4
Author: Eike Rathke 
AuthorDate: Tue Jul 20 23:09:59 2021 +0200
Commit: Caolán McNamara 
CommitDate: Sun Jul 25 15:54:14 2021 +0200

Related: tdf#135762 Suppress cout if not command line

Change-Id: I9431221aadf97739bb197871f25fa151ef4c391c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119294
Reviewed-by: Eike Rathke 
Tested-by: Jenkins
(cherry picked from commit 0cda081c9aa3b3dcb363f97bac60c845ce9a13e0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119255
Reviewed-by: Caolán McNamara 

diff --git a/desktop/source/app/dispatchwatcher.cxx 
b/desktop/source/app/dispatchwatcher.cxx
index 1c4d878614c5..0e39415d8fab 100644
--- a/desktop/source/app/dispatchwatcher.cxx
+++ b/desktop/source/app/dispatchwatcher.cxx
@@ -608,15 +608,17 @@ bool DispatchWatcher::executeDispatchRequests( const 
std::vector conversionProperties( 
nProps );
-conversionProperties[0].Name = "Overwrite";
-conversionProperties[0].Value <<= true;
+conversionProperties[0].Name = 
"ConversionRequestOrigin";
+conversionProperties[0].Value <<= 
OUString("CommandLine");
+conversionProperties[1].Name = "Overwrite";
+conversionProperties[1].Value <<= true;
 
-conversionProperties[1].Name = "FilterName";
+conversionProperties[2].Name = "FilterName";
 if( 0 < nFilterOptionsIndex )
 {
 OUString sFilterName = aFilter.copy(0, 
nFilterOptionsIndex);
@@ -641,18 +643,19 @@ bool DispatchWatcher::executeDispatchRequests( const 
std::vector & rArgs = 
rMed.GetArgs();
+const auto pProp = std::find_if( rArgs.begin(), rArgs.end(),
+[](const css::beans::PropertyValue& rProp) { return 
rProp.Name == "ConversionRequestOrigin"; });
+if (pProp != rArgs.end())
+{
+OUString aOrigin;
+pProp->Value >>= aOrigin;
+bVerbose = (aOrigin == "CommandLine");
+}
+
 SCTAB nStartTab;
 SCTAB nCount = m_aDocument.GetTableCount();
 if (aOptions.nSheetToExport == -1)
@@ -2433,11 +2446,14 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed )
 else
 {
 // Usage error, no export but log.
-if (aOptions.nSheetToExport < 0)
-std::cout << "Bad sheet number string given." << std::endl;
-else
-std::cout << "No sheet number " << 
OString::number(aOptions.nSheetToExport)
-<< ", number of sheets is 
" << nCount << std::endl;
+if (bVerbose)
+{
+if (aOptions.nSheetToExport < 0)
+std::cout << "Bad sheet number string given." << 
std::endl;
+else
+std::cout << "No sheet number " << 
aOptions.nSheetToExport
+<< ", number of sheets is " << nCount << std::endl;
+}
 nStartTab = 0;
 nCount = 0;
 SetError(SCERR_EXPORT_DATA);
@@ -2462,15 +2478,19 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed )
 
 // log similar to DispatchWatcher::executeDispatchRequests
 OUString aOutFile = 
aSheetURLObject.GetMainURL(INetURLObject::DecodeMechanism::NONE);
-OUString aDisplayedName;
-if (osl::FileBase::E_None != 
osl::FileBase::getSystemPathFromFileURL(aOutFile, aDisplayedName))
-aDisplayedName = aOutFile;
-std::cout << "Writing sheet " << OUStringToOString(sTabName, 
osl_getThreadTextEncoding()) << " -> "
-  << 
OUStringToOString(aDisplayedName, osl_getThreadTextEncoding())
-  << std::endl;
-
-if (FStatHelper::IsDocument(aOutFile))
-std::cout << "Overwriting: " << 
OUStringToOString(aDisplayedName, osl_getThreadTextEncoding()) << std::endl ;
+if (bVerbose)
+{
+OUString aDisplayedName;
+if (osl::FileBase::E_None != 
osl::FileBase::getSystemPathFromFileURL(aOutFile, aDisplayedName))
+aDisplayedName = aOutFile;
+std::cout << "Writing sheet " << 
OUStringToOString(sTabName, osl_getThreadTextEncoding()) << " -> "
+

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

2021-07-25 Thread Caolán McNamara (via logerrit)
 emfio/source/reader/emfreader.cxx |9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 5d83e940f7636050891f52929ace29650025cd36
Author: Caolán McNamara 
AuthorDate: Sun Jul 25 12:13:48 2021 +0100
Commit: Caolán McNamara 
CommitDate: Sun Jul 25 15:42:16 2021 +0200

ofz#36481 Timeout

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

diff --git a/emfio/source/reader/emfreader.cxx 
b/emfio/source/reader/emfreader.cxx
index 1b9e8ec34326..c0aecda9f680 100644
--- a/emfio/source/reader/emfreader.cxx
+++ b/emfio/source/reader/emfreader.cxx
@@ -370,9 +370,12 @@ bool ImplReadRegion( basegfx::B2DPolyPolygon& rPolyPoly, 
SvStream& rStream, sal_
 rPolyPoly.append( basegfx::utils::createPolygonFromRect( 
::basegfx::B2DRectangle( nLeft, nTop, nRight, nBottom ) ) );
 SAL_INFO("emfio", "\t\t" << i << " Left: " << nLeft << ", top: " << 
nTop << ", right: " << nRight << ", bottom: " << nBottom);
 }
-rPolyPoly = basegfx::utils::solveCrossovers(rPolyPoly);
-rPolyPoly = basegfx::utils::stripNeutralPolygons(rPolyPoly);
-rPolyPoly = basegfx::utils::stripDispensablePolygons(rPolyPoly);
+if (!utl::ConfigManager::IsFuzzing())
+{
+rPolyPoly = basegfx::utils::solveCrossovers(rPolyPoly);
+rPolyPoly = basegfx::utils::stripNeutralPolygons(rPolyPoly);
+rPolyPoly = basegfx::utils::stripDispensablePolygons(rPolyPoly);
+}
 return true;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source include/unotools unotools/source

2021-07-25 Thread Noel Grandin (via logerrit)
 cui/source/options/optgenrl.cxx|   10 +++--
 cui/source/options/optsave.cxx |1 
 include/unotools/saveopt.hxx   |4 --
 unotools/source/config/saveopt.cxx |   66 ++---
 4 files changed, 11 insertions(+), 70 deletions(-)

New commits:
commit 60fc68e547cf70f82e681c9a17b4f3e5c124aa39
Author: Noel Grandin 
AuthorDate: Sat Jul 24 13:38:46 2021 +0200
Commit: Noel Grandin 
CommitDate: Sun Jul 25 15:31:25 2021 +0200

use officecfg to retrieve UseUserData

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

diff --git a/cui/source/options/optgenrl.cxx b/cui/source/options/optgenrl.cxx
index 66c734af1194..df31ee10522d 100644
--- a/cui/source/options/optgenrl.cxx
+++ b/cui/source/options/optgenrl.cxx
@@ -34,6 +34,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -349,10 +350,11 @@ bool SvxGeneralTabPage::FillItemSet( SfxItemSet* )
 
 bool bModified = false;
 bModified |= GetData_Impl();
-SvtSaveOptions aSaveOpt;
-if (m_xUseDataCB->get_active() != aSaveOpt.IsUseUserData())
+if (m_xUseDataCB->get_active() != 
officecfg::Office::Common::Save::Document::UseUserData::get())
 {
-aSaveOpt.SetUseUserData(m_xUseDataCB->get_active());
+auto xChanges = comphelper::ConfigurationChanges::create();
+
officecfg::Office::Common::Save::Document::UseUserData::set(m_xUseDataCB->get_active(),
 xChanges);
+xChanges->commit();
 bModified = true;
 }
 return bModified;
@@ -377,7 +379,7 @@ void SvxGeneralTabPage::Reset( const SfxItemSet* rSet )
 vFields.front()->xEdit->grab_focus();
 }
 
-m_xUseDataCB->set_active(SvtSaveOptions().IsUseUserData());
+
m_xUseDataCB->set_active(officecfg::Office::Common::Save::Document::UseUserData::get());
 }
 
 
diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index 8748f55f4a7d..3ac609d8e64f 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -41,6 +41,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
diff --git a/include/unotools/saveopt.hxx b/include/unotools/saveopt.hxx
index 008c139a5ff6..17fcf3affdfd 100644
--- a/include/unotools/saveopt.hxx
+++ b/include/unotools/saveopt.hxx
@@ -31,7 +31,6 @@ public:
 
 enum class EOption
 {
-UseUserData,
 OdfDefaultVersion
 };
 
@@ -78,9 +77,6 @@ public:
 SvtSaveOptions();
 virtual ~SvtSaveOptions() override;
 
-voidSetUseUserData( bool b );
-boolIsUseUserData() const;
-
 voidSetLoadUserSettings(bool b);
 boolIsLoadUserSettings() const;
 
diff --git a/unotools/source/config/saveopt.cxx 
b/unotools/source/config/saveopt.cxx
index 23632e4fcb62..615cc033acd3 100644
--- a/unotools/source/config/saveopt.cxx
+++ b/unotools/source/config/saveopt.cxx
@@ -59,13 +59,11 @@ namespace {
 class SvtSaveOptions_Impl : public utl::ConfigItem
 {
 sal_Int32   nAutoSaveTime;
-boolbUseUserData,
-bAutoSave;
+boolbAutoSave;
 
 SvtSaveOptions::ODFDefaultVersion   eODFDefaultVersion;
 
-boolbROUseUserData,
-bROODFDefaultVersion;
+boolbROODFDefaultVersion;
 
 virtual voidImplCommit() override;
 
@@ -74,12 +72,9 @@ public:
 
 virtual voidNotify( const css::uno::Sequence< OUString >& 
aPropertyNames ) override;
 
-boolIsUseUserData() const   { return 
bUseUserData; }
-
 SvtSaveOptions::ODFDefaultVersion
 GetODFDefaultVersion() const{ return 
eODFDefaultVersion; }
 
-voidSetUseUserData( bool b );
 voidSetODFDefaultVersion( 
SvtSaveOptions::ODFDefaultVersion eNew );
 
 boolIsReadOnly( SvtSaveOptions::EOption eOption ) const;
@@ -87,15 +82,6 @@ public:
 
 }
 
-void SvtSaveOptions_Impl::SetUseUserData( bool b )
-{
-if (!bROUseUserData && bUseUserData!=b)
-{
-bUseUserData = b;
-SetModified();
-}
-}
-
 void SvtSaveOptions_Impl::SetODFDefaultVersion( 
SvtSaveOptions::ODFDefaultVersion eNew )
 {
 if ( !bROODFDefaultVersion && eODFDefaultVersion != eNew )
@@ -110,9 +96,6 @@ bool SvtSaveOptions_Impl::IsReadOnly( 
SvtSaveOptions::EOption eOption ) const
 bool bReadOnly = CFG_READONLY_DEFAULT;
 switch(eOption)
 {
-case SvtSaveOptions::EOption::UseUserData :
-bReadOnly = bROUseUserData;
-break;
 case SvtSaveOptions::EOption::OdfDefaultVersion :
 bReadOnly = bROODFDefaultVersion;
 break;
@@ -12

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

2021-07-25 Thread Caolán McNamara (via logerrit)
 sw/source/filter/inc/wwstyles.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1d2fb25e268838ccc23b264330b956f1c31f25dd
Author: Caolán McNamara 
AuthorDate: Sun Jul 25 12:01:04 2021 +0100
Commit: Caolán McNamara 
CommitDate: Sun Jul 25 14:29:18 2021 +0200

ofz#36537 Invalid-enum-value

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

diff --git a/sw/source/filter/inc/wwstyles.hxx 
b/sw/source/filter/inc/wwstyles.hxx
index 1cc6fdcc69c0..32dce11e3692 100644
--- a/sw/source/filter/inc/wwstyles.hxx
+++ b/sw/source/filter/inc/wwstyles.hxx
@@ -24,7 +24,7 @@
 
 namespace ww
 {
-enum sti
+enum sti : sal_uInt16
 {
 stiNormal = 0,  // 0x
 stiLev1 = 1,// 0x0001
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-07-25 Thread Noel Grandin (via logerrit)
 cui/source/options/optsave.cxx |4 +--
 include/unotools/saveopt.hxx   |4 ---
 sfx2/source/appl/appcfg.cxx|9 +--
 sfx2/source/doc/objstor.cxx|2 -
 unotools/source/config/saveopt.cxx |   44 -
 5 files changed, 10 insertions(+), 53 deletions(-)

New commits:
commit f4fc908d00bf1fb05cdca89cdfd2f0c3b83723eb
Author: Noel Grandin 
AuthorDate: Sat Jul 24 10:46:29 2021 +0200
Commit: Noel Grandin 
CommitDate: Sun Jul 25 13:40:07 2021 +0200

use officecfg to retrieve CreateBackup

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

diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index 8b3d3f1b86fa..8748f55f4a7d 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -437,8 +437,8 @@ void SvxSaveTabPage::Reset( const SfxItemSet* )
 
m_xDocInfoCB->set_active(officecfg::Office::Common::Save::Document::EditProperty::get());
 
m_xDocInfoCB->set_sensitive(!officecfg::Office::Common::Save::Document::EditProperty::isReadOnly());
 
-m_xBackupCB->set_active(aSaveOpt.IsBackup());
-
m_xBackupCB->set_sensitive(!aSaveOpt.IsReadOnly(SvtSaveOptions::EOption::Backup));
+
m_xBackupCB->set_active(officecfg::Office::Common::Save::Document::CreateBackup::get());
+
m_xBackupCB->set_sensitive(!officecfg::Office::Common::Save::Document::CreateBackup::isReadOnly());
 
 
m_xAutoSaveCB->set_active(officecfg::Office::Common::Save::Document::AutoSave::get());
 
m_xAutoSaveCB->set_sensitive(!officecfg::Office::Common::Save::Document::AutoSave::isReadOnly());
diff --git a/include/unotools/saveopt.hxx b/include/unotools/saveopt.hxx
index fafab60f3568..008c139a5ff6 100644
--- a/include/unotools/saveopt.hxx
+++ b/include/unotools/saveopt.hxx
@@ -32,7 +32,6 @@ public:
 enum class EOption
 {
 UseUserData,
-Backup,
 OdfDefaultVersion
 };
 
@@ -82,9 +81,6 @@ public:
 voidSetUseUserData( bool b );
 boolIsUseUserData() const;
 
-voidSetBackup( bool b );
-boolIsBackup() const;
-
 voidSetLoadUserSettings(bool b);
 boolIsLoadUserSettings() const;
 
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index e36ffd2d60e5..5ed88bc71625 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -134,8 +134,9 @@ void SfxApplication::GetOptions( SfxItemSet& rSet )
 case SID_ATTR_BACKUP :
 {
 bRet = true;
-if 
(!aSaveOptions.IsReadOnly(SvtSaveOptions::EOption::Backup))
-if (!rSet.Put( SfxBoolItem( rPool.GetWhich( 
SID_ATTR_BACKUP ),aSaveOptions.IsBackup(
+if 
(!officecfg::Office::Common::Save::Document::CreateBackup::isReadOnly())
+if (!rSet.Put( SfxBoolItem( rPool.GetWhich( 
SID_ATTR_BACKUP ),
+
officecfg::Office::Common::Save::Document::CreateBackup::get() )))
 bRet = false;
 }
 break;
@@ -434,7 +435,9 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& 
rSet )
 if ( SfxItemState::SET == 
rSet.GetItemState(rPool.GetWhich(SID_ATTR_BACKUP), true, &pItem) )
 {
 DBG_ASSERT(dynamic_cast< const SfxBoolItem *>( pItem ) !=  nullptr, 
"BoolItem expected");
-aSaveOptions.SetBackup( static_cast(pItem)->GetValue() );
+officecfg::Office::Common::Save::Document::CreateBackup::set(
+static_cast(pItem)->GetValue(),
+batch );
 }
 
 // PrettyPrinting
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 4e3a66e51e20..3f92ffdea7b8 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -1228,7 +1228,7 @@ bool SfxObjectShell::SaveTo_Impl
 
 // before we overwrite the original file, we will make a backup if 
there is a demand for that
 // if the backup is not created here it will be created internally and 
will be removed in case of successful saving
-const bool bDoBackup = SvtSaveOptions().IsBackup();
+const bool bDoBackup = 
officecfg::Office::Common::Save::Document::CreateBackup::get();
 if ( bDoBackup )
 {
 rMedium.DoBackup_Impl();
diff --git a/unotools/source/config/saveopt.cxx 
b/unotools/source/config/saveopt.cxx
index 46fac1c81094..23632e4fcb62 100644
--- a/unotools/source/config/saveopt.cxx
+++ b/unotools/source/config/saveopt.cxx
@@ -60,13 +60,11 @@ class SvtSaveOptions_Impl : public utl::ConfigItem
 {
 sal_Int32   nAutoSaveTime;
 boolbUseUserData,
-  

[Libreoffice-commits] core.git: cui/source include/unotools unotools/source

2021-07-25 Thread Noel Grandin (via logerrit)
 cui/source/options/optsave.cxx |   10 +--
 include/unotools/saveopt.hxx   |4 ---
 unotools/source/config/saveopt.cxx |   47 +
 3 files changed, 9 insertions(+), 52 deletions(-)

New commits:
commit 293c1a629a69822b4a9996d0522513bc2a0d78e1
Author: Noel Grandin 
AuthorDate: Sat Jul 24 09:30:49 2021 +0200
Commit: Noel Grandin 
CommitDate: Sun Jul 25 12:56:18 2021 +0200

use officecfg to retrieve LoadDocumentPrinter

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

diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index b6fb9e819682..8b3d3f1b86fa 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -232,7 +232,11 @@ bool SvxSaveTabPage::FillItemSet( SfxItemSet* rSet )
 }
 
 if ( m_xLoadDocPrinterCB->get_state_changed_from_saved() )
-aSaveOpt.SetLoadDocumentPrinter( m_xLoadDocPrinterCB->get_active() );
+{
+auto xChanges = comphelper::ConfigurationChanges::create();
+
officecfg::Office::Common::Save::Document::LoadPrinter::set(m_xLoadDocPrinterCB->get_active(),
 xChanges);
+xChanges->commit();
+}
 
 if ( m_xODFVersionLB->get_value_changed_from_saved() )
 {
@@ -367,9 +371,9 @@ void SvxSaveTabPage::Reset( const SfxItemSet* )
 m_xLoadUserSettingsCB->set_active(aSaveOpt.IsLoadUserSettings());
 m_xLoadUserSettingsCB->save_state();
 
m_xLoadUserSettingsCB->set_sensitive(!officecfg::Office::Common::Load::UserDefinedSettings::isReadOnly());
-m_xLoadDocPrinterCB->set_active( aSaveOpt.IsLoadDocumentPrinter() );
+m_xLoadDocPrinterCB->set_active( 
officecfg::Office::Common::Save::Document::LoadPrinter::get() );
 m_xLoadDocPrinterCB->save_state();
-
m_xLoadDocPrinterCB->set_sensitive(!aSaveOpt.IsReadOnly(SvtSaveOptions::EOption::LoadDocPrinter));
+
m_xLoadDocPrinterCB->set_sensitive(!officecfg::Office::Common::Save::Document::LoadPrinter::isReadOnly());
 
 if ( !pImpl->bInitialized )
 {
diff --git a/include/unotools/saveopt.hxx b/include/unotools/saveopt.hxx
index 30c2f873b921..fafab60f3568 100644
--- a/include/unotools/saveopt.hxx
+++ b/include/unotools/saveopt.hxx
@@ -33,7 +33,6 @@ public:
 {
 UseUserData,
 Backup,
-LoadDocPrinter,
 OdfDefaultVersion
 };
 
@@ -89,9 +88,6 @@ public:
 voidSetLoadUserSettings(bool b);
 boolIsLoadUserSettings() const;
 
-voidSetLoadDocumentPrinter( bool _bEnable );
-boolIsLoadDocumentPrinter( ) const;
-
 voidSetODFDefaultVersion( ODFDefaultVersion eVersion );
 ODFDefaultVersion   GetODFDefaultVersion() const;
 ODFSaneDefaultVersion   GetODFSaneDefaultVersion() const;
diff --git a/unotools/source/config/saveopt.cxx 
b/unotools/source/config/saveopt.cxx
index 0900817e484e..46fac1c81094 100644
--- a/unotools/source/config/saveopt.cxx
+++ b/unotools/source/config/saveopt.cxx
@@ -61,14 +61,12 @@ class SvtSaveOptions_Impl : public utl::ConfigItem
 sal_Int32   nAutoSaveTime;
 boolbUseUserData,
 bBackup,
-bAutoSave,
-bLoadDocPrinter;
+bAutoSave;
 
 SvtSaveOptions::ODFDefaultVersion   eODFDefaultVersion;
 
 boolbROUseUserData,
 bROBackup,
-bROLoadDocPrinter,
 bROODFDefaultVersion;
 
 virtual voidImplCommit() override;
@@ -80,14 +78,12 @@ public:
 
 boolIsUseUserData() const   { return 
bUseUserData; }
 boolIsBackup() const{ return 
bBackup; }
-boolIsLoadDocPrinter() const{ return 
bLoadDocPrinter; }
 
 SvtSaveOptions::ODFDefaultVersion
 GetODFDefaultVersion() const{ return 
eODFDefaultVersion; }
 
 voidSetUseUserData( bool b );
 voidSetBackup( bool b );
-voidSetLoadDocPrinter( bool bNew );
 voidSetODFDefaultVersion( 
SvtSaveOptions::ODFDefaultVersion eNew );
 
 boolIsReadOnly( SvtSaveOptions::EOption eOption ) const;
@@ -113,15 +109,6 @@ void SvtSaveOptions_Impl::SetBackup( bool b )
 }
 }
 
-void SvtSaveOptions_Impl::SetLoadDocPrinter( bool bNew )
-{
-if ( !bROLoadDocPrinter && bLoadDocPrinter != bNew )
-{
-bLoadDocPrinter = bNew;
-SetModified();
-}
-}
-
 void SvtSaveOptions_Impl::SetODFDefaultVersion( 
SvtSaveOptions::

[Libreoffice-commits] core.git: include/svtools include/unotools sfx2/source svtools/source

2021-07-25 Thread Noel Grandin (via logerrit)
 include/svtools/printoptions.hxx   |   79 
 include/unotools/itemholderbase.hxx|2 
 sfx2/source/dialog/printopt.cxx|   11 
 svtools/source/config/itemholder2.cxx  |8 
 svtools/source/config/printoptions.cxx |  547 ++---
 5 files changed, 116 insertions(+), 531 deletions(-)

New commits:
commit c05adac9229aad0683d2e75a8f8dcd5421c66b02
Author: Noel Grandin 
AuthorDate: Sat Jul 24 22:56:15 2021 +0200
Commit: Noel Grandin 
CommitDate: Sun Jul 25 12:55:51 2021 +0200

use officecfg for print options

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

diff --git a/include/svtools/printoptions.hxx b/include/svtools/printoptions.hxx
index 72120306c5f5..6f2e86df3cf1 100644
--- a/include/svtools/printoptions.hxx
+++ b/include/svtools/printoptions.hxx
@@ -22,88 +22,15 @@
 #include 
 #include 
 #include 
-#include 
 
-namespace osl { class Mutex; }
-
-class SvtPrintOptions_Impl;
 class PrinterOptions;
 
-
-class UNLESS_MERGELIBS(SVT_DLLPUBLIC) SvtBasePrintOptions: public 
utl::detail::Options
+namespace svtools
 {
-
-SvtPrintOptions_Impl* m_pDataContainer;
-
-protected:
-
-voidSetDataContainer( SvtPrintOptions_Impl* pDataContainer ) { 
m_pDataContainer = pDataContainer; }
-
-public:
-
-static ::osl::Mutex& GetOwnStaticMutex();
-
-public:
-
-SvtBasePrintOptions();
-virtual ~SvtBasePrintOptions() override;
-
-static boolIsReduceTransparency();
-static sal_Int16   GetReducedTransparencyMode();
-static boolIsReduceGradients();
-static sal_Int16   GetReducedGradientMode();
-static sal_Int16   GetReducedGradientStepCount();
-static boolIsReduceBitmaps();
-static sal_Int16   GetReducedBitmapMode();
-static sal_Int16   GetReducedBitmapResolution();
-static boolIsReducedBitmapIncludesTransparency();
-static boolIsConvertToGreyscales();
-static boolIsPDFAsStandardPrintJobFormat();
-
-voidSetReduceTransparency( bool bState );
-voidSetReducedTransparencyMode( sal_Int16 nMode );
-voidSetReduceGradients( bool bState );
-voidSetReducedGradientMode( sal_Int16 nMode );
-voidSetReducedGradientStepCount( sal_Int16 nStepCount );
-voidSetReduceBitmaps( bool bState );
-voidSetReducedBitmapMode( sal_Int16   bState );
-voidSetReducedBitmapResolution( sal_Int16 nResolution );
-voidSetReducedBitmapIncludesTransparency( bool bState );
-voidSetConvertToGreyscales( bool bState );
-voidSetPDFAsStandardPrintJobFormat( bool bState );
-
-public:
-
-static voidGetPrinterOptions( PrinterOptions& rOptions );
-void   SetPrinterOptions( const PrinterOptions& rOptions );
+SVT_DLLPUBLIC void GetPrinterOptions( PrinterOptions& rOptions, bool bFile 
);
+SVT_DLLPUBLIC void SetPrinterOptions( const PrinterOptions& rOptions, bool 
bFile );
 };
 
 
-class UNLESS_MERGELIBS(SVT_DLLPUBLIC) SvtPrinterOptions final : public 
SvtBasePrintOptions
-{
-private:
-
-static SvtPrintOptions_Impl*m_pStaticDataContainer;
-static sal_Int32m_nRefCount;
-
-public:
-
-SvtPrinterOptions();
-virtual ~SvtPrinterOptions() override;
-};
-
-
-class UNLESS_MERGELIBS(SVT_DLLPUBLIC) SvtPrintFileOptions final : public 
SvtBasePrintOptions
-{
-private:
-
-static SvtPrintOptions_Impl*m_pStaticDataContainer;
-static sal_Int32m_nRefCount;
-
-public:
-
-SvtPrintFileOptions();
-virtual ~SvtPrintFileOptions() override;
-};
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/unotools/itemholderbase.hxx 
b/include/unotools/itemholderbase.hxx
index 3546e5fd1478..676ed455484a 100644
--- a/include/unotools/itemholderbase.hxx
+++ b/include/unotools/itemholderbase.hxx
@@ -55,8 +55,6 @@ enum class EItem
 OptionsDialogOptions  ,
 
 PathOptions   ,
-PrintOptions  ,   // 2
-PrintFileOptions  ,   // 2
 
 SecurityOptions   ,
 SysLocaleOptions  ,   // 2
diff --git a/sfx2/source/dialog/printopt.cxx b/sfx2/source/dialog/printopt.cxx
index d6fe953c785b..f94b0204cd6f 100644
--- a/sfx2/source/dialog/printopt.cxx
+++ b/sfx2/source/dialog/printopt.cxx
@@ -91,9 +91,6 @@ std::unique_ptr 
SfxCommonPrintOptionsTabPage::Create(weld::Container
 
 bool SfxCommonPrintOptionsTabPage::FillItemSet( SfxItemSet* /*rSet*/ )
 {
-SvtPrinterOptions   aPrinterOptions;
-SvtPrintFileOptions aPrintFileOptions;
-
 std::shared_ptr 
batch(comphelper::ConfigurationChanges::create());
 
 if( m_xPaperSizeCB->get_state_changed_from_saved())
@@ -107,8 +104,8 @@ bool SfxCommonPrintOptionsTabPage::FillItemSet( SfxItemSet* 
/*rSet*/ )

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

2021-07-25 Thread Andrea Gelmini (via logerrit)
 sw/qa/extras/layout/data/tdf58521-footnotes-endnotes.rtf |4 ++--
 sw/qa/extras/ooxmlexport/data/tdf143399.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport14.cxx   |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 67e47070a7580a17804adce812cc2f98bfe7b51f
Author: Andrea Gelmini 
AuthorDate: Tue Jul 20 17:01:27 2021 +0200
Commit: Julien Nabet 
CommitDate: Sun Jul 25 10:57:02 2021 +0200

Fix typo

Change-Id: I3439e53db44ec8aade2df96375ac89379a3bea5c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119285
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/sw/qa/extras/layout/data/tdf58521-footnotes-endnotes.rtf 
b/sw/qa/extras/layout/data/tdf58521-footnotes-endnotes.rtf
index 469ce3a034a1..fe8a79d9713f 100644
--- a/sw/qa/extras/layout/data/tdf58521-footnotes-endnotes.rtf
+++ b/sw/qa/extras/layout/data/tdf58521-footnotes-endnotes.rtf
@@ -60,7 +60,7 @@
 \s15\qj 
\li0\ri0\nowidctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0
 \rtlch\fcs1 \af0\afs20\alang1025 \ltrch\fcs0 
\fs20\lang1033\langfe2052\kerning2\loch\af0\hich\af0\dbch\af13\cgrid\langnp1033\langfenp2052
 {\rtlch\fcs1 \af0 
 \ltrch\fcs0 \cs17\super\insrsid12259421 \chftn }{\rtlch\fcs1 \af0 \ltrch\fcs0 
\insrsid12259421 \hich\af0\dbch\af13\loch\f0  Footnotes_graphic2}}\chftn 
{\footnote \ltrpar \pard\plain \ltrpar
 \s15\qj 
\li0\ri0\nowidctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0
 \rtlch\fcs1 \af0\afs20\alang1025 \ltrch\fcs0 
\fs20\lang1033\langfe2052\kerning2\loch\af0\hich\af0\dbch\af13\cgrid\langnp1033\langfenp2052
 {\rtlch\fcs1 \af0 
-\ltrch\fcs0 \cs17\super\insrsid12259421 \chftn }{\rtlch\fcs1 \af0 \ltrch\fcs0 
\insrsid12259421 \hich\af0\dbch\af13\loch\f0  Footnotes_grahic}}}{\rtlch\fcs1 
\af0 \ltrch\fcs0 \insrsid543414 
+\ltrch\fcs0 \cs17\super\insrsid12259421 \chftn }{\rtlch\fcs1 \af0 \ltrch\fcs0 
\insrsid12259421 \hich\af0\dbch\af13\loch\f0  Footnotes_graphic}}}{\rtlch\fcs1 
\af0 \ltrch\fcs0 \insrsid543414 
 \par }{\*\themedata 
504b03041400060008002100e9de0fbfff001c0213005b436f6e74656e745f54797065735d2e786d6cac91cb4ec3301045f748fc83e52d4a
 
9cb2400825e982c78ec7a27cc0c8992416c9d8b2a755fbf74cd25442a820166c2cd933f79e3be372bd1f07b5c3989ca74aaff2422b24eb1b475da5df374fd9ad
 
5689811a183c61a50f98f4babebc2837878049899a52a57be670674cb23d8e90721f90a4d2fa3802cb35762680fd800ecd7551dc18eb899138e3c943d7e503b6
@@ -214,4 +214,4 @@ 
52006f006f007400200045006e00740072007900
 
62c0dfdacf01feff
 

 

-0105}}
\ No newline at end of file
+0105}}
diff --git a/sw/qa/extras/ooxmlexport/data/tdf143399.docx 
b/sw/qa/extras/ooxmlexport/data/tdf143399.docx
index 191e46f36bb1..1d9749a0ccad 100644
Binary files a/sw/qa/extras/ooxmlexport/data/tdf143399.docx and 
b/sw/qa/extras/ooxmlexport/data/tdf143399.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
index 9944636960c0..d783c8f448de 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
@@ -1168,7 +1168,7 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf143399, 
"tdf143399.docx")
 assertXPath(pXml, "/w:footnotes/w:footnote[3]/w:p/w:r[3]/w:t", 1);
 assertXPathContent(pXml, "/w:footnotes/w:footnote[3]/w:p/w:r[3]/w:t", 
"Footnotes_graphic2");
 assertXPath(pXml, "/w:footnotes/w:footnote[4]/w:p/w:r[3]/w:t", 1);
-assertXPathContent(pXml, "/w:footnotes/w:footnote[4]/w:p/w:r[3]/w:t", 
"Footnotes_grahic");
+assertXPathContent(pXml, "/w:footnotes/w:footnote[4]/w:p/w:r[3]/w:t", 
"Footnotes_graphic");
 
 xmlDocUniquePtr pXml2 = parseExport("word/endnotes.xml");
 CPPUNIT_ASSERT(pXml);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source include/unotools sc/source sd/source sfx2/source sw/source unotools/source

2021-07-25 Thread Noel Grandin (via logerrit)
 cui/source/options/optsave.cxx |4 +--
 include/unotools/saveopt.hxx   |4 ---
 sc/source/ui/unoobj/docuno.cxx |4 ++-
 sd/source/ui/unoidl/unomodel.cxx   |5 +++
 sfx2/source/appl/appcfg.cxx|9 ---
 sfx2/source/dialog/alienwarn.cxx   |   11 ++--
 sfx2/source/doc/guisaveas.cxx  |2 -
 sw/source/uibase/uno/unotxdoc.cxx  |4 ++-
 unotools/source/config/saveopt.cxx |   47 +
 9 files changed, 29 insertions(+), 61 deletions(-)

New commits:
commit be683ad84960cad35299ed06b6b47691d90e2554
Author: Noel Grandin 
AuthorDate: Sat Jul 24 09:21:23 2021 +0200
Commit: Noel Grandin 
CommitDate: Sun Jul 25 09:40:36 2021 +0200

use officecfg to retrieve WarnAlienFormat

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

diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index 40ea7c7502db..b6fb9e819682 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -442,8 +442,8 @@ void SvxSaveTabPage::Reset( const SfxItemSet* )
 
m_xUserAutoSaveCB->set_active(officecfg::Office::Recovery::AutoSave::UserAutoSaveEnabled::get());
 
m_xUserAutoSaveCB->set_sensitive(!officecfg::Office::Recovery::AutoSave::UserAutoSaveEnabled::isReadOnly());
 
-m_xWarnAlienFormatCB->set_active(aSaveOpt.IsWarnAlienFormat());
-
m_xWarnAlienFormatCB->set_sensitive(!aSaveOpt.IsReadOnly(SvtSaveOptions::EOption::WarnAlienFormat));
+
m_xWarnAlienFormatCB->set_active(officecfg::Office::Common::Save::Document::WarnAlienFormat::get());
+
m_xWarnAlienFormatCB->set_sensitive(!officecfg::Office::Common::Save::Document::WarnAlienFormat::isReadOnly());
 
 
m_xAutoSaveEdit->set_value(officecfg::Office::Common::Save::Document::AutoSaveTimeIntervall::get());
 
m_xAutoSaveEdit->set_sensitive(!officecfg::Office::Common::Save::Document::AutoSaveTimeIntervall::isReadOnly());
diff --git a/include/unotools/saveopt.hxx b/include/unotools/saveopt.hxx
index ebc484d52d40..30c2f873b921 100644
--- a/include/unotools/saveopt.hxx
+++ b/include/unotools/saveopt.hxx
@@ -33,7 +33,6 @@ public:
 {
 UseUserData,
 Backup,
-WarnAlienFormat,
 LoadDocPrinter,
 OdfDefaultVersion
 };
@@ -90,9 +89,6 @@ public:
 voidSetLoadUserSettings(bool b);
 boolIsLoadUserSettings() const;
 
-voidSetWarnAlienFormat( bool _bEnable );
-boolIsWarnAlienFormat( ) const;
-
 voidSetLoadDocumentPrinter( bool _bEnable );
 boolIsLoadDocumentPrinter( ) const;
 
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 0836e0e7ed7f..b98ef8df38c5 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -1200,7 +1200,9 @@ void ScModelObj::initializeForTiledRendering(const 
css::uno::Sequencecommit();
 }
 
 uno::Any SAL_CALL ScModelObj::queryInterface( const uno::Type& rType )
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 006a9cad3347..91c9254eb39a 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -31,6 +31,7 @@
 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -2470,7 +2471,9 @@ void 
SdXImpressDocument::initializeForTiledRendering(const css::uno::Sequencecommit();
 
 if (!getenv("LO_TESTNAME"))
 SvtSlideSorterBarOptions().SetVisibleImpressView(true);
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index 2b95176869d5..e36ffd2d60e5 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -151,8 +151,9 @@ void SfxApplication::GetOptions( SfxItemSet& rSet )
 case SID_ATTR_WARNALIENFORMAT:
 {
 bRet = true;
-if 
(!aSaveOptions.IsReadOnly(SvtSaveOptions::EOption::WarnAlienFormat))
-if (!rSet.Put( SfxBoolItem( rPool.GetWhich( 
SID_ATTR_WARNALIENFORMAT ), aSaveOptions.IsWarnAlienFormat(
+if 
(!officecfg::Office::Common::Save::Document::WarnAlienFormat::isReadOnly())
+if (!rSet.Put( SfxBoolItem( rPool.GetWhich( 
SID_ATTR_WARNALIENFORMAT ),
+
officecfg::Office::Common::Save::Document::WarnAlienFormat::get() )))
 bRet = false;
 }
 break;
@@ -449,7 +450,9 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& 
rSet )
 if ( SfxItemState::SET == rSet.GetItemState( rPool.GetWhich( 
SID_ATTR_WARNALIENFORMAT ), true, &pItem ) )
 {
 DBG_ASSERT( dynamic_cast< const SfxBoolItem *>( pItem ) !=  nullptr, 
"BoolItem expected" );
-aSaveOptions.SetWarnAlienFormat( stat

[Libreoffice-commits] core.git: cui/source include/svtools include/unotools sfx2/inc sfx2/source svtools/Library_svt.mk svtools/source

2021-07-25 Thread Noel Grandin (via logerrit)
 cui/source/options/optgdlg.cxx|   19 --
 cui/source/options/treeopt.cxx|   11 -
 include/svtools/helpopt.hxx   |   43 -
 include/unotools/itemholderbase.hxx   |1 
 sfx2/inc/pch/precompiled_sfx.hxx  |1 
 sfx2/source/appl/app.cxx  |8 -
 sfx2/source/appl/appcfg.cxx   |   15 +-
 sfx2/source/appl/appserv.cxx  |9 -
 sfx2/source/appl/sfxhelp.cxx  |1 
 sfx2/source/inc/appdata.hxx   |1 
 svtools/Library_svt.mk|1 
 svtools/source/config/helpopt.cxx |  248 --
 svtools/source/config/itemholder2.cxx |5 
 13 files changed, 30 insertions(+), 333 deletions(-)

New commits:
commit 9117fb44bc7bd6b8764911c731c84a9e5dcc37f0
Author: Noel Grandin 
AuthorDate: Sat Jul 24 22:18:46 2021 +0200
Commit: Noel Grandin 
CommitDate: Sun Jul 25 09:06:38 2021 +0200

use officecfg for help options

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

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 9194219d2056..f1f46e144701 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -45,7 +45,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -217,16 +216,11 @@ bool OfaMiscTabPage::FillItemSet( SfxItemSet* rSet )
 bool bModified = false;
 std::shared_ptr 
batch(comphelper::ConfigurationChanges::create());
 
-SvtHelpOptions aHelpOptions;
 if ( m_xPopUpNoHelpCB->get_state_changed_from_saved() )
-{
-auto xChanges = comphelper::ConfigurationChanges::create();
-
officecfg::Office::Common::Help::BuiltInHelpNotInstalledPopUp::set(m_xPopUpNoHelpCB->get_active(),
 xChanges);
-xChanges->commit();
-}
+
officecfg::Office::Common::Help::BuiltInHelpNotInstalledPopUp::set(m_xPopUpNoHelpCB->get_active(),
 batch);
 
 if ( m_xExtHelpCB->get_state_changed_from_saved() )
-aHelpOptions.SetExtendedHelp( m_xExtHelpCB->get_active() );
+
officecfg::Office::Common::Help::ExtendedTip::set(m_xExtHelpCB->get_active(), 
batch);
 
 if ( m_xShowTipOfTheDay->get_state_changed_from_saved() )
 {
@@ -236,10 +230,7 @@ bool OfaMiscTabPage::FillItemSet( SfxItemSet* rSet )
 
 if ( m_xFileDlgCB->get_state_changed_from_saved() )
 {
-std::shared_ptr< comphelper::ConfigurationChanges > xChanges(
-comphelper::ConfigurationChanges::create());
-officecfg::Office::Common::Misc::UseSystemFileDialog::set( 
!m_xFileDlgCB->get_active(), xChanges );
-xChanges->commit();
+officecfg::Office::Common::Misc::UseSystemFileDialog::set( 
!m_xFileDlgCB->get_active(), batch );
 bModified = true;
 }
 
@@ -287,8 +278,8 @@ bool OfaMiscTabPage::FillItemSet( SfxItemSet* rSet )
 
 void OfaMiscTabPage::Reset( const SfxItemSet* rSet )
 {
-SvtHelpOptions aHelpOptions;
-m_xExtHelpCB->set_active( aHelpOptions.IsHelpTips() && 
aHelpOptions.IsExtendedHelp() );
+m_xExtHelpCB->set_active( officecfg::Office::Common::Help::Tip::get() &&
+officecfg::Office::Common::Help::ExtendedTip::get() );
 m_xExtHelpCB->save_state();
 m_xPopUpNoHelpCB->set_active( 
officecfg::Office::Common::Help::BuiltInHelpNotInstalledPopUp::get() );
 m_xPopUpNoHelpCB->save_state();
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 698196afe099..0d617a8d3552 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -90,7 +90,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -1223,10 +1222,12 @@ void OfaTreeOptionsDialog::ApplyItemSet( sal_uInt16 
nId, const SfxItemSet& rSet
 }
 
 //  evaluate help options
-if ( SvtHelpOptions().IsHelpTips() != Help::IsQuickHelpEnabled() )
-SvtHelpOptions().IsHelpTips() ? Help::EnableQuickHelp() : 
Help::DisableQuickHelp();
-if ( SvtHelpOptions().IsExtendedHelp() != 
Help::IsBalloonHelpEnabled() )
-SvtHelpOptions().IsExtendedHelp() ? Help::EnableBalloonHelp() 
: Help::DisableBalloonHelp();
+bool bHelpTips = officecfg::Office::Common::Help::Tip::get();
+if ( bHelpTips != Help::IsQuickHelpEnabled() )
+bHelpTips ? Help::EnableQuickHelp() : Help::DisableQuickHelp();
+bool bExtendedHelp = 
officecfg::Office::Common::Help::ExtendedTip::get();
+if ( bExtendedHelp != Help::IsBalloonHelpEnabled() )
+bExtendedHelp ? Help::EnableBalloonHelp() : 
Help::DisableBalloonHelp();
 
 batch->commit();
 }
diff --git a/include/svtools/helpopt.hxx b/include/svtools/helpopt.hxx
deleted file mode 100644
index 803fce3ff0f0..
--- a/include/svtools/helpopt.hxx
+++ /dev/null
@@ -1,43 +0,0 @@
-/* -