[Libreoffice-commits] core.git: officecfg/registry sc/source sc/uiconfig

2022-06-21 Thread Siddhant Chaudhary (via logerrit)
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |  137 
 sc/source/ui/inc/inscodlg.hxx  |3 
 sc/source/ui/miscdlgs/inscodlg.cxx |  140 -
 sc/uiconfig/scalc/ui/pastespecial.ui   |1 
 4 files changed, 278 insertions(+), 3 deletions(-)

New commits:
commit 9d0ca8ee3f0c2a4e6c0bebec6ef1523cd04e849a
Author: Siddhant Chaudhary 
AuthorDate: Sun May 29 14:52:58 2022 +0530
Commit: Heiko Tietze 
CommitDate: Tue Jun 21 15:02:22 2022 +0200

tdf#69750 Preserve last used Paste Special options for next session.

This feature stores the Paste Special options for Calc in the LO
registry for use across sessions, so that users don't have to set
options everytime they start a new Calc session. A new group named
"PasteSpecial" has been added in
`officecfg/registry/schema/org/openoffice/Office/Common.xcs`. The
function `ScInsertContentsDlg::storeFlagsInRegistry()` has been added,
which is responsible for storing the state whenever the dialog is closed
by clicking either the OK button, or one of the four shortcut buttons.
Also, whenever the dialog is opened for the first time in a new session
(represented by the `firstLoad` boolean flag), the options are loaded
from the registry.

Change-Id: Icc879b11feb5bfe32777b6e548d9c0804d93a33e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135110
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index 73b1acbe871d..8dd15b7ca8c7 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -6599,5 +6599,142 @@
 true
   
 
+
+  
+Stores properties related to the paste special feature in 
Calc.
+  
+  
+
+  Stores options under the "Paste" section.
+
+
+  
+Option to set all options.
+  
+  false
+
+
+  
+Option for numbers.
+  
+  true
+
+
+  
+Option for text.
+  
+  true
+
+
+  
+Option for date and time.
+  
+  true
+
+
+  
+Option for formats.
+  
+  false
+
+
+  
+Option for comments.
+  
+  false
+
+
+  
+Option for objects.
+  
+  false
+
+
+  
+Option for formulas.
+  
+  false
+
+  
+  
+
+  Stores the option to be used for the "Shift Cells" 
section.
+
+
+  
+
+  Shift cells down (`InsCellCmd::INS_CELLSDOWN`).
+
+  
+  
+
+  Shift cells right (`InsCellCmd::INS_CELLSRIGHT`).
+
+  
+  
+
+  None (`InsCellCmd::INS_NONE`). This is the default 
value.
+
+  
+
+4
+  
+  
+
+  Stores options under the "Options" section.
+
+
+  
+Option for as link.
+  
+  false
+
+
+  
+Option for transpose.
+  
+  false
+
+
+  
+Option for skipping empty cells.
+  
+  false
+
+  
+  
+
+  Stores the option to be used for the "Operations" 
section.
+
+
+  
+
+  No operation (`ScPasteFunc::NONE`). This is the default 
value.
+
+  
+  
+
+  Add (`ScPasteFunc::ADD`).
+
+  
+  
+
+  Subtract (`ScPasteFunc::SUB`).
+
+  
+  
+
+  Multiply (`ScPasteFunc::MUL`).
+
+  
+  
+
+  Divide (`ScPasteFunc::DIV`).
+
+  
+
+0
+  
+
   
 
diff --git a/sc/source/ui/inc/inscodlg.hxx b/sc/source/ui/inc/inscodlg.hxx
index a30cffe0b355..31577f832eef 100644
--- a/sc/source/ui/inc/inscodlg.hxx
+++ b/sc/source/ui/inc/inscodlg.hxx
@@ -43,6 +43,7 @@ public:
 voidSetFillMode( bool bSet );
 voidSetChangeTrack( bool bSet );
 voidSetCellShiftDisabled( CellShiftDisabledFlags nDisable );
+voidstoreFlagsInRegistry();
 
 private:
 bool  bOtherDoc;
@@ -82,6 +83,7 @@ private:
 std::unique_ptr  mxBtnShortCutPasteValuesFormats;
 std::unique_ptr  mxBtnShortCutPasteTranspose;
 std::unique_ptr  

[Libreoffice-commits] core.git: static/CustomTarget_emscripten_fs_image.mk uui/inc uui/source vcl/uiconfig vcl/UIConfig_vcl.mk

2022-06-20 Thread Siddhant Chaudhary (via logerrit)
 static/CustomTarget_emscripten_fs_image.mk |1 
 uui/inc/strings.hrc|7 
 uui/source/iahndl-locking.cxx  |   15 -
 uui/source/openlocked.cxx  |   63 +-
 uui/source/openlocked.hxx  |   31 ++-
 vcl/UIConfig_vcl.mk|1 
 vcl/uiconfig/ui/openlockedquerybox.ui  |  270 +
 7 files changed, 354 insertions(+), 34 deletions(-)

New commits:
commit ff9ff6018bea7c1a4524c8edca8ef554c74e4b3f
Author: Siddhant Chaudhary 
AuthorDate: Tue Mar 29 19:06:09 2022 +0530
Commit: Hossein 
CommitDate: Mon Jun 20 15:46:48 2022 +0200

tdf#141026 Put user and computer name into collapsed section

This patch hides away the file name and the name of the user when the
user tries to open a locked file. This improves privacy, as discussed in
the bug report.

The .ui file for the new dialog box is
`vcl/uiconfig/ui/openlockedquerybox.ui`. The source files
`openlocked.hxx` and `openlocked.cxx` have been changed to implement
the new dialog. The old string template `STR_OPENLOCKED_MSG` has been
deleted to hide away the private data, and a new string template
`STR_OPENLOCKED_HIDDEN_DATA` has been added; the latter will be hidden
inside the expander dialog. Finally, corresponding changes in the
makefiles have been made to let the makefiles know about the UI file.

Change-Id: I3cc9d2f6e2d9bc43857c80662e2a405aacd7fc70
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132342
Tested-by: Jenkins
Reviewed-by: Hossein 

diff --git a/static/CustomTarget_emscripten_fs_image.mk 
b/static/CustomTarget_emscripten_fs_image.mk
index 8166802858e5..a82d51d94db5 100644
--- a/static/CustomTarget_emscripten_fs_image.mk
+++ b/static/CustomTarget_emscripten_fs_image.mk
@@ -1076,6 +1076,7 @@ gb_emscripten_fs_image_files := \
 
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/vcl/ui/menutogglebutton3.ui 
\
 
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/vcl/ui/menutogglebutton4.ui 
\
 $(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/vcl/ui/printdialog.ui \
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/vcl/ui/openlockedquerybox.ui
 \
 
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/vcl/ui/printerdevicepage.ui 
\
 
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/vcl/ui/printerpaperpage.ui \
 
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/vcl/ui/printerpropertiesdialog.ui
 \
diff --git a/uui/inc/strings.hrc b/uui/inc/strings.hrc
index e5af3465b557..98bd94ef8484 100644
--- a/uui/inc/strings.hrc
+++ b/uui/inc/strings.hrc
@@ -47,12 +47,7 @@
 #define STR_LOCKFAILED_OPENREADONLY_BTN 
NC_("STR_LOCKFAILED_OPENREADONLY_BTN", "Open ~Read-Only")
 #define STR_LOCKFAILED_OPENREADONLY_NOTIFY_BTN  
NC_("STR_LOCKFAILED_OPENREADONLY_NOTIFY_BTN", "~Notify")
 
-#define STR_OPENLOCKED_TITLENC_("STR_OPENLOCKED_TITLE", 
"Document in Use")
-#define STR_OPENLOCKED_MSG  NC_("STR_OPENLOCKED_MSG", 
"Document file '$(ARG1)' is locked for editing by:\n\n$(ARG2)\n\nOpen document 
read-only or open a copy of the document for editing.\nSelect Notify to open 
read-only and get notified when the document becomes editable.$(ARG3)")
-#define STR_OPENLOCKED_ALLOWIGNORE_MSG  
NC_("STR_OPENLOCKED_ALLOWIGNORE_MSG", "\nYou may also ignore the file locking 
and open the document for editing.")
-#define STR_OPENLOCKED_OPENREADONLY_BTN 
NC_("STR_OPENLOCKED_OPENREADONLY_BTN", "Open ~Read-Only")
-#define STR_OPENLOCKED_OPENREADONLY_NOTIFY_BTN  
NC_("STR_OPENLOCKED_OPENREADONLY_NOTIFY_BTN", "~Notify")
-#define STR_OPENLOCKED_OPENCOPY_BTN 
NC_("STR_OPENLOCKED_OPENCOPY_BTN", "Open ~Copy")
+#define STR_OPENLOCKED_HIDDEN_DATA  
NC_("STR_OPENLOCKED_HIDDEN_DATA", "Document Name: $(ARG1)\nUser Name: $(ARG2)")
 #define STR_UNKNOWNUSER NC_("STR_UNKNOWNUSER", 
"Unknown User")
 
 #define STR_FILECHANGED_TITLE   NC_("STR_FILECHANGED_TITLE", 
"Document Has Been Changed by Others")
diff --git a/uui/source/iahndl-locking.cxx b/uui/source/iahndl-locking.cxx
index 64af0961d48a..b1f55dd85667 100644
--- a/uui/source/iahndl-locking.cxx
+++ b/uui/source/iahndl-locking.cxx
@@ -107,6 +107,7 @@ handleLockedDocumentRequest_(
 std::locale aResLocale = Translate::Create("uui");
 
 OUString aMessage;
+OUString aHiddenData;
 std::vector< OUString > aArguments { aDocumentURL };
 
 bool bAllowOverride = xRetry.is() && 
officecfg::Office::Common::Misc::AllowOverrideLocking::get();
@@ -117,14 +118,12 @@ handleLockedDocumentRequest_(
 aArguments.push_back( !aInfo.isEmpty()
   ? aInfo
   : Translate::get( STR_UNKNOWNUSER, aResLocale) );
-aArguments.push_back( bAllowOverride
-  ? Translate::get( 

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

2022-05-25 Thread Siddhant Chaudhary (via logerrit)
 sc/qa/unit/cond_format_merge.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 43f6ca7164a9ea7c99d177d711684e25d53e8be4
Author: Siddhant Chaudhary 
AuthorDate: Thu May 26 03:34:18 2022 +0530
Commit: Hossein 
CommitDate: Thu May 26 07:51:41 2022 +0200

tdf#139734 Drop redundant asserts after MacrosTest::loadFromDesktop

Removed a redundant assert on returned value of 
`MacrosTest::loadFromDesktop`.

Change-Id: Ia318cd770b120baff87e7cf5f01120beaf112794
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134957
Tested-by: Jenkins
Reviewed-by: Hossein 

diff --git a/sc/qa/unit/cond_format_merge.cxx b/sc/qa/unit/cond_format_merge.cxx
index 56b47ac7c1a4..01cbde7359a6 100644
--- a/sc/qa/unit/cond_format_merge.cxx
+++ b/sc/qa/unit/cond_format_merge.cxx
@@ -45,8 +45,6 @@ void ScCondFormatMergeTest::testCondFormatMerge()
 createFileURL(u"cond_format_merge.ods", aFileURL);
 uno::Reference mxComponent = loadFromDesktop(aFileURL);
 
-CPPUNIT_ASSERT_MESSAGE("Component not loaded", mxComponent.is());
-
 // get the first sheet
 uno::Reference xDoc(mxComponent, 
uno::UNO_QUERY_THROW);
 uno::Reference xIndex(xDoc->getSheets(), 
uno::UNO_QUERY_THROW);


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

2022-04-18 Thread Siddhant Chaudhary (via logerrit)
 dbaccess/source/core/api/FilteredContainer.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 370077502210f4d41a1d2014c3e3f99536217ce7
Author: Siddhant Chaudhary 
AuthorDate: Sun Apr 17 00:49:07 2022 +0530
Commit: Stephan Bergmann 
CommitDate: Mon Apr 18 08:42:46 2022 +0200

tdf#42982 Improved UNO API error reporting.

Messages to thrown `RuntimeException` instances have been added to make
the error clearer.

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

diff --git a/dbaccess/source/core/api/FilteredContainer.cxx 
b/dbaccess/source/core/api/FilteredContainer.cxx
index 70eb85210a80..a5cf0b156327 100644
--- a/dbaccess/source/core/api/FilteredContainer.cxx
+++ b/dbaccess/source/core/api/FilteredContainer.cxx
@@ -132,7 +132,7 @@ static sal_Int32 createWildCardVector(Sequence< OUString >& 
_rTableFilter, std::
 static void lcl_ensureComposedName( TableInfo& _io_tableInfo, const 
Reference< XDatabaseMetaData >& _metaData )
 {
 if ( !_metaData.is() )
-throw RuntimeException();
+throw RuntimeException("lcl_ensureComposedName: _metaData cannot 
be null!");
 
 if ( !_io_tableInfo.sComposedName )
 {
@@ -153,7 +153,7 @@ static sal_Int32 createWildCardVector(Sequence< OUString >& 
_rTableFilter, std::
 lcl_ensureComposedName( _io_tableInfo, _metaData );
 
 if ( !_masterContainer.is() )
-throw RuntimeException();
+throw RuntimeException("lcl_ensureType: _masterContainer cannot be 
null!");
 
 OUString sTypeName;
 try


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

2022-03-21 Thread Siddhant Chaudhary (via logerrit)
 sw/qa/extras/odfimport/odfimport.cxx |   16 
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx |2 +-
 sw/qa/extras/rtfexport/rtfexport.cxx |3 +--
 sw/qa/extras/rtfexport/rtfexport2.cxx|2 +-
 sw/qa/extras/rtfexport/rtfexport3.cxx|2 +-
 sw/qa/extras/rtfexport/rtfexport5.cxx|2 +-
 sw/qa/extras/uiwriter/uiwriter2.cxx  |6 +++---
 sw/qa/extras/uiwriter/uiwriter4.cxx  |4 ++--
 8 files changed, 18 insertions(+), 19 deletions(-)

New commits:
commit 8351179b787a10167e9e68584d3b3573fbdb6ebc
Author: Siddhant Chaudhary 
AuthorDate: Sat Mar 12 00:37:20 2022 +0530
Commit: Xisco Fauli 
CommitDate: Mon Mar 21 10:27:46 2022 +0100

tdf#141908 Replaced usage of sal_Int32 and sal_uInt32 with Color in unit 
tests.

Change-Id: Ieb8b6b3c3bfab0ab49bc55cf42db7be4f08e964b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131408
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/sw/qa/extras/odfimport/odfimport.cxx 
b/sw/qa/extras/odfimport/odfimport.cxx
index b8ebcb490d6c..253fd16cdc9c 100644
--- a/sw/qa/extras/odfimport/odfimport.cxx
+++ b/sw/qa/extras/odfimport/odfimport.cxx
@@ -600,10 +600,10 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo75872_ooo33)
 load(mpTestDocumentPath, "fdo75872_ooo33.odt");
 // graphics default style: line color and fill color changed
 uno::Reference xShape = getShape(1);
-CPPUNIT_ASSERT_EQUAL(sal_Int32(COL_BLACK),
-   getProperty(xShape, "LineColor"));
-CPPUNIT_ASSERT_EQUAL(sal_Int32(Color(153, 204, 255)),
-   getProperty(xShape, "FillColor"));
+CPPUNIT_ASSERT_EQUAL(COL_BLACK,
+   getProperty(xShape, "LineColor"));
+CPPUNIT_ASSERT_EQUAL(Color(0x99ccff),
+   getProperty(xShape, "FillColor"));
 }
 
 CPPUNIT_TEST_FIXTURE(Test, testFdo75872_aoo40)
@@ -611,10 +611,10 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo75872_aoo40)
 load(mpTestDocumentPath, "fdo75872_aoo40.odt");
 // graphics default style: line color and fill color changed
 uno::Reference xShape = getShape(1);
-CPPUNIT_ASSERT_EQUAL(sal_Int32(Color(128, 128, 128)),
-   getProperty(xShape, "LineColor"));
-CPPUNIT_ASSERT_EQUAL(sal_Int32(Color(0xCF, 0xE7, 0xF5)),
-   getProperty(xShape, "FillColor"));
+CPPUNIT_ASSERT_EQUAL(Color(0x808080),
+   getProperty(xShape, "LineColor"));
+CPPUNIT_ASSERT_EQUAL(Color(0xcfe7f5),
+   getProperty(xShape, "FillColor"));
 }
 
 CPPUNIT_TEST_FIXTURE(Test, testFdo55814)
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx 
b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index f66748c3ebff..29b44675b33c 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -711,7 +711,7 @@ CPPUNIT_TEST_FIXTURE(Test, testN820504)
 uno::Reference 
xStylesAccess(xFamiliesAccess->getByName("ParagraphStyles"), uno::UNO_QUERY);
 uno::Reference 
xStyle(xStylesAccess->getByName("Default Paragraph Style"), uno::UNO_QUERY);
 // The problem was that the CharColor was set to AUTO (-1) even if we have 
some default char color set
-CPPUNIT_ASSERT_EQUAL(sal_Int32(4040635), getProperty(xStyle, 
"CharColor"));
+CPPUNIT_ASSERT_EQUAL(Color(0x3da7bb), getProperty(xStyle, 
"CharColor"));
 
 // Also, the groupshape was anchored at-page instead of at-character
 // (that's incorrect as Word only supports at-character and as-character).
diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx 
b/sw/qa/extras/rtfexport/rtfexport.cxx
index 2b824d83a71e..fba142c6d0cf 100644
--- a/sw/qa/extras/rtfexport/rtfexport.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport.cxx
@@ -961,8 +961,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf88583)
 // This was FillStyle_NONE, as background color was missing from the color 
table during export.
 CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID,
  getProperty(getParagraph(1), 
"FillStyle"));
-CPPUNIT_ASSERT_EQUAL(static_cast(0x00cc00),
- getProperty(getParagraph(1), "FillColor"));
+CPPUNIT_ASSERT_EQUAL(Color(0x00cc00), getProperty(getParagraph(1), 
"FillColor"));
 }
 
 DECLARE_RTFEXPORT_TEST(testMargmirror, "margmirror.rtf")
diff --git a/sw/qa/extras/rtfexport/rtfexport2.cxx 
b/sw/qa/extras/rtfexport/rtfexport2.cxx
index 74f13413c954..5204b503ae16 100644
--- a/sw/qa/extras/rtfexport/rtfexport2.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport2.cxx
@@ -901,7 +901,7 @@ DECLARE_RTFEXPORT_TEST(testFdo60722, "fdo60722.rtf")
 // Color of the line was blue, and it had zero width.
 xShape.set(getShape(3), uno::UNO_QUERY);
 CPPUNIT_ASSERT_EQUAL(sal_uInt32(26), getProperty(xShape, 
"LineWidth"));
-CPPUNIT_ASSERT_EQUAL(sal_uInt32(0), getProperty(xShape, 
"LineColor"));
+CPPUNIT_ASSERT_EQUAL(COL_BLACK, getProperty(xShape, "LineColor"));
 }
 
 DECLARE_RTFEXPORT_TEST(testDoDhgtOld, "do-dhgt-old.rtf")
diff --git a/sw/qa/extras/rtfexport/rtfexport3.cxx 
b/sw/qa/extras/rtfexport/rtfexport3.cxx
index