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

2023-12-04 Thread Sahil Gautam (via logerrit)
 officecfg/registry/schema/org/openoffice/Office/Calc.xcs |1 
 sc/source/ui/inc/tpview.hxx  |1 
 sc/source/ui/optdlg/tpview.cxx   |   12 +++
 sc/uiconfig/scalc/ui/tpviewpage.ui   |   25 +--
 4 files changed, 36 insertions(+), 3 deletions(-)

New commits:
commit a4d11d07fbace142cba82c30ecb09ff99b9bbb6f
Author: Sahil Gautam 
AuthorDate: Mon Nov 13 00:22:11 2023 +0530
Commit: Mike Kaganski 
CommitDate: Mon Dec 4 16:22:54 2023 +0100

tdf#33201 Checkbox Implementation for Col/row Highlight

Change-Id: I32aca7128a3f01be9fd5a7150243f8fd4e82f626
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159001
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 
Reviewed-by: Mike Kaganski 

diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
index aa58fc81a9a7..e1fe88dfa1d9 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
@@ -122,6 +122,7 @@
   false
 
 
+  
   
 Indicates whether the column/row highlight has been enabled 
or not.
 Column/row highlighting
diff --git a/sc/source/ui/inc/tpview.hxx b/sc/source/ui/inc/tpview.hxx
index 65aed43031d8..72f3b7668732 100644
--- a/sc/source/ui/inc/tpview.hxx
+++ b/sc/source/ui/inc/tpview.hxx
@@ -37,6 +37,7 @@ class ScTpContentOptions : public SfxTabPage
 std::unique_ptr m_xAnnotCB;
 std::unique_ptr m_xFormulaMarkCB;
 std::unique_ptr m_xValueCB;
+std::unique_ptr m_xColRowHighCB;
 std::unique_ptr m_xAnchorCB;
 std::unique_ptr m_xRangeFindCB;
 
diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx
index a31bc5d417fc..4b8595899f04 100644
--- a/sc/source/ui/optdlg/tpview.cxx
+++ b/sc/source/ui/optdlg/tpview.cxx
@@ -19,6 +19,7 @@
 
 #undef SC_DLLIMPLEMENTATION
 
+#include 
 #include 
 #include 
 #include 
@@ -42,6 +43,7 @@ ScTpContentOptions::ScTpContentOptions(weld::Container* 
pPage, weld::DialogContr
 , m_xAnnotCB(m_xBuilder->weld_check_button("annot"))
 , m_xFormulaMarkCB(m_xBuilder->weld_check_button("formulamark"))
 , m_xValueCB(m_xBuilder->weld_check_button("value"))
+, m_xColRowHighCB(m_xBuilder->weld_check_button("colrowhigh"))
 , m_xAnchorCB(m_xBuilder->weld_check_button("anchor"))
 , m_xRangeFindCB(m_xBuilder->weld_check_button("rangefind"))
 , m_xObjGrfLB(m_xBuilder->weld_combo_box("objgrf"))
@@ -71,6 +73,7 @@ ScTpContentOptions::ScTpContentOptions(weld::Container* 
pPage, weld::DialogContr
 m_xAnnotCB->set_accessible_description(ScResId(STR_A11Y_DESC_ANNOT));
 m_xFormulaMarkCB->connect_toggled(aCBHdl);
 m_xValueCB->connect_toggled(aCBHdl);
+m_xColRowHighCB->connect_toggled(aCBHdl);
 m_xAnchorCB->connect_toggled(aCBHdl);
 
 m_xVScrollCB->connect_toggled(aCBHdl);
@@ -156,6 +159,13 @@ boolScTpContentOptions::FillItemSet( SfxItemSet* 
rCoreSet )
 rCoreSet->Put(SfxBoolItem(SID_SC_OPT_SYNCZOOM, 
m_xSyncZoomCB->get_active()));
 bRet = true;
 }
+if (m_xColRowHighCB->get_state_changed_from_saved())
+{
+auto pChange(comphelper::ConfigurationChanges::create());
+
officecfg::Office::Calc::Content::Display::ColumnRowHighlighting::set(m_xColRowHighCB->get_active(),
 pChange);
+pChange->commit();
+bRet = true;
+}
 
 return bRet;
 }
@@ -171,6 +181,7 @@ voidScTpContentOptions::Reset( const SfxItemSet* 
rCoreSet )
 m_xAnnotCB   ->set_active(m_xLocalOptions->GetOption(VOPT_NOTES));
 
m_xFormulaMarkCB->set_active(m_xLocalOptions->GetOption(VOPT_FORMULAS_MARKS));
 m_xValueCB   ->set_active(m_xLocalOptions->GetOption(VOPT_SYNTAX));
+
m_xColRowHighCB->set_active(officecfg::Office::Calc::Content::Display::ColumnRowHighlighting::get());
 m_xAnchorCB  ->set_active(m_xLocalOptions->GetOption(VOPT_ANCHOR));
 
 m_xObjGrfLB  ->set_active( 
static_cast(m_xLocalOptions->GetObjMode(VOBJ_TYPE_OLE)) );
@@ -206,6 +217,7 @@ voidScTpContentOptions::Reset( const SfxItemSet* 
rCoreSet )
 m_xAnnotCB->save_state();
 m_xFormulaMarkCB->save_state();
 m_xValueCB->save_state();
+m_xColRowHighCB->save_state();
 m_xAnchorCB->save_state();
 m_xObjGrfLB->save_value();
 m_xDiagramLB->save_value();
diff --git a/sc/uiconfig/scalc/ui/tpviewpage.ui 
b/sc/uiconfig/scalc/ui/tpviewpage.ui
index b96283d18b69..df87f8e27b3a 100644
--- a/sc/uiconfig/scalc/ui/tpviewpage.ui
+++ b/sc/uiconfig/scalc/ui/tpviewpage.ui
@@ -20,7 +20,7 @@
 0
 none
 
-  
+  
   
 True
 False
@@ -127,7 +127,7 @@
   
   
 0
-5
+6
   
 
 
@@ -146,7 

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

2023-10-31 Thread offtkp (via logerrit)
 officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu |   15 +-
 sc/source/ui/condformat/condformateasydlg.cxx |   24 
--
 sc/uiconfig/scalc/popupmenu/conditional_easy.xml  |1 
 3 files changed, 35 insertions(+), 5 deletions(-)

New commits:
commit c8da023efe26efcb166c3525ca73fe62f26e154c
Author: offtkp 
AuthorDate: Mon Oct 30 14:28:12 2023 +0200
Commit: Paris Oplopoios 
CommitDate: Tue Oct 31 14:23:05 2023 +0100

tdf#157930 Add Contains Text rule to easy conditional format dialog

Contains Text is another commonly used conditional formatting rule
that could be of use here

Change-Id: I67a3f711c57f9917be26fa21badd2f5a0d133747
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158657
Tested-by: Jenkins
Reviewed-by: Paris Oplopoios 

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
index 7bd5215d627e..fe726492ffb4 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
@@ -666,7 +666,7 @@
   
   
 
-  Conditional Formatting: Condition Less 
Than
+  Conditional Formatting: Less Than
 
 
   Less than...
@@ -677,7 +677,7 @@
   
   
 
-  Conditional Formatting: Condition 
Equals
+  Conditional Formatting: Equals
 
 
   Equals...
@@ -697,6 +697,17 @@
   1
 
   
+  
+
+  Conditional Formatting: Contains Text
+
+
+  Containing text...
+
+
+  1
+
+  
   
 
   Conditional Formatting: More Rules
diff --git a/sc/source/ui/condformat/condformateasydlg.cxx 
b/sc/source/ui/condformat/condformateasydlg.cxx
index 0fee5ea15b36..6ecf98e87e21 100644
--- a/sc/source/ui/condformat/condformateasydlg.cxx
+++ b/sc/source/ui/condformat/condformateasydlg.cxx
@@ -208,9 +208,27 @@ IMPL_LINK(ConditionalFormatEasyDialog, ButtonPressed, 
weld::Button&, rButton, vo
 if ( == mxButtonOk.get())
 {
 std::unique_ptr pFormat(new 
ScConditionalFormat(0, mpDocument));
+
+OUString sExpression1 = mxNumberEntry->get_text();
+OUString sExpression2 = mxNumberEntry2->get_text();
+
+switch (meMode)
+{
+case ScConditionMode::ContainsText:
+case ScConditionMode::NotContainsText:
+case ScConditionMode::BeginsWith:
+case ScConditionMode::EndsWith:
+sExpression1 = "\"" + sExpression1 + "\"";
+sExpression2 = "\"" + sExpression2 + "\"";
+break;
+default:
+break;
+}
+
 ScFormatEntry* pEntry
-= new ScCondFormatEntry(meMode, mxNumberEntry->get_text(), 
mxNumberEntry2->get_text(),
-*mpDocument, maPosition, 
mxStyles->get_active_text());
+= new ScCondFormatEntry(meMode, sExpression1, sExpression2, 
*mpDocument, maPosition,
+mxStyles->get_active_text());
+
 ScRangeList aRange;
 ScRefFlags nFlags
 = aRange.Parse(mxRangeEntry->GetText(), mpViewData->GetDocument(),
@@ -229,4 +247,4 @@ IMPL_LINK(ConditionalFormatEasyDialog, ButtonPressed, 
weld::Button&, rButton, vo
 m_xDialog->response(RET_CANCEL);
 }
 
-} // namespace sc
\ No newline at end of file
+} // namespace sc
diff --git a/sc/uiconfig/scalc/popupmenu/conditional_easy.xml 
b/sc/uiconfig/scalc/popupmenu/conditional_easy.xml
index 3346fa9441bb..70bd311d4480 100644
--- a/sc/uiconfig/scalc/popupmenu/conditional_easy.xml
+++ b/sc/uiconfig/scalc/popupmenu/conditional_easy.xml
@@ -12,6 +12,7 @@
   
   
   
+  
   
   
 


[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: officecfg/registry sc/source sc/uiconfig

2021-08-30 Thread Eike Rathke (via logerrit)
 officecfg/registry/schema/org/openoffice/Office/Calc.xcs |   21 ++
 sc/source/ui/dbgui/asciiopt.cxx  |   28 ++-
 sc/source/ui/dbgui/imoptdlg.cxx  |7 
 sc/source/ui/dbgui/scuiasciiopt.cxx  |   37 +++-
 sc/source/ui/docshell/impex.cxx  |   16 +
 sc/source/ui/inc/asciiopt.hxx|3 
 sc/source/ui/inc/imoptdlg.hxx|3 
 sc/source/ui/inc/scuiasciiopt.hxx|1 
 sc/uiconfig/scalc/ui/textimportcsv.ui|  125 +--
 9 files changed, 169 insertions(+), 72 deletions(-)

New commits:
commit 4c29c2bfab18b25229e0bc71014fd2ca42ec5bff
Author: Eike Rathke 
AuthorDate: Tue Aug 31 00:10:40 2021 +0200
Commit: Eike Rathke 
CommitDate: Tue Aug 31 02:55:04 2021 +0200

Resolves: tdf#114878 Add 'Evaluate formulas' option to CSV import and paste

... and Text to Columns, defaulting to false for CSV import via dialog
and stored as config item option similar to all other CSV/Text options.

Change-Id: I742f447b905a07b05dcf5fc58796c46de212276b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121344
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
index 95c1aed3ab0b..84545054859a 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
@@ -1119,6 +1119,13 @@
   
   false
 
+
+  
+If true, formula expressions are evaluated, else set as text 
cell content.
+EvaluateFormulas
+  
+  false
+
 
   
 If true, quoted field is always imported as text with no 
exception.
@@ -1201,6 +1208,13 @@
   
   false
 
+
+  
+If true, formula expressions are evaluated, else set as text 
cell content.
+EvaluateFormulas
+  
+  true
+
 
   
 If true, quoted field is always imported as text with no 
exception.
@@ -1290,6 +1304,13 @@
   
   false
 
+
+  
+If true, formula expressions are evaluated, else set as text 
cell content.
+EvaluateFormulas
+  
+  true
+
 
   
 List of Separators - as a String
diff --git a/sc/source/ui/dbgui/asciiopt.cxx b/sc/source/ui/dbgui/asciiopt.cxx
index af65dbc54956..3bb97c5b3236 100644
--- a/sc/source/ui/dbgui/asciiopt.cxx
+++ b/sc/source/ui/dbgui/asciiopt.cxx
@@ -32,6 +32,7 @@ ScAsciiOptions::ScAsciiOptions() :
 bRemoveSpace( false ),
 bQuotedFieldAsText(false),
 bDetectSpecialNumber(false),
+bEvaluateFormulas(true),
 bSkipEmptyCells(false),
 bSaveAsShown(true),
 bSaveFormulas(false),
@@ -176,14 +177,19 @@ void ScAsciiOptions::ReadFromString( const OUString& 
rString )
 bRemoveSpace = false;
 
 // Token 11: sheet to export for --convert-to csv
-// Does not need to be evaluated here but may be present, so in case
-// there'll be yet another token 12 then do some dummy like
-#if 0
+// Does not need to be evaluated here but may be present.
 if (nPos >= 0)
 {
 rString.getToken(0, ',', nPos);
 }
-#endif
+
+// Token 12: evaluate formulas.
+if (nPos >= 0)
+{
+bEvaluateFormulas = rString.getToken(0, ',', nPos) == "true";
+}
+else
+bEvaluateFormulas = true;   // default of versions that didn't add the 
parameter
 }
 
 OUString ScAsciiOptions::WriteToString() const
@@ -238,20 +244,22 @@ OUString ScAsciiOptions::WriteToString() const
 // Always keep in sync with ScImportOptions.
 
 aOutStr.append("," +
-   //Token 5: Language
+   // Token 5: Language
OUString::number(static_cast(eLang)) + "," +
-   //Token 6: Import quoted field as text.
+   // Token 6: Import quoted field as text.
OUString::boolean( bQuotedFieldAsText ) + "," +
-   //Token 7: Detect special numbers.
+   // Token 7: Detect special numbers.
OUString::boolean( bDetectSpecialNumber ) + "," +
// Token 8: used for "Save as shown" in export options
OUString::boolean( bSaveAsShown ) +"," +
// Token 9: used for "Save cell formulas" in export options
OUString::boolean( bSaveFormulas ) + "," +
-   //Token 10: Trim Space
+   // Token 10: Trim Space
OUString::boolean( bRemoveSpace ) +
-   //Token 11: sheet to export, always 0 for current sheet
-   ",0"
+   // Token 11: sheet to export, always 0 for current sheet
+   

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

2018-10-11 Thread Libreoffice Gerrit user
 officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu |5 
 sc/UIConfig_scalc.mk |1 
 sc/source/ui/drawfunc/chartsh.cxx|2 
 sc/uiconfig/scalc/popupmenu/chart.xml|   58 
--
 4 files changed, 1 insertion(+), 65 deletions(-)

New commits:
commit 18446d16ea801f465bb79471f7cf9f3b95ea2e92
Author: Maxim Monastirsky 
AuthorDate: Thu Oct 11 11:00:00 2018 +0300
Commit: Maxim Monastirsky 
CommitDate: Thu Oct 11 23:17:21 2018 +0200

tdf#119580 sc: Use the regular object popupmenu for charts

Context menu of a chart is supposed to be the same as for
other ole objects, except the additional .uno:ExportAsGraphic.
Given that .uno:ExportAsGraphic is hidden when non-chart
object is selected, we can just place it in the regular ole
object popupmenu (done already), and use that menu also for
charts.

Discussion is in https://gerrit.libreoffice.org/60128 .

Change-Id: I8a07c550998e1db0d2af7f87c625dbd258454bdd
Reviewed-on: https://gerrit.libreoffice.org/61678
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky 

diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu
index b9948964babf..254d52c07e20 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu
@@ -35,11 +35,6 @@
   Cell Edit
 
   
-  
-
-  Chart
-
-  
   
 
   Column Header
diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk
index 8a4100f9e209..d6aabe949204 100644
--- a/sc/UIConfig_scalc.mk
+++ b/sc/UIConfig_scalc.mk
@@ -18,7 +18,6 @@ $(eval $(call gb_UIConfig_add_popupmenufiles,modules/scalc,\
sc/uiconfig/scalc/popupmenu/audit \
sc/uiconfig/scalc/popupmenu/cell \
sc/uiconfig/scalc/popupmenu/celledit \
-   sc/uiconfig/scalc/popupmenu/chart \
sc/uiconfig/scalc/popupmenu/colheader \
sc/uiconfig/scalc/popupmenu/column_operations \
sc/uiconfig/scalc/popupmenu/conditional \
diff --git a/sc/source/ui/drawfunc/chartsh.cxx 
b/sc/source/ui/drawfunc/chartsh.cxx
index 4e9edfad103b..9ab065d3fa80 100644
--- a/sc/source/ui/drawfunc/chartsh.cxx
+++ b/sc/source/ui/drawfunc/chartsh.cxx
@@ -52,7 +52,7 @@ void ScChartShell::InitInterface_Impl()
 SfxVisibilityFlags::Standard | 
SfxVisibilityFlags::Server,
 ToolbarId::Draw_Objectbar);
 
-GetStaticInterface()->RegisterPopupMenu("chart");
+GetStaticInterface()->RegisterPopupMenu("oleobject");
 }
 
 
diff --git a/sc/uiconfig/scalc/popupmenu/chart.xml 
b/sc/uiconfig/scalc/popupmenu/chart.xml
deleted file mode 100644
index e7ddbc87a272..
--- a/sc/uiconfig/scalc/popupmenu/chart.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-http://openoffice.org/2001/menu;>
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-
-  
-  
-  
-  
-  
-  
-  
-
-  
-  
-
-  
-  
-  
-  
-  
-  
-  
-
-  
-  
-  
-  
-
-  
-  
-  
-  
-
-  
-  
-
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-04-26 Thread Maxim Monastirsky
 officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu |5 ++
 sc/UIConfig_scalc.mk |1 
 sc/source/ui/app/inputwin.cxx|   14 

 sc/uiconfig/scalc/popupmenu/formulabar.xml   |   17 
++
 4 files changed, 37 insertions(+)

New commits:
commit 9d9076cb00c474ba7f13d458f1e280e31f5d4bac
Author: Maxim Monastirsky 
Date:   Wed Apr 18 02:49:37 2018 +0300

tdf#57000 Add a context menu to the formula bar input field

As a side effect also fixes tdf#70597

Change-Id: Idd872d93f7a9da50f67c91a11e7e0231c7ac924e
Reviewed-on: https://gerrit.libreoffice.org/53513
Tested-by: Jenkins 
Reviewed-by: Maxim Monastirsky 

diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu
index 7614ea3827c0..b9948964babf 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu
@@ -65,6 +65,11 @@
   Text Box Formatting
 
   
+  
+
+  Formula Bar
+
+  
   
 
   Image
diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk
index bfbf46305226..6eb7c34d49f9 100644
--- a/sc/UIConfig_scalc.mk
+++ b/sc/UIConfig_scalc.mk
@@ -26,6 +26,7 @@ $(eval $(call gb_UIConfig_add_popupmenufiles,modules/scalc,\
sc/uiconfig/scalc/popupmenu/drawtext \
sc/uiconfig/scalc/popupmenu/form \
sc/uiconfig/scalc/popupmenu/formrichtext \
+   sc/uiconfig/scalc/popupmenu/formulabar \
sc/uiconfig/scalc/popupmenu/freezepanes \
sc/uiconfig/scalc/popupmenu/graphic \
sc/uiconfig/scalc/popupmenu/media \
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index fd97dc58d21c..4389cb643cec 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1418,6 +1418,20 @@ void ScTextWnd::Command( const CommandEvent& rCEvt )
 rBindings.Invalidate( SID_ATTR_CHAR_FONTHEIGHT );
 }
 }
+else if ( nCommand == CommandEventId::ContextMenu )
+{
+SfxViewFrame* pViewFrm = SfxViewFrame::Current();
+if (pViewFrm)
+{
+Point aPos = rCEvt.GetMousePosPixel();
+if (!rCEvt.IsMouseEvent())
+{
+Size aSize = GetOutputSizePixel();
+aPos = Point(aSize.Width() / 2, aSize.Height() / 2);
+}
+pViewFrm->GetDispatcher()->ExecutePopup("formulabar", this, 
);
+}
+}
 else if ( nCommand == CommandEventId::Wheel )
 {
 //don't call InputChanged for CommandEventId::Wheel
diff --git a/sc/uiconfig/scalc/popupmenu/formulabar.xml 
b/sc/uiconfig/scalc/popupmenu/formulabar.xml
new file mode 100644
index ..ce6abf1d393d
--- /dev/null
+++ b/sc/uiconfig/scalc/popupmenu/formulabar.xml
@@ -0,0 +1,17 @@
+
+
+http://openoffice.org/2001/menu;>
+  
+  
+  
+  
+  
+  
+
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-26 Thread manujvashist
 officecfg/registry/schema/org/openoffice/Office/Calc.xcs |   21 +
 sc/source/ui/dbgui/asciiopt.cxx  |   59 +++
 sc/source/ui/dbgui/csvgrid.cxx   |4 -
 sc/source/ui/dbgui/csvtablebox.cxx   |4 -
 sc/source/ui/dbgui/imoptdlg.cxx  |7 +
 sc/source/ui/dbgui/scuiasciiopt.cxx  |   32 ++--
 sc/source/ui/docshell/impex.cxx  |   24 +-
 sc/source/ui/inc/asciiopt.hxx|5 +
 sc/source/ui/inc/csvgrid.hxx |2 
 sc/source/ui/inc/csvtablebox.hxx |2 
 sc/source/ui/inc/imoptdlg.hxx|2 
 sc/source/ui/inc/impex.hxx   |2 
 sc/source/ui/inc/scuiasciiopt.hxx|1 
 sc/uiconfig/scalc/ui/textimportcsv.ui|   18 
 14 files changed, 148 insertions(+), 35 deletions(-)

New commits:
commit d999b55e28d0445df870f69b3a269964e3635def
Author: manujvashist 
Date:   Sun Dec 10 10:56:38 2017 +0530

tdf#114200  : added 'Trim space' feature in 'Text Import'

made a checkbox to Trim extra white spaces from both ends
while using seperators in 'Text Imort'

Change-Id: Ib05d9b17525e3ebec380ec8b7eebfa35fff78f01
Reviewed-on: https://gerrit.libreoffice.org/46177
Tested-by: Jenkins 
Reviewed-by: Manuj Vashist 
Reviewed-by: Heiko Tietze 
Tested-by: Heiko Tietze 

diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
index 2d5e7a8696e0..7951d4bf91cc 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
@@ -1088,6 +1088,13 @@
   
   false
 
+
+  
+If true, leading and trailing white spaces are trimmed 
off.
+RemoveSpace
+  
+  false
+
 
   
 If true, quoted field is always imported as text with no 
exception.
@@ -1163,6 +1170,13 @@
   
   false
 
+
+  
+If true, leading and trailing white spaces are trimmed 
off.
+RemoveSpace
+  
+  false
+
 
   
 If true, quoted field is always imported as text with no 
exception.
@@ -1245,6 +1259,13 @@
   
   false
 
+
+  
+If true, leading and trailing white spaces are trimmed 
off.
+RemoveSpace
+  
+  false
+
 
   
 List of Separators - as a String
diff --git a/sc/source/ui/dbgui/asciiopt.cxx b/sc/source/ui/dbgui/asciiopt.cxx
index 3032106518f4..d699b4ea3675 100644
--- a/sc/source/ui/dbgui/asciiopt.cxx
+++ b/sc/source/ui/dbgui/asciiopt.cxx
@@ -29,9 +29,12 @@ ScAsciiOptions::ScAsciiOptions() :
 bFixedLen   ( false ),
 aFieldSeps  ( OUString(';') ),
 bMergeFieldSeps ( false ),
+bRemoveSpace( false ),
 bQuotedFieldAsText(false),
 bDetectSpecialNumber(false),
 bSkipEmptyCells(false),
+bSaveAsShown(true),
+bSaveFormulas(false),
 cTextSep( cDefaultTextSep ),
 eCharSet( osl_getThreadTextEncoding() ),
 eLang   ( LANGUAGE_SYSTEM ),
@@ -74,7 +77,12 @@ ScAsciiOptions& ScAsciiOptions::operator=( const 
ScAsciiOptions& rCpy )
 bFixedLen   = rCpy.bFixedLen;
 aFieldSeps  = rCpy.aFieldSeps;
 bMergeFieldSeps = rCpy.bMergeFieldSeps;
+bRemoveSpace= rCpy.bRemoveSpace;
 bQuotedFieldAsText = rCpy.bQuotedFieldAsText;
+bDetectSpecialNumber = rCpy.bDetectSpecialNumber;
+bSkipEmptyCells = rCpy.bSkipEmptyCells;
+bSaveAsShown= rCpy.bSaveAsShown;
+bSaveFormulas   = rCpy.bSaveFormulas;
 cTextSep= rCpy.cTextSep;
 eCharSet= rCpy.eCharSet;
 bCharSetSystem  = rCpy.bCharSetSystem;
@@ -180,15 +188,34 @@ void ScAsciiOptions::ReadFromString( const OUString& 
rString )
 else
 bDetectSpecialNumber = true;// default of versions that didn't add 
the parameter
 
-// 9th token is used for "Save as shown" in export options
-// 10th token is used for "Save cell formulas" in export options
+// Token 8: used for "Save as shown" in export options
+if ( nPos >= 0 )
+{
+bSaveAsShown = rString.getToken(0, ',', nPos) == "true";
+}
+else
+bSaveAsShown = true;//default value
+// Token 9: used for "Save cell formulas" in export options
+if ( nPos >= 0 )
+{
+bSaveFormulas = rString.getToken(0, ',', nPos) == "true";
+}
+else
+bSaveFormulas = false;
+// Token 10: Boolean for Trim spaces.
+if 

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

2017-12-21 Thread Laurent BP
 officecfg/registry/schema/org/openoffice/Office/Calc.xcs |   14 
 sc/source/ui/dbgui/scuiasciiopt.cxx  |  235 ---
 sc/source/ui/docshell/impex.cxx  |   21 -
 sc/source/ui/inc/asciiopt.hxx|3 
 sc/source/ui/inc/scuiasciiopt.hxx|1 
 sc/uiconfig/scalc/ui/textimportcsv.ui|   18 +
 6 files changed, 185 insertions(+), 107 deletions(-)

New commits:
commit 3bd4957191f12457c17404645bab0794639c95f8
Author: Laurent BP 
Date:   Sun Dec 17 17:14:55 2017 +0100

tdf#113979 Add option to Skip empty cells

During "Txt to column", empty cells should erase previous content
(see tdf#69981)
But during paste, user may want to keep previous content.
This option makes all users happy.
During import of CSV file, this option is hidden.

In the same time, I've tried to remove some duplicate code.
Update: properties offsets are now enum and replace define const

Change-Id: I88be2d0432ff804033cff050422e666fa2882efd
Reviewed-on: https://gerrit.libreoffice.org/46651
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 

diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
index 42d535a6a795..2d5e7a8696e0 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
@@ -1177,6 +1177,13 @@
   
   true
 
+
+  
+If true, Calc preserves previous content of cells when 
pasting empty ones. If false, Calc delete content of previous cells.
+SkipEmptyCells
+  
+  true
+
 
   
 Language to use for CSV import.  This determines how the 
numbers are parsed.
@@ -1245,6 +1252,13 @@
   
 
 
+
+  
+If true, Calc preserves previous content of cells when 
pasting empty ones. If false, Calc delete content of previous cells.
+SkipEmptyCells
+  
+  false
+
 
   
 Text Separators
diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx 
b/sc/source/ui/dbgui/scuiasciiopt.cxx
index ec3604fde5c7..69cfdc65324a 100644
--- a/sc/source/ui/dbgui/scuiasciiopt.cxx
+++ b/sc/source/ui/dbgui/scuiasciiopt.cxx
@@ -52,18 +52,37 @@ const SCSIZE ASCIIDLG_MAXROWS= MAXROWCOUNT;
 using namespace com::sun::star::uno;
 
 // Defines - CSV Import Preserve Options
-#define FIXED_WIDTH "FixedWidth"
-#define FROM_ROW"FromRow"
-#define CHAR_SET"CharSet"
-#define SEPARATORS  "Separators"
-#define TEXT_SEPARATORS "TextSeparators"
-#define MERGE_DELIMITERS"MergeDelimiters"
-#define QUOTED_AS_TEXT  "QuotedFieldAsText"
-#define DETECT_SPECIAL_NUM  "DetectSpecialNumbers"
-#define LANGUAGE"Language"
-#define SEP_PATH"Office.Calc/Dialogs/CSVImport"
-#define SEP_PATH_CLPBRD "Office.Calc/Dialogs/ClipboardTextImport"
-#define SEP_PATH_TEXT2COL   "Office.Calc/Dialogs/TextToColumnsImport"
+enum CSVImportOptionsIndex
+{
+CSVIO_MergeDelimiters = 0,
+CSVIO_Separators,
+CSVIO_TextSeparators,
+CSVIO_FixedWidth,
+CSVIO_FromRow,
+CSVIO_Text2ColSkipEmptyCells = CSVIO_FromRow,
+CSVIO_CharSet,
+CSVIO_QuotedAsText,
+CSVIO_DetectSpecialNum,
+CSVIO_Language,
+CSVIO_PasteSkipEmptyCells
+};
+
+const ::std::vector CSVImportOptionNames =
+{
+"MergeDelimiters",
+"Separators",
+"TextSeparators",
+"FixedWidth",
+"FromRow",
+"CharSet",
+"QuotedFieldAsText",
+"DetectSpecialNumbers",
+"Language",
+"SkipEmptyCells"
+};
+const OUString aSep_Path =   "Office.Calc/Dialogs/CSVImport";
+const OUString aSep_Path_Clpbrd ="Office.Calc/Dialogs/ClipboardTextImport";
+const OUString aSep_Path_Text2Col =  "Office.Calc/Dialogs/TextToColumnsImport";
 
 static void lcl_FillCombo( ComboBox& rCombo, const OUString& rList, 
sal_Unicode cSelect )
 {
@@ -110,129 +129,134 @@ static sal_Unicode lcl_CharFromCombo( const ComboBox& 
rCombo, const OUString& rL
 return c;
 }
 
-static void load_Separators( OUString , OUString 
,
- bool , bool& bQuotedAsText, 
bool& bDetectSpecialNum,
- bool , sal_Int32 , sal_Int32 
,
- sal_Int32& nLanguage, ScImportAsciiCall eCall )
+void lcl_CreatePropertiesNames ( OUString& rSepPath, Sequence& 
rNames, ScImportAsciiCall eCall )
 {
-SequenceaValues;
-const Any *pProperties;
-Sequence aNames( eCall == SC_TEXTTOCOLUMNS ? 4 : 9 );
-OUString* pNames = aNames.getArray();
-OUString aSepPath;
+sal_Int32 nProperties = 0;
+
 switch(eCall)
 {
 case SC_IMPORTFILE:
-

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

2015-12-14 Thread Maxim Monastirsky
 officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu|   
72 
 officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu |   
65 +++
 officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu |
5 
 officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu |   
10 +
 sc/UIConfig_scalc.mk |   
16 +
 sc/source/ui/drawfunc/chartsh.cxx|
2 
 sc/source/ui/drawfunc/drawsh.cxx |
2 
 sc/source/ui/drawfunc/drformsh.cxx   |
2 
 sc/source/ui/drawfunc/drtxtob.cxx|
2 
 sc/source/ui/drawfunc/graphsh.cxx|
2 
 sc/source/ui/drawfunc/mediash.cxx|
2 
 sc/source/ui/drawfunc/oleobjsh.cxx   |
2 
 sc/source/ui/view/auditsh.cxx|
2 
 sc/source/ui/view/cellsh.cxx |
2 
 sc/source/ui/view/editsh.cxx |
2 
 sc/source/ui/view/pgbrksh.cxx|
2 
 sc/source/ui/view/pivotsh.cxx|
2 
 sc/source/ui/view/prevwsh.cxx|
2 
 sc/uiconfig/scalc/popupmenu/audit.xml|   
17 ++
 sc/uiconfig/scalc/popupmenu/cell.xml |   
40 
 sc/uiconfig/scalc/popupmenu/celledit.xml |   
28 +++
 sc/uiconfig/scalc/popupmenu/chart.xml|   
62 +++
 sc/uiconfig/scalc/popupmenu/draw.xml |   
74 +
 sc/uiconfig/scalc/popupmenu/drawtext.xml |   
24 ++
 sc/uiconfig/scalc/popupmenu/form.xml |   
61 +++
 sc/uiconfig/scalc/popupmenu/graphic.xml  |   
82 ++
 sc/uiconfig/scalc/popupmenu/media.xml|   
63 +++
 sc/uiconfig/scalc/popupmenu/oleobject.xml|   
61 +++
 sc/uiconfig/scalc/popupmenu/pagebreak.xml|   
32 +++
 sc/uiconfig/scalc/popupmenu/pivot.xml|   
15 +
 sc/uiconfig/scalc/popupmenu/preview.xml  |   
17 ++
 31 files changed, 749 insertions(+), 21 deletions(-)

New commits:
commit 1c035f1b0eb6f5e5fbb6c54bf2eea9a6c983eb8f
Author: Maxim Monastirsky 
Date:   Mon Dec 14 17:29:03 2015 +0200

tdf#93837 Convert some Calc context menus to xml

TODO:

- Clean the now unused defines/resources.
- Several submenus are duplicated (in the menubar too). Makes
  sense to refactor them to separate popup menu controllers.

Change-Id: I85505eda1c5fb707b1e6064007f27af7b31452bf
Reviewed-on: https://gerrit.libreoffice.org/20704
Reviewed-by: Maxim Monastirsky 
Tested-by: Maxim Monastirsky 

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
index fb15369..80f887c 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
@@ -86,6 +86,31 @@
   1
 
   
+  
+
+  Trace ~Precedent
+
+  
+  
+
+  ~Remove Precedent
+
+  
+  
+
+  ~Trace Dependent
+
+  
+  
+
+  Remove Dependent
+
+  
+  
+
+  Exit Fill Mode
+
+  
   
 
   Remove ~All Traces
@@ -180,6 +205,9 @@
 
   Pivot Table Filter
 
+
+  ~Filter...
+
   
   
 
@@ -336,6 +364,9 @@
 
   Pi~vot Table...
 
+
+  ~Edit Layout...
+
 
   1
 
@@ -605,6 +636,9 @@
 
   Delete C~ells...
 
+
+  De~lete...
+
   
   
 
@@ -872,6 +906,9 @@
 
   Comm~ent
 
+
+  Insert Co~mment
+
 
   1
 
@@ -977,6 +1014,9 @@
 
   Cle~ar Cells...
 
+
+  Cl~ear Contents...
+
 
   1
 
@@ -1051,6 +1091,9 @@
 
   Insert ~Cells...
 
+
+  ~Insert...
+
   
   
 
@@ -1212,6 +1255,9 @@
 
   Ce~lls...
 
+