core.git: officecfg/registry sc/source
officecfg/registry/schema/org/openoffice/Office/Calc.xcs |8 sc/source/ui/view/output.cxx | 26 ++- 2 files changed, 20 insertions(+), 14 deletions(-) New commits: commit bddae0d0dc4f64757100e00432ca40a6470d2c31 Author: Heiko Tietze AuthorDate: Tue Jan 16 13:11:06 2024 +0100 Commit: Heiko Tietze CommitDate: Wed Jan 17 08:50:24 2024 +0100 Resolves tdf#158958 and tdf#159124 - Improvements to Comments indicator * Option to control the indicator size added * Border color adopts the grid color * Indicator moved to the very edge of the cell * Default dynamic size reduced Change-Id: Ia298edfa30061910344a1afa42b42840b9cdab77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162175 Tested-by: Jenkins Reviewed-by: Heiko Tietze diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs index d54b092eca66..de97c822c7c1 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs @@ -105,6 +105,14 @@ true + + + +If less than 1, the size of comment indicator is calculated dynamically; otherwise this value will be used. +Comment indicator size + + 0 + diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx index 58b6db5107d3..e650c6faf774 100644 --- a/sc/source/ui/view/output.cxx +++ b/sc/source/ui/view/output.cxx @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -2467,7 +2468,7 @@ void ScOutputData::DrawNoteMarks(vcl::RenderContext& rRenderContext) nInitPosX += nMirrorW - 1; // always in pixels tools::Long nLayoutSign = bLayoutRTL ? -1 : 1; -tools::Long nPosY = nScrY; +tools::Long nPosY = nScrY - 1; for (SCSIZE nArrY=1; nArrY+1ColHidden(nX, nTab) && mpDoc->GetNote(nX, pRowInfo[nArrY].nRowNo, nTab) && (bIsMerged || (!pInfo->bHOverlapped && !pInfo->bVOverlapped))) { - -const bool bIsDarkBackground = SC_MOD()->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor.IsDark(); -const Color aColor(static_cast(pInfo->maBackground.getItem())->GetColor()); -if ( aColor == COL_AUTO ? bIsDarkBackground : aColor.IsDark() ) -rRenderContext.SetLineColor(COL_WHITE); -else -rRenderContext.SetLineColor(COL_BLACK); + rRenderContext.SetLineColor(SC_MOD()->GetColorConfig().GetColorValue(svtools::CALCGRID).nColor); const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); if ( mbUseStyleColor && rStyleSettings.GetHighContrastMode() ) @@ -2506,7 +2501,7 @@ void ScOutputData::DrawNoteMarks(vcl::RenderContext& rRenderContext) else rRenderContext.SetFillColor( SC_MOD()->GetColorConfig().GetColorValue(svtools::CALCCOMMENTS).nColor ); -tools::Long nMarkX = nPosX + ( pRowInfo[0].basicCellInfo(nX).nWidth - 2 ) * nLayoutSign; +tools::Long nMarkX = nPosX + ( pRowInfo[0].basicCellInfo(nX).nWidth - 1) * nLayoutSign; if ( bIsMerged || pInfo->bMerged ) { // if merged, add widths of all cells @@ -2517,11 +2512,14 @@ void ScOutputData::DrawNoteMarks(vcl::RenderContext& rRenderContext) ++nNextX; } } -// DPI/ZOOM 100/100 => 10, 100/50 => 7, 100/150 => 13 -// DPI/ZOOM 150/100 => 13, 150/50 => 8.5, 150/150 => 17.5 -const double fSize(rRenderContext.GetDPIScaleFactor() * aZoomX * 6 + 4); -// Make sure we have an integer size to draw a proper triangle -sal_Int16 nSize = static_cast(fSize); +// DPI/ZOOM 100/100 => 6, 100/50 => 4.5, 100/150 => 7.5 +// DPI/ZOOM 150/100 => 7.5, 150/50 => 6, 150/150 => 9 +sal_Int16 nSize = officecfg::Office::Calc::Content::Display::NoteIndicator::get(); +if (nSize < 1) +{ + const double fSize(rRenderContext.GetDPIScaleFactor() * aZoomX * 3 + 3); + nSize = static_cast(fSize); +} Point aPoints[3]; aPoints[0] = Point(nMarkX, nPosY); aPoints[0].setX( bLayoutRTL ? aPoints[0].X() + nSize : aPoints[0].X() - nSize );
[Libreoffice-commits] core.git: officecfg/registry sc/source
officecfg/registry/schema/org/openoffice/Office/Calc.xcs | 44 --- sc/source/core/tool/viewopti.cxx | 34 +-- 2 files changed, 4 insertions(+), 74 deletions(-) New commits: commit 464d5f1265bd3ed2eff0c809152b8ccb53b785df Author: Gabor Kelemen AuthorDate: Thu Nov 30 23:06:37 2023 +0100 Commit: Gabor Kelemen CommitDate: Tue Dec 5 12:41:09 2023 +0100 [API CHANGE] Drop unused XAxis/YAxis config groups from Calc grid options. Spotted while researching for tdf#158473 last mention of ther getters was commented out in 2001 by: commit a4e5d2cb47275e91834e41a9d51f1bf11ec409b1 Change-Id: Iffc7b5c4fb50352ad7063fc911039707a20dca4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160169 Tested-by: Jenkins Reviewed-by: Gabor Kelemen diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs index e1fe88dfa1d9..d54b092eca66 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs @@ -780,50 +780,6 @@ true - - - - -Defines the horizontal distance between the single grid points in 1/100th millimeters. -X axis - - - - Specifies the distance that is used with locales that use the metric system. - - -1000 - - - - Specifies the distance that is used with locales that don't use the metric system. - - -1270 - - - - - - -Defines the vertical distance between the single grid points in 1/100th millimeters. -Y axis - - - - Specifies the distance that is used with locales that use the metric system. - - -1000 - - - - Specifies the distance that is used with locales that don't use the metric system. - - -1270 - - diff --git a/sc/source/core/tool/viewopti.cxx b/sc/source/core/tool/viewopti.cxx index 41394ded9a16..39e2e6e0e762 100644 --- a/sc/source/core/tool/viewopti.cxx +++ b/sc/source/core/tool/viewopti.cxx @@ -46,15 +46,11 @@ void ScGridOptions::SetDefaults() { nFldDrawX = 1000; // 1cm nFldDrawY = 1000; -nFldSnapX = 1000; -nFldSnapY = 1000; } else { nFldDrawX = 1270; // 0,5" nFldDrawY = 1270; -nFldSnapX = 1270; -nFldSnapY = 1270; } nFldDivisionX = 1; nFldDivisionY = 1; @@ -66,8 +62,6 @@ bool ScGridOptions::operator==( const ScGridOptions& rCpy ) const && nFldDivisionX== rCpy.nFldDivisionX && nFldDrawY== rCpy.nFldDrawY && nFldDivisionY== rCpy.nFldDivisionY -&& nFldSnapX== rCpy.nFldSnapX -&& nFldSnapY== rCpy.nFldSnapY && bUseGridsnap == rCpy.bUseGridsnap && bSynchronize == rCpy.bSynchronize && bGridVisible == rCpy.bGridVisible @@ -156,8 +150,6 @@ std::unique_ptr ScViewOptions::CreateGridItem() const pItem->SetFieldDivisionX ( aGridOpt.GetFieldDivisionX() ); pItem->SetFieldDrawY ( aGridOpt.GetFieldDrawY() ); pItem->SetFieldDivisionY ( aGridOpt.GetFieldDivisionY() ); -pItem->SetFieldSnapX ( aGridOpt.GetFieldSnapX() ); -pItem->SetFieldSnapY ( aGridOpt.GetFieldSnapY() ); pItem->SetUseGridSnap ( aGridOpt.GetUseGridSnap() ); pItem->SetSynchronize ( aGridOpt.GetSynchronize() ); pItem->SetGridVisible ( aGridOpt.GetGridVisible() ); @@ -227,12 +219,10 @@ constexpr OUStringLiteral CFGPATH_GRID = u"Office.Calc/Grid"; #define SCGRIDOPT_RESOLU_Y 1 #define SCGRIDOPT_SUBDIV_X 2 #define SCGRIDOPT_SUBDIV_Y 3 -#define SCGRIDOPT_OPTION_X 4 -#define SCGRIDOPT_OPTION_Y 5 -#define SCGRIDOPT_SNAPTOGRID6 -#define SCGRIDOPT_SYNCHRON 7 -#define SCGRIDOPT_VISIBLE 8 -#define SCGRIDOPT_SIZETOGRID9 +#define SCGRIDOPT_SNAPTOGRID4 +#define SCGRIDOPT_SYNCHRON 5 +#define SCGRIDOPT_VISIBLE 6 +#define SCGRIDOPT_SIZETOGRID7 Sequence ScViewCfg::GetLayoutPropertyNames() { @@ -273,10 +263,6 @@ Sequence ScViewCfg::GetGridPropertyNames() : OUString("Resolution/YAxis/NonMetric")), // SCGRIDOPT_RESOLU_Y "Subdivision/XAxis", // SCGRIDOPT_SUBDIV_X "Subdivision/YAxis", // SCGRIDOPT_SUBDIV_Y -(bIsMetric ?
[Libreoffice-commits] core.git: officecfg/registry sc/source sc/uiconfig
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
officecfg/registry/schema/org/openoffice/Office/Calc.xcs |7 + sc/source/ui/inc/gridwin.hxx |2 sc/source/ui/inc/tabview.hxx |6 + sc/source/ui/inc/viewdata.hxx|2 sc/source/ui/view/gridwin.cxx| 55 sc/source/ui/view/gridwin4.cxx |4 sc/source/ui/view/tabview.cxx|1 sc/source/ui/view/tabview2.cxx | 66 +++ sc/source/ui/view/tabview3.cxx | 28 ++ sc/source/ui/view/viewdata.cxx |6 + 10 files changed, 177 insertions(+) New commits: commit 487e30bec174342fff07f1f8cc76c9beed4c4843 Author: Sahil Gautam AuthorDate: Tue Oct 31 03:57:05 2023 +0530 Commit: Mike Kaganski CommitDate: Fri Nov 17 17:35:32 2023 +0100 tdf#33201 Highlight current row and column in spreadsheet Highlighting functions added Change-Id: I65335538e394d048731c13ac87535502ea97dfa0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158680 Tested-by: Jenkins 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 3de756beac4e..aa58fc81a9a7 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs @@ -121,6 +121,13 @@ false + + +Indicates whether the column/row highlight has been enabled or not. +Column/row highlighting + + false + diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx index 8334e5fd0d51..37c38fe069a0 100644 --- a/sc/source/ui/inc/gridwin.hxx +++ b/sc/source/ui/inc/gridwin.hxx @@ -103,6 +103,7 @@ class SAL_DLLPUBLIC_RTTI ScGridWindow : public vcl::DocWindow, public DropTarget std::unique_ptr mpOOCursors; std::unique_ptr mpOOSelection; +std::unique_ptr mpOOHighlight; std::unique_ptr mpOOSelectionBorder; std::unique_ptr mpOOAutoFill; std::unique_ptr mpOODragRect; @@ -476,6 +477,7 @@ public: voidUpdateCursorOverlay(); voidDeleteSelectionOverlay(); voidUpdateSelectionOverlay(); +voidUpdateHighlightOverlay(); voidDeleteAutoFillOverlay(); voidUpdateAutoFillOverlay(); voidDeleteDragRectOverlay(); diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx index edb9dd991971..8c69933cc1af 100644 --- a/sc/source/ui/inc/tabview.hxx +++ b/sc/source/ui/inc/tabview.hxx @@ -179,6 +179,7 @@ private: tools::LongnPrevDragPos; BlockMode meBlockMode; // Marks block +BlockMode meHighlightBlockMode; // Highlight row/col SCCOL nBlockStartX; SCCOL nBlockStartXOrig; @@ -263,6 +264,8 @@ private: DECL_STATIC_LINK(ScTabView, InstallLOKNotifierHdl, void*, vcl::ILibreOfficeKitNotifier*); +voidUpdateHighlightOverlay(); + protected: voidUpdateHeaderWidth( const ScVSplitPos* pWhich = nullptr, const SCROW* pPosY = nullptr ); @@ -536,6 +539,8 @@ public: bool bCols = false, bool bRows = false, bool bForceNeg = false ); voidInitOwnBlockMode( const ScRange& rMarkRange ); voidDoneBlockMode( bool bContinue = false ); +voidInitBlockModeHighlight( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, bool bCols, bool bRows ); +voidDoneBlockModeHighlight( bool bContinue ); boolIsBlockMode() const; @@ -561,6 +566,7 @@ public: * @param nModifier: 0, KEY_SHIFT, KEY_MOD1, KEY_SHIFT | KEY_MOD1 */ voidMarkRows(SCROW nRow, sal_Int16 nModifier); +voidHighlightOverlay(const ScAddress& rCell); voidMarkDataArea( bool bIncludeCursor = true ); voidMarkMatrixFormula(); diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx index 7a6758788ad4..72386b2efa17 100644 --- a/sc/source/ui/inc/viewdata.hxx +++ b/sc/source/ui/inc/viewdata.hxx @@ -274,6 +274,7 @@ private: ::std::vector> maTabData; ScMarkData maMarkData; +ScMarkData maHighlightData; ScViewDataTable*pThisTab; // Data of the displayed sheet ScDocShell* pDocShell; ScDocument& mrDoc; @@ -361,6 +362,7 @@ public: SfxDispatcher& GetDispatcher();// from ViewShell's ViewFrame ScMarkData& GetMarkData(); +ScMarkData& GetHighlightData(); const ScMarkData& GetMarkData() const;
[Libreoffice-commits] core.git: officecfg/registry sc/source sc/uiconfig
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
officecfg/registry/schema/org/openoffice/Office/Calc.xcs |7 +++ sc/source/ui/view/cellsh4.cxx| 12 2 files changed, 15 insertions(+), 4 deletions(-) New commits: commit 4adc868328e958a4a9cead3731bd3468497c97c8 Author: Heiko Tietze AuthorDate: Mon Jul 17 16:03:41 2023 +0200 Commit: Heiko Tietze CommitDate: Tue Jul 18 15:05:34 2023 +0200 Resolves tdf#112876 - Make use of scroll lock configurable Change-Id: I8e2f238e59601fcc1d92fc0593c3d20e75396cc5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154528 Reviewed-by: Mike Kaganski Tested-by: Jenkins diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs index d861f56e81d7..eff7ac7aa80a 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs @@ -690,6 +690,13 @@ true + + + Toggles the scroll lock behavior allowing to disable it for special keyboards + Toggles the scroll lock behavior allowing to disable it for special keyboards + +true + Specifies the functions last used. diff --git a/sc/source/ui/view/cellsh4.cxx b/sc/source/ui/view/cellsh4.cxx index 13d6993634dd..e44dbe599dba 100644 --- a/sc/source/ui/view/cellsh4.cxx +++ b/sc/source/ui/view/cellsh4.cxx @@ -27,6 +27,7 @@ #include #include #include +#include #include void ScCellShell::ExecuteCursor( SfxRequest& rReq ) @@ -121,10 +122,13 @@ void ScCellShell::ExecuteCursor( SfxRequest& rReq ) // If ScrollLock key is active, cell cursor stays on the current cell while // scrolling the grid. bool bScrollLock = false; -KeyIndicatorState eState = pFrameWin->GetIndicatorState(); -if (eState & KeyIndicatorState::SCROLLLOCK) -bScrollLock = true; - +// tdf#112876 - allow to disable for special keyboards +if (officecfg::Office::Calc::Input::UseScrollLock::get()) +{ +KeyIndicatorState eState = pFrameWin->GetIndicatorState(); +if (eState & KeyIndicatorState::SCROLLLOCK) +bScrollLock = true; +} //OS: once for all should do, however! pTabViewShell->ExecuteInputDirect(); switch ( nSlotId )
[Libreoffice-commits] core.git: officecfg/registry sc/source sc/uiconfig
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
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
officecfg/registry/schema/org/openoffice/Office/Calc.xcs |2 +- sc/source/core/tool/calcconfig.cxx |5 + 2 files changed, 6 insertions(+), 1 deletion(-) New commits: commit f7e7a59f38682dcd1f916c63fe8e2a437ecb5cf1 Author: Luboš Luňák AuthorDate: Fri Nov 30 21:36:03 2018 +0100 Commit: Luboš Luňák CommitDate: Mon Dec 3 15:35:15 2018 +0100 add ^ (=power) and - (=unary minus) to OpenCLSubsetOpCodes Both of these are trivial and quite common mathematical operations. Unary minus is a bit complicated in that unary '-' is the same symbol as binary '-' and so there needs to be a hack to expand the '-' from the list to both of the opcodes ocSub and ocNegSub. Change-Id: I556e20e161c22dc89919afffbf904c1ef1d552ff Reviewed-on: https://gerrit.libreoffice.org/64362 Tested-by: Jenkins Reviewed-by: Luboš Luňák diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs index 7951d4bf91cc..e5b3318ff701 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs @@ -1480,7 +1480,7 @@ true, and a formula contains only these operators and functions, it might be calculated using OpenCL. - +;-;*;/;RAND;SIN;COS;TAN;ATAN;EXP;LN;SQRT;NORMSDIST;NORMSINV;ROUND;POWER;SUMPRODUCT;MIN;MAX;SUM;PRODUCT;AVERAGE;COUNT;VAR;NORMDIST;VLOOKUP;CORREL;COVAR;PEARSON;SLOPE;SUMIFS + +;-;*;/;^;RAND;SIN;COS;TAN;ATAN;EXP;LN;SQRT;NORMSDIST;NORMSINV;ROUND;POWER;SUMPRODUCT;MIN;MAX;SUM;PRODUCT;AVERAGE;COUNT;VAR;NORMDIST;VLOOKUP;CORREL;COVAR;PEARSON;SLOPE;SUMIFS diff --git a/sc/source/core/tool/calcconfig.cxx b/sc/source/core/tool/calcconfig.cxx index 4525df730484..6bafa226e8b5 100644 --- a/sc/source/core/tool/calcconfig.cxx +++ b/sc/source/core/tool/calcconfig.cxx @@ -111,8 +111,10 @@ void ScCalcConfig::setOpenCLConfigToDefault() static OpCodeSet pDefaultOpenCLSubsetOpCodes(new std::set({ ocAdd, ocSub, +ocNegSub, ocMul, ocDiv, +ocPow, ocRandom, ocSin, ocCos, @@ -236,6 +238,9 @@ ScCalcConfig::OpCodeSet ScStringToOpCodeSet(const OUString& rOpCodes) } fromIndex = semicolon+1; } +// HACK: Both unary and binary minus have the same string but different opcodes. +if( result->find( ocSub ) != result->end()) +result->insert( ocNegSub ); return result; } ___ 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
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
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 MonastirskyDate: 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
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: manujvashistDate: 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
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 BPDate: 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 toolkit/source
officecfg/registry/schema/org/openoffice/Office/Calc.xcs |2 +- sc/source/core/data/formulacell.cxx |2 +- toolkit/source/controls/controlmodelcontainerbase.cxx|2 +- 3 files changed, 3 insertions(+), 3 deletions(-) New commits: commit 9288afaa6956c4fcd8f66cdd03a6fa057469db66 Author: Andrea GelminiDate: Tue Nov 21 17:36:50 2017 +0100 Fix typos Change-Id: I4713dd5c590d331e599b7e9ab88f5cc65e8d7b87 Reviewed-on: https://gerrit.libreoffice.org/45045 Reviewed-by: Julien Nabet Tested-by: Julien Nabet diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs index 72ac33b99413..42d535a6a795 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs @@ -1418,7 +1418,7 @@ -Whether to use threaded calculation of forumula groups when applicable. +Whether to use threaded calculation of formula groups when applicable. true diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index 329f1afa5034..987eed152f47 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -4326,7 +4326,7 @@ bool ScFormulaCell::InterpretFormulaGroup() static const bool bThreadingProhibited = std::getenv("SC_NO_THREADED_CALCULATION"); -// To temporarilu use threading for sc unit tests regardless of the size of the formula group, +// To temporary use threading for sc unit tests regardless of the size of the formula group, // add the condition !std::getenv("LO_TESTNAME") below (with &&) if (GetWeight() < ScInterpreter::GetGlobalConfig().mnOpenCLMinimumFormulaGroupSize) { diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx index a92db2112f7c..3aaff3f1f459 100644 --- a/toolkit/source/controls/controlmodelcontainerbase.cxx +++ b/toolkit/source/controls/controlmodelcontainerbase.cxx @@ -492,7 +492,7 @@ void ControlModelContainerBase::replaceByName( const OUString& aName, const Any& Reference< XNameContainer > xAllChildren( getPropertyValue( GetPropertyName( BASEPROPERTY_USERFORMCONTAINEES ) ), UNO_QUERY ); if ( xAllChildren.is() ) { -// remove old control (and children) from global list of containes +// remove old control (and children) from global list of containers updateUserFormChildren( xAllChildren, aName, Remove, uno::Reference< XControlModel >() ); // Add new control (and containees if they exist) updateUserFormChildren( xAllChildren, aName, Insert, xNewModel ); ___ 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
officecfg/registry/schema/org/openoffice/Office/Calc.xcs | 20 +++ sc/source/ui/view/viewfun2.cxx | 10 +-- 2 files changed, 27 insertions(+), 3 deletions(-) New commits: commit da24355234ec12f2f4c652113dbbb1216ba5492c Author: Andras TimarDate: Wed Apr 19 13:29:21 2017 +0200 Settings for not showing Merge Cells dialog and for emptying hidden cells By default nothing changes. But users have the possibility to avoid the confusing (?) Merge Cell dialog. Also, when the dialog is disabled, users may want to set the EmptyMergedCells to true, to mimic Excel's behaviour. Change-Id: I9656ae59199bb697c45786dd478379f5c89eb08f Reviewed-on: https://gerrit.libreoffice.org/36679 Tested-by: Jenkins Reviewed-by: Andras Timar diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs index f03fcae1e147..86d3525d8689 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs @@ -1865,6 +1865,26 @@ Contains various compatibility settings. + + + Contains settings for merging cells. + Merge cells + + + +Specifies whether the Merge Cells dialog box is shown, when some cells are not empty. +Show Merge Cells dialog + + true + + + +Specifies whether to empty the contents of the hidden cells (like Excel does). +Empty merged cells + + false + + Contains options related to key bindings diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index b7ee8dd55eb6..59609fbebfe0 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -92,6 +92,8 @@ #include #include +#include + using namespace com::sun::star; using ::editeng::SvxBorderLine; @@ -1096,11 +1098,12 @@ bool ScViewFunc::MergeCells( bool bApi, bool& rDoContents, bool bCenter ) } bool bOk = true; -bool bEmptyMergedCells = false; +bool bEmptyMergedCells = officecfg::Office::Calc::Compatibility::MergeCells::EmptyMergedCells::get(); if (bAskDialog) { -if (!bApi) +bool bShowDialog = officecfg::Office::Calc::Compatibility::MergeCells::ShowDialog::get(); +if (!bApi && bShowDialog) { VclPtr aBox = VclPtr::Create( GetViewData().GetDialogParent() ); sal_uInt16 nRetVal = aBox->Execute(); @@ -1113,7 +1116,8 @@ bool ScViewFunc::MergeCells( bool bApi, bool& rDoContents, bool bCenter ) rDoContents = true; break; case KeepContentHiddenCells: -break; // keep default values +bEmptyMergedCells = false; +break; case EmptyContentHiddenCells: bEmptyMergedCells = true; break; ___ 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
officecfg/registry/schema/org/openoffice/Office/Calc.xcs |4 - sc/source/core/tool/appoptio.cxx | 43 --- 2 files changed, 27 insertions(+), 20 deletions(-) New commits: commit 219d1f3385907f8bb375b626b0a35f8239fa1550 Author: Dennis FrancisDate: Sat Apr 16 00:04:45 2016 +0530 tdf#99329 : By default show sum and average statusbar functions... and correctly handle the non-default profiles from <= 5.1.*. Change-Id: If230364a81774e43836956eb38fb8257ddf176b2 Reviewed-on: https://gerrit.libreoffice.org/24118 Tested-by: Jenkins Reviewed-by: Joel Madero Reviewed-by: Eike Rathke Tested-by: Eike Rathke diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs index 8e068a8..bd17f4a 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs @@ -400,7 +400,7 @@ Selects a set of functions that are calculated for the selected cells, and which show the results in the status bar. Statusbar Functions - 0 + 514 @@ -447,7 +447,7 @@ - 9 + 1 diff --git a/sc/source/core/tool/appoptio.cxx b/sc/source/core/tool/appoptio.cxx index cbc3c19..9ce684f 100644 --- a/sc/source/core/tool/appoptio.cxx +++ b/sc/source/core/tool/appoptio.cxx @@ -255,6 +255,14 @@ static void lcl_GetSortList( Any& rDest ) #define SCCOMPATOPT_KEY_BINDING 0 #define SCCOMPATOPT_COUNT 1 +// Default value of Layout/Other/StatusbarMultiFunction +#define SCLAYOUTOPT_STATUSBARMULTI_DEFAULTVAL 514 +// Default value of Layout/Other/StatusbarFunction +#define SCLAYOUTOPT_STATUSBAR_DEFAULTVAL 1 +// Legacy default value of Layout/Other/StatusbarFunction +// prior to multiple statusbar functions feature addition +#define SCLAYOUTOPT_STATUSBAR_DEFAULTVAL_LEGACY 9 + static sal_uInt32 lcl_ConvertStatusBarFuncSetToSingle( sal_uInt32 nFuncSet ) { if ( !nFuncSet ) @@ -401,8 +409,9 @@ ScAppCfg::ScAppCfg() : OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed"); if(aValues.getLength() == aNames.getLength()) { -bool bStatusBarFuncSingleFound = false; -bool bStatusBarFuncMultiFound = false; +sal_uInt32 nStatusBarFuncSingle = 0; +sal_uInt32 nStatusBarFuncMulti = 0; +sal_uInt32 nUIntValTmp = 0; for(int nProp = 0; nProp < aNames.getLength(); nProp++) { OSL_ENSURE(pValues[nProp].hasValue(), "property value missing"); @@ -414,10 +423,12 @@ ScAppCfg::ScAppCfg() : if (pValues[nProp] >>= nIntVal) SetAppMetric( (FieldUnit) nIntVal ); break; case SCLAYOUTOPT_STATUSBAR: -bStatusBarFuncSingleFound = true; +if ( pValues[SCLAYOUTOPT_STATUSBAR] >>= nUIntValTmp ) +nStatusBarFuncSingle = nUIntValTmp; break; case SCLAYOUTOPT_STATUSBARMULTI: -bStatusBarFuncMultiFound = true; +if ( pValues[SCLAYOUTOPT_STATUSBARMULTI] >>= nUIntValTmp ) +nStatusBarFuncMulti = nUIntValTmp; break; case SCLAYOUTOPT_ZOOMVAL: if (pValues[nProp] >>= nIntVal) SetZoom( (sal_uInt16) nIntVal ); @@ -432,22 +443,18 @@ ScAppCfg::ScAppCfg() : } } -sal_uInt32 nUIntVal = 0; -if ( bStatusBarFuncMultiFound ) -{ -if ( pValues[SCLAYOUTOPT_STATUSBARMULTI] >>= nUIntVal ) -SetStatusFunc( nUIntVal ); -} -else if ( bStatusBarFuncSingleFound ) +if ( nStatusBarFuncMulti != SCLAYOUTOPT_STATUSBARMULTI_DEFAULTVAL ) +SetStatusFunc( nStatusBarFuncMulti ); +else if ( nStatusBarFuncSingle != SCLAYOUTOPT_STATUSBAR_DEFAULTVAL && + nStatusBarFuncSingle != SCLAYOUTOPT_STATUSBAR_DEFAULTVAL_LEGACY ) { -if ( pValues[SCLAYOUTOPT_STATUSBAR] >>= nUIntVal ) -{ -if ( nUIntVal ) -SetStatusFunc( 1 << nUIntVal ); -else -SetStatusFunc( 0 ); -} +if ( nStatusBarFuncSingle ) +SetStatusFunc( 1 << nStatusBarFuncSingle ); +else +SetStatusFunc( 0 ); } +else +SetStatusFunc( SCLAYOUTOPT_STATUSBARMULTI_DEFAULTVAL ); } aLayoutItem.SetCommitLink( LINK( this, ScAppCfg, LayoutCommitHdl ) );
[Libreoffice-commits] core.git: officecfg/registry sc/source
officecfg/registry/data/org/openoffice/Office/Accelerators.xcu | 20 +- sc/source/ui/docshell/docsh.cxx| 17 2 files changed, 35 insertions(+), 2 deletions(-) New commits: commit e5f56d0c6e2a7d75a1f5ee27550b1270641da977 Author: Yousuf PhilipsDate: Tue Mar 1 07:28:59 2016 +0400 tdf#96969 Calc: Change shortcut key for Select Column Change-Id: Iaaceef8af479ab40b157b06ed73a71c56e20ece7 Reviewed-on: https://gerrit.libreoffice.org/22795 Reviewed-by: Yousuf Philips Tested-by: Yousuf Philips diff --git a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu index 00b234d..a905124 100644 --- a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu +++ b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu @@ -1133,10 +1133,28 @@ .uno:MarkDependents + + +I10N SHORTCUTS - NO TRANSLATE +.uno:SelectColumn + + + + +I10N SHORTCUTS - NO TRANSLATE +.uno:SelectColumn + + I10N SHORTCUTS - NO TRANSLATE -.uno:SelectColumn +.uno:SelectAll + + + + +I10N SHORTCUTS - NO TRANSLATE +.uno:SelectAll diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index e216215..08dbab9 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -2970,7 +2970,7 @@ void ScDocShell::ResetKeyBindings( ScOptionsUtil::KeyBindingType eType ) return; vector aKeys; -aKeys.reserve(7); +aKeys.reserve(9); // Backspace key awt::KeyEvent aBackspace; @@ -2996,6 +2996,18 @@ void ScDocShell::ResetKeyBindings( ScOptionsUtil::KeyBindingType eType ) aAltDown.Modifiers = awt::KeyModifier::MOD2; aKeys.push_back(); +// Ctrl-Space +awt::KeyEvent aCtrlSpace; +aCtrlSpace.KeyCode = awt::Key::SPACE; +aCtrlSpace.Modifiers = awt::KeyModifier::MOD1; +aKeys.push_back(); + +// Ctrl-Shift-Space +awt::KeyEvent aCtrlShiftSpace; +aCtrlShiftSpace.KeyCode = awt::Key::SPACE; +aCtrlShiftSpace.Modifiers = awt::KeyModifier::MOD1 | awt::KeyModifier::SHIFT; +aKeys.push_back(); + // F4 awt::KeyEvent aF4; aF4.KeyCode = awt::Key::F4; @@ -3026,6 +3038,8 @@ void ScDocShell::ResetKeyBindings( ScOptionsUtil::KeyBindingType eType ) xScAccel->setKeyEvent(aBackspace, ".uno:Delete"); xScAccel->setKeyEvent(aCtrlD, ".uno:FillDown"); xScAccel->setKeyEvent(aAltDown, ".uno:DataSelect"); +xScAccel->setKeyEvent(aCtrlSpace, ".uno:SelectColumn"); +xScAccel->setKeyEvent(aCtrlShiftSpace, ".uno:SelectAll"); xScAccel->setKeyEvent(aF4, ".uno:ToggleRelative"); xScAccel->setKeyEvent(aCtrlShiftF4, ".uno:ViewDataSourceBrowser"); break; @@ -3033,6 +3047,7 @@ void ScDocShell::ResetKeyBindings( ScOptionsUtil::KeyBindingType eType ) xScAccel->setKeyEvent(aDelete, ".uno:Delete"); xScAccel->setKeyEvent(aBackspace, ".uno:ClearContents"); xScAccel->setKeyEvent(aCtrlD, ".uno:DataSelect"); +xScAccel->setKeyEvent(aCtrlShiftSpace, ".uno:SelectColumn"); xScAccel->setKeyEvent(aF4, ".uno:ViewDataSourceBrowser"); xScAccel->setKeyEvent(aShiftF4, ".uno:ToggleRelative"); break; ___ 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
officecfg/registry/data/org/openoffice/Office/Accelerators.xcu | 22 -- sc/source/ui/docshell/docsh.cxx| 12 ++--- sc/source/ui/src/globstr.src |2 3 files changed, 9 insertions(+), 27 deletions(-) New commits: commit d9f751a416db1a6d583e91d0d74b36185429245c Author: Yousuf PhilipsDate: Tue Mar 1 11:48:11 2016 +0400 tdf#97906 Calc: Correct cell reference shortcut keys Remove Shift+F4 shortcut key for cell reference and add it to the OOo Legacy compatibility mode. Improve wording of cell reference error message. Unify shortcut for Data Sources to Ctrl + Shift + F4. Change-Id: I0f4ab3768d2663984bb294763c2e4b299c5e8186 Reviewed-on: https://gerrit.libreoffice.org/22803 Reviewed-by: Yousuf Philips Tested-by: Yousuf Philips diff --git a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu index dd64bdb..00b234d 100644 --- a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu +++ b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu @@ -87,7 +87,7 @@ .uno:MacroDialog - + I10N SHORTCUTS - NO TRANSLATE .uno:ViewDataSourceBrowser @@ -347,7 +347,7 @@ .uno:Delete - + I10N SHORTCUTS - NO TRANSLATE .uno:ViewDataSourceBrowser @@ -768,24 +768,6 @@ .uno:ToggleRelative - - -I10N SHORTCUTS - NO TRANSLATE -.uno:ToggleRelative - - - - -I10N SHORTCUTS - NO TRANSLATE -.uno:ViewDataSourceBrowser - - - - -I10N SHORTCUTS - NO TRANSLATE -.uno:ViewDataSourceBrowser - - I10N SHORTCUTS - NO TRANSLATE diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 09f87e6..e216215 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -3008,11 +3008,11 @@ void ScDocShell::ResetKeyBindings( ScOptionsUtil::KeyBindingType eType ) aCtrlShiftF4.Modifiers = awt::KeyModifier::MOD1 | awt::KeyModifier::SHIFT; aKeys.push_back(); -// CTRL+SHIFT+F4 Mac -awt::KeyEvent aCtrlShiftF4Mac; -aCtrlShiftF4Mac.KeyCode = awt::Key::F4; -aCtrlShiftF4Mac.Modifiers = awt::KeyModifier::MOD3 | awt::KeyModifier::SHIFT; -aKeys.push_back(); +// SHIFT+F4 +awt::KeyEvent aShiftF4; +aShiftF4.KeyCode = awt::Key::F4; +aShiftF4.Modifiers = awt::KeyModifier::SHIFT; +aKeys.push_back(); // Remove all involved keys first, because swapping commands don't work // well without doing this. @@ -3028,13 +3028,13 @@ void ScDocShell::ResetKeyBindings( ScOptionsUtil::KeyBindingType eType ) xScAccel->setKeyEvent(aAltDown, ".uno:DataSelect"); xScAccel->setKeyEvent(aF4, ".uno:ToggleRelative"); xScAccel->setKeyEvent(aCtrlShiftF4, ".uno:ViewDataSourceBrowser"); -xScAccel->setKeyEvent(aCtrlShiftF4Mac, ".uno:ViewDataSourceBrowser"); break; case ScOptionsUtil::KEY_OOO_LEGACY: xScAccel->setKeyEvent(aDelete, ".uno:Delete"); xScAccel->setKeyEvent(aBackspace, ".uno:ClearContents"); xScAccel->setKeyEvent(aCtrlD, ".uno:DataSelect"); xScAccel->setKeyEvent(aF4, ".uno:ViewDataSourceBrowser"); +xScAccel->setKeyEvent(aShiftF4, ".uno:ToggleRelative"); break; default: ; diff --git a/sc/source/ui/src/globstr.src b/sc/source/ui/src/globstr.src index b1d72d3..01fa1e4 100644 --- a/sc/source/ui/src/globstr.src +++ b/sc/source/ui/src/globstr.src @@ -1391,7 +1391,7 @@ Resource RID_GLOBSTR }; String STR_ERR_NOREF { -Text [ en-US ] = "No references found." ; +Text [ en-US ] = "No cell references are found in the selected cells." ; }; String STR_ERR_LINKOVERLAP { ___ 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
officecfg/registry/data/org/openoffice/Office/Accelerators.xcu |6 ++ sc/source/ui/docshell/docsh.cxx| 24 +- 2 files changed, 29 insertions(+), 1 deletion(-) New commits: commit dab16a16fa3b853f7e139fc91817752b38dc9171 Author: Dennis FrancisDate: Sat Feb 27 13:56:51 2016 +0530 tdf#97906 : Toggle reference and show data sources shortcuts In Default mode : F4= Toggle reference Shift F4 = Toggle reference Ctrl+Shift+F4 = Show data sources (both Mac and non Mac) In Legacy mode : F4= Show data sources Shift F4 = Toggle reference Change-Id: Ifb53bfa671f212d73ebb8c3f80ed5c498d517d4d Reviewed-on: https://gerrit.libreoffice.org/22728 Tested-by: Jenkins Reviewed-by: Markus Mohrhard diff --git a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu index cbf75a5..7338768 100644 --- a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu +++ b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu @@ -780,6 +780,12 @@ .uno:ViewDataSourceBrowser + + +I10N SHORTCUTS - NO TRANSLATE +.uno:ViewDataSourceBrowser + + I10N SHORTCUTS - NO TRANSLATE diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 21eb4ed..5d03e98 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -2976,7 +2976,7 @@ void ScDocShell::ResetKeyBindings( ScOptionsUtil::KeyBindingType eType ) return; vector aKeys; -aKeys.reserve(4); +aKeys.reserve(7); // Backspace key awt::KeyEvent aBackspace; @@ -3002,6 +3002,24 @@ void ScDocShell::ResetKeyBindings( ScOptionsUtil::KeyBindingType eType ) aAltDown.Modifiers = awt::KeyModifier::MOD2; aKeys.push_back(); +// F4 +awt::KeyEvent aF4; +aF4.KeyCode = awt::Key::F4; +aF4.Modifiers = 0; +aKeys.push_back(); + +// CTRL+SHIFT+F4 +awt::KeyEvent aCtrlShiftF4; +aCtrlShiftF4.KeyCode = awt::Key::F4; +aCtrlShiftF4.Modifiers = awt::KeyModifier::MOD1 | awt::KeyModifier::SHIFT; +aKeys.push_back(); + +// CTRL+SHIFT+F4 Mac +awt::KeyEvent aCtrlShiftF4Mac; +aCtrlShiftF4Mac.KeyCode = awt::Key::F4; +aCtrlShiftF4Mac.Modifiers = awt::KeyModifier::MOD3 | awt::KeyModifier::SHIFT; +aKeys.push_back(); + // Remove all involved keys first, because swapping commands don't work // well without doing this. removeKeysIfExists(xScAccel, aKeys); @@ -3014,11 +3032,15 @@ void ScDocShell::ResetKeyBindings( ScOptionsUtil::KeyBindingType eType ) xScAccel->setKeyEvent(aBackspace, ".uno:Delete"); xScAccel->setKeyEvent(aCtrlD, ".uno:FillDown"); xScAccel->setKeyEvent(aAltDown, ".uno:DataSelect"); +xScAccel->setKeyEvent(aF4, ".uno:ToggleRelative"); +xScAccel->setKeyEvent(aCtrlShiftF4, ".uno:ViewDataSourceBrowser"); +xScAccel->setKeyEvent(aCtrlShiftF4Mac, ".uno:ViewDataSourceBrowser"); break; case ScOptionsUtil::KEY_OOO_LEGACY: xScAccel->setKeyEvent(aDelete, ".uno:Delete"); xScAccel->setKeyEvent(aBackspace, ".uno:ClearContents"); xScAccel->setKeyEvent(aCtrlD, ".uno:DataSelect"); +xScAccel->setKeyEvent(aF4, ".uno:ViewDataSourceBrowser"); break; default: ; ___ 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
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 MonastirskyDate: 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... +
[Libreoffice-commits] core.git: officecfg/registry sc/source
officecfg/registry/schema/org/openoffice/Office/Calc.xcs |2 +- sc/source/core/tool/calcconfig.cxx |1 + 2 files changed, 2 insertions(+), 1 deletion(-) New commits: commit acaafc03e623ac25d4408605f34d50618926c5d0 Author: Tor Lillqvist t...@collabora.com Date: Fri Mar 6 18:02:56 2015 +0200 Add NORMSDIST to the default OpenCL use opcode subset Change-Id: I7ee56f06e8e50180e31c01253c9100c11b485c0d diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs index 679e868..e680389 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs @@ -1373,7 +1373,7 @@ true, and a formula contains only these operators and functions, it might be calculated using OpenCL./desc /info - value+;-;*;/;RAND;SIN;COS;TAN;ATAN;EXP;LN;SQRT;NORMSINV;ROUND;POWER;SUMPRODUCT;MIN;MAX;SUM;PRODUCT;AVERAGE;COUNT;VAR;NORMDIST;CORREL;COVAR;PEARSON;SLOPE;SUMIFS/value + value+;-;*;/;RAND;SIN;COS;TAN;ATAN;EXP;LN;SQRT;NORMSDIST;NORMSINV;ROUND;POWER;SUMPRODUCT;MIN;MAX;SUM;PRODUCT;AVERAGE;COUNT;VAR;NORMDIST;CORREL;COVAR;PEARSON;SLOPE;SUMIFS/value /prop prop oor:name=OpenCLAutoSelect oor:type=xs:boolean oor:nillable=false !-- UIHints: Tools - Options Spreadsheet Formula -- diff --git a/sc/source/core/tool/calcconfig.cxx b/sc/source/core/tool/calcconfig.cxx index 7a108f5..6fd4345 100644 --- a/sc/source/core/tool/calcconfig.cxx +++ b/sc/source/core/tool/calcconfig.cxx @@ -53,6 +53,7 @@ void ScCalcConfig::setOpenCLConfigToDefault() maOpenCLSubsetOpCodes.insert(ocExp); maOpenCLSubsetOpCodes.insert(ocLn); maOpenCLSubsetOpCodes.insert(ocSqrt); +maOpenCLSubsetOpCodes.insert(ocStdNormDist); maOpenCLSubsetOpCodes.insert(ocSNormInv); maOpenCLSubsetOpCodes.insert(ocRound); maOpenCLSubsetOpCodes.insert(ocPower); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: officecfg/registry sc/source
officecfg/registry/schema/org/openoffice/Office/Calc.xcs |2 +- sc/source/core/tool/calcconfig.cxx |4 2 files changed, 5 insertions(+), 1 deletion(-) New commits: commit cf726ae8514ce9ad8f8a88e2de06a67850543fef Author: Tor Lillqvist t...@collabora.com Date: Wed Feb 4 21:30:59 2015 +0200 Add Add, Sub, Mul and Div back to the default OpenCL opcode subset The code falls back to the traditional interpreter when necessary. This reverts commit ad582ce757f671a6271648e22a136f2d238cc15e. Change-Id: I4cbafba2c469c0814dcc5c5210db5ce495e6b641 diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs index 7ef9afb..5966b0b 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs @@ -1373,7 +1373,7 @@ true, and a formula contains only these operators and functions, it might be calculated using OpenCL./desc /info - valueRAND;SIN;COS;TAN;ATAN;EXP;LN;SQRT;NORMSINV;ROUND;POWER;SUMPRODUCT;MIN;MAX;SUM;PRODUCT;AVERAGE;COUNT;NORMDIST;SUMIFS/value + value+;-;*;/;RAND;SIN;COS;TAN;ATAN;EXP;LN;SQRT;NORMSINV;ROUND;POWER;SUMPRODUCT;MIN;MAX;SUM;PRODUCT;AVERAGE;COUNT;NORMDIST;SUMIFS/value /prop prop oor:name=OpenCLAutoSelect oor:type=xs:boolean oor:nillable=false !-- UIHints: Tools - Options Spreadsheet Formula -- diff --git a/sc/source/core/tool/calcconfig.cxx b/sc/source/core/tool/calcconfig.cxx index 4e9292a..0023910 100644 --- a/sc/source/core/tool/calcconfig.cxx +++ b/sc/source/core/tool/calcconfig.cxx @@ -41,6 +41,10 @@ void ScCalcConfig::setOpenCLConfigToDefault() // Keep in order of opcode value, is that clearest? (Random order, // at least, would make no sense at all.) +maOpenCLSubsetOpCodes.insert(ocAdd); +maOpenCLSubsetOpCodes.insert(ocSub); +maOpenCLSubsetOpCodes.insert(ocMul); +maOpenCLSubsetOpCodes.insert(ocDiv); maOpenCLSubsetOpCodes.insert(ocRandom); maOpenCLSubsetOpCodes.insert(ocSin); maOpenCLSubsetOpCodes.insert(ocCos); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: officecfg/registry sc/source
officecfg/registry/schema/org/openoffice/Office/Calc.xcs | 10 +- sc/source/core/tool/calcconfig.cxx | 56 ++- sc/source/core/tool/formulaopt.cxx |4 - 3 files changed, 15 insertions(+), 55 deletions(-) New commits: commit 34a6096dab1b2bb122318cc0027c11c5cbcbb516 Author: Tor Lillqvist t...@collabora.com Date: Fri Jan 23 12:47:52 2015 +0200 Use symbolic (not numeric) opcodes in the registry for the OpenCL use subset Makes it easier to edit them manually directly in the registry files. (Something end-users are of course not expected to do, but admins or hackers may want to do.) Also guards against the possibility of the numeric values of the opcodes being changed. I figured out how to do the mapping from symbolic names to enum values and back without an ScDocument, turned out it was not complicated after all. Change-Id: I8bd97f256f7d777162c1b629bf82285544e86d70 diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs index 4e20f9e..7ef9afb 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs @@ -1368,12 +1368,12 @@ prop oor:name=OpenCLSubsetOpCodes oor:type=xs:string oor:nillable=false !-- UIHints: Tools - Options Spreadsheet Formula -- info -descThe list of operator and function opcodes for which to use OpenCL. If a - formula contains only these operators and functions, it - might be calculated using OpenCL./desc - !-- numeric values correspond to RAND;SIN;COS;TAN;ATAN;EXP;LN;SQRT;NORMSINV;ROUND;POWER;SUMPRODUCT;MIN;MAX;SUM;PRODUCT;AVERAGE;COUNT;NORMDIST;SUMIFS -- +descThe list of operator and function opcodes (in +English) for which to use OpenCL. If OpenCLSubsetOnly is +true, and a formula contains only these operators and +functions, it might be calculated using OpenCL./desc /info - value66;82;83;84;88;102;103;104;149;204;209;213;222;223;224;225;226;227;236;403/value + valueRAND;SIN;COS;TAN;ATAN;EXP;LN;SQRT;NORMSINV;ROUND;POWER;SUMPRODUCT;MIN;MAX;SUM;PRODUCT;AVERAGE;COUNT;NORMDIST;SUMIFS/value /prop prop oor:name=OpenCLAutoSelect oor:type=xs:boolean oor:nillable=false !-- UIHints: Tools - Options Spreadsheet Formula -- diff --git a/sc/source/core/tool/calcconfig.cxx b/sc/source/core/tool/calcconfig.cxx index f380d13..4e9292a 100644 --- a/sc/source/core/tool/calcconfig.cxx +++ b/sc/source/core/tool/calcconfig.cxx @@ -110,46 +110,11 @@ std::ostream operator(std::ostream rStream, const ScCalcConfig rConfig) return rStream; } -namespace { - -formula::FormulaCompiler::OpCodeMapPtr setup() -{ -SfxObjectShell* pObjShell = SfxObjectShell::Current(); -ScDocShell* pScDocShell = PTR_CAST(ScDocShell, pObjShell); - -if (pScDocShell) -{ -ScDocument rDoc(pScDocShell-GetDocument()); -ScCompiler* pComp(new ScCompiler(rDoc, ScAddress())); -return pComp-GetOpCodeMap(css::sheet::FormulaLanguage::NATIVE); -} - -return nullptr; -} - -} // anonymous namespace - -OUString ScOpCodeSetToNumberString(const ScCalcConfig::OpCodeSet rOpCodes) -{ -OUStringBuffer result; - -for (auto i = rOpCodes.cbegin(); i != rOpCodes.cend(); ++i) -{ -if (i != rOpCodes.cbegin()) -result.append(';'); -result.append(static_castsal_Int32(*i)); -} - -return result.toString(); -} - OUString ScOpCodeSetToSymbolicString(const ScCalcConfig::OpCodeSet rOpCodes) { OUStringBuffer result; -formula::FormulaCompiler::OpCodeMapPtr pOpCodeMap(setup()); - -if (!pOpCodeMap) -return ScOpCodeSetToNumberString(rOpCodes); +formula::FormulaCompiler aCompiler; +formula::FormulaCompiler::OpCodeMapPtr pOpCodeMap(aCompiler.GetOpCodeMap(css::sheet::FormulaLanguage::ENGLISH)); for (auto i = rOpCodes.cbegin(); i != rOpCodes.cend(); ++i) { @@ -164,16 +129,15 @@ OUString ScOpCodeSetToSymbolicString(const ScCalcConfig::OpCodeSet rOpCodes) ScCalcConfig::OpCodeSet ScStringToOpCodeSet(const OUString rOpCodes) { ScCalcConfig::OpCodeSet result; -formula::FormulaCompiler::OpCodeMapPtr pOpCodeMap(setup()); +formula::FormulaCompiler aCompiler; +formula::FormulaCompiler::OpCodeMapPtr pOpCodeMap(aCompiler.GetOpCodeMap(css::sheet::FormulaLanguage::ENGLISH)); -OUString s(rOpCodes + ;); - -const formula::OpCodeHashMap *pHashMap(nullptr); -if (pOpCodeMap) -pHashMap = pOpCodeMap-getHashMap(); +const formula::OpCodeHashMap *pHashMap(pOpCodeMap-getHashMap()); sal_Int32 fromIndex(0); sal_Int32 semicolon; +OUString s(rOpCodes + ;); + while ((semicolon = s.indexOf(';', fromIndex)) = 0) { if (semicolon fromIndex) @@ -182,7
[Libreoffice-commits] core.git: officecfg/registry sc/source
officecfg/registry/schema/org/openoffice/Office/Calc.xcs |2 +- sc/source/core/tool/calcconfig.cxx |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit 13fca3c98df4722031902da3d443962bb9453542 Author: Tor Lillqvist t...@collabora.com Date: Wed Jan 7 13:52:50 2015 +0200 Let's try a higher limit Probably the overhead in copmpiling an OpenCL kernel is relatively high, so require a larger data size for OpenCL to be used. Change-Id: I34a3ade98dbd10e7daeddf4a55cfdb2a49a8cf09 diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs index 832c795..ecab65a 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs @@ -1363,7 +1363,7 @@ info descAn approximate lower limit on the number of data cells a spreadsheet formula should use for OpenCL to be considered./desc /info - value100/value + value1000/value /prop prop oor:name=OpenCLSubsetOpCodes oor:type=xs:string oor:nillable=false !-- UIHints: Tools - Options Spreadsheet Formula -- diff --git a/sc/source/core/tool/calcconfig.cxx b/sc/source/core/tool/calcconfig.cxx index 3e00b05..c158821 100644 --- a/sc/source/core/tool/calcconfig.cxx +++ b/sc/source/core/tool/calcconfig.cxx @@ -37,7 +37,7 @@ void ScCalcConfig::setOpenCLConfigToDefault() // Crazy. mbOpenCLSubsetOnly = true; mbOpenCLAutoSelect = true; -mnOpenCLMinimumFormulaGroupSize = 100; +mnOpenCLMinimumFormulaGroupSize = 1000; // Keep in order of opcode value, is that clearest? (Random order, // at least, would make no sense at all.) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: officecfg/registry sc/source
officecfg/registry/schema/org/openoffice/Office/Calc.xcs |2 +- sc/source/core/tool/calcconfig.cxx |1 - sc/source/ui/optdlg/calcoptionsdlg.cxx |4 3 files changed, 5 insertions(+), 2 deletions(-) New commits: commit 8f317cd32e3a0ae7b6dfd28cd3a3f5aa9f5da6ec Author: Tor Lillqvist t...@collabora.com Date: Wed Nov 19 12:10:10 2014 +0200 Don't use OpenCL for RAND by default The current implementation from 60ae598d537c14283109e1c6de22ec43a0147bcf is so broken it isn't even funny. Change-Id: I962d2643d21283340646893bb7892fb2a3d0c2e3 diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs index 425f9b8..abf01b0 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs @@ -1373,7 +1373,7 @@ might be calculated using OpenCL./desc !-- numeric values correspond to RAND;SIN;COS;TAN;ATAN;EXP;LN;SQRT;NORMSINV;ROUND;POWER;SUBPRODUCT;PROUDCT;NORMDIST;MIN;MAX;SUM;AVERAGE;SUMIFS -- /info - value66;82;83;84;88;102;103;104;149;204;209;213;222;223;224;225;226;236;403/value + value82;83;84;88;102;103;104;149;204;209;213;222;223;224;225;226;236;403/value /prop prop oor:name=OpenCLAutoSelect oor:type=xs:boolean oor:nillable=false !-- UIHints: Tools - Options Spreadsheet Formula -- diff --git a/sc/source/core/tool/calcconfig.cxx b/sc/source/core/tool/calcconfig.cxx index 0ba4cdf..ff81e98 100644 --- a/sc/source/core/tool/calcconfig.cxx +++ b/sc/source/core/tool/calcconfig.cxx @@ -40,7 +40,6 @@ void ScCalcConfig::setOpenCLConfigToDefault() mbOpenCLAutoSelect = true; mnOpenCLMinimumFormulaGroupSize = 100; -maOpenCLSubsetOpCodes.insert(ocRandom); maOpenCLSubsetOpCodes.insert(ocSin); maOpenCLSubsetOpCodes.insert(ocCos); maOpenCLSubsetOpCodes.insert(ocTan); diff --git a/sc/source/ui/optdlg/calcoptionsdlg.cxx b/sc/source/ui/optdlg/calcoptionsdlg.cxx index 3a4764e..92af35a 100644 --- a/sc/source/ui/optdlg/calcoptionsdlg.cxx +++ b/sc/source/ui/optdlg/calcoptionsdlg.cxx @@ -993,7 +993,11 @@ IMPL_LINK( ScCalcOptionsDialog, TestClickHdl, PushButton*, ) for (int i = 0; i N; ++i) { +#if 0 // While our RAND OpenCL implementation is broken... pDoc-SetString(ScAddress(0,i,1), =RAND()); +#else +pDoc-SetValue(ScAddress(0,i,1), (i%13)/13.); +#endif pDoc-SetValue(ScAddress(1,i,1), comphelper::rng::uniform_real_distribution(0, 1000)); pDoc-SetString(ScAddress(10,i,1), OUString(=IF(AND(A) + OUString::number(i+1) + = 0,A + OUString::number(i+1) + = 1),0,1)); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: officecfg/registry sc/source sw/source
officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu | 2 +- officecfg/registry/data/org/openoffice/Office/UI/WriterFormWindowState.xcu | 2 +- officecfg/registry/data/org/openoffice/Office/UI/WriterGlobalWindowState.xcu | 2 +- officecfg/registry/data/org/openoffice/Office/UI/WriterReportWindowState.xcu | 2 +- officecfg/registry/data/org/openoffice/Office/UI/WriterWebWindowState.xcu| 2 +- officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu | 2 +- officecfg/registry/data/org/openoffice/Office/UI/XFormsWindowState.xcu | 2 +- sc/source/ui/src/popup.src | 2 +- sw/source/uibase/uiview/view.src | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) New commits: commit 36b6db7676ba73f87c2c707826aec2500a59bfe7 Author: Yousuf Philips philip...@hotmail.com Date: Sun Nov 16 23:30:13 2014 +0400 fdo#86289 rename 'Page Preview' to 'Print Preview' in toolbar names and popups Change-Id: Ifb4254a044b1aa15b1c3e09d7f662daaf6eb61d7 Reviewed-on: https://gerrit.libreoffice.org/12502 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu index 0742238..7997881 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu @@ -102,7 +102,7 @@ valuetrue/value /prop prop oor:name=UIName oor:type=xs:string - value xml:lang=en-USPage Preview/value + value xml:lang=en-USPrint Preview/value /prop prop oor:name=HideFromToolbarMenu oor:type=xs:boolean valuetrue/value diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterFormWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterFormWindowState.xcu index 7d02379..45333b8 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/WriterFormWindowState.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterFormWindowState.xcu @@ -467,7 +467,7 @@ valuetrue/value /prop prop oor:name=UIName oor:type=xs:string - value xml:lang=en-USPage Preview/value + value xml:lang=en-USPrint Preview/value /prop prop oor:name=HideFromToolbarMenu oor:type=xs:boolean valuetrue/value diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterGlobalWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterGlobalWindowState.xcu index d2dc9f9..05d1659 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/WriterGlobalWindowState.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterGlobalWindowState.xcu @@ -461,7 +461,7 @@ valuetrue/value /prop prop oor:name=UIName oor:type=xs:string - value xml:lang=en-USPage Preview/value + value xml:lang=en-USPrint Preview/value /prop prop oor:name=HideFromToolbarMenu oor:type=xs:boolean valuetrue/value diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterReportWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterReportWindowState.xcu index 2573d77..6fe2b60 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/WriterReportWindowState.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterReportWindowState.xcu @@ -464,7 +464,7 @@ valuetrue/value /prop prop oor:name=UIName oor:type=xs:string - value xml:lang=en-USPage Preview/value + value xml:lang=en-USPrint Preview/value /prop prop oor:name=HideFromToolbarMenu oor:type=xs:boolean valuetrue/value diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterWebWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterWebWindowState.xcu index 7e8eda4..e6da9a4 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/WriterWebWindowState.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterWebWindowState.xcu @@ -467,7 +467,7 @@ valuetrue/value /prop prop oor:name=UIName oor:type=xs:string - value xml:lang=en-USPage Preview/value + value xml:lang=en-USPrint Preview/value /prop prop oor:name=HideFromToolbarMenu oor:type=xs:boolean valuefalse/value diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu index 513ec9a..56ea073 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu +++
[Libreoffice-commits] core.git: officecfg/registry sc/source
officecfg/registry/schema/org/openoffice/Office/Calc.xcs |2 +- sc/source/core/tool/calcconfig.cxx |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit a81a24b6a33fca9a750077d9160ebb8316b2fb26 Author: Tor Lillqvist t...@collabora.com Date: Tue Nov 18 14:49:50 2014 +0200 Bump the minimum group size for OpenCL to 100 Change-Id: Id877823d760236bb731900711e3260a29c5c6871 diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs index b31a2e1..425f9b8 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs @@ -1363,7 +1363,7 @@ info descAn approximate lower limit on the number of data cells a spreadsheet formula should use for OpenCL to be considered./desc /info - value20/value + value100/value /prop prop oor:name=OpenCLSubsetOpCodes oor:type=xs:string oor:nillable=false !-- UIHints: Tools - Options Spreadsheet Formula -- diff --git a/sc/source/core/tool/calcconfig.cxx b/sc/source/core/tool/calcconfig.cxx index a8527ad..0ba4cdf 100644 --- a/sc/source/core/tool/calcconfig.cxx +++ b/sc/source/core/tool/calcconfig.cxx @@ -38,7 +38,7 @@ void ScCalcConfig::setOpenCLConfigToDefault() mbOpenCLEnabled = true; mbOpenCLSubsetOnly = true; mbOpenCLAutoSelect = true; -mnOpenCLMinimumFormulaGroupSize = 20; +mnOpenCLMinimumFormulaGroupSize = 100; maOpenCLSubsetOpCodes.insert(ocRandom); maOpenCLSubsetOpCodes.insert(ocSin); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: officecfg/registry sc/source
officecfg/registry/schema/org/openoffice/Office/Calc.xcs |2 +- sc/source/core/tool/calcconfig.cxx |9 + 2 files changed, 10 insertions(+), 1 deletion(-) New commits: commit e6a441ccc19aacdde335c2282047631e0baf40cd Author: Tor Lillqvist t...@collabora.com Date: Mon Nov 17 10:38:14 2014 +0200 Insert some fairly generic fallback whitelist entries for now Change-Id: I1887a32aeef8097e3e8297d6bddc51179dd65127 diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs index 6f2dc7c..d4e65eb 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs @@ -1401,7 +1401,7 @@ info descLike OpenCLWhiteList, but for combinations known to be good./desc /info - value oor:separator=;Linux/*/Advanced Micro Devices, Inc./*/1445.5 (sse2,avx)//value + value oor:separator=;Linux/*/Advanced Micro Devices, Inc./*/1445.5 (sse2,avx)/;*/*/Advanced Micro Devices, Inc./*/*/;*/*/Intel(R) Corporation/*/*/;*/*/NVIDIA Corporation/*/*//value /prop /group group oor:name=Syntax diff --git a/sc/source/core/tool/calcconfig.cxx b/sc/source/core/tool/calcconfig.cxx index 0ff048b..c93d482 100644 --- a/sc/source/core/tool/calcconfig.cxx +++ b/sc/source/core/tool/calcconfig.cxx @@ -45,9 +45,18 @@ void ScCalcConfig::setOpenCLConfigToDefault() maOpenCLSubsetOpCodes.insert(ocAverage); maOpenCLSubsetOpCodes.insert(ocSumIfs); +// This entry we have had for some time (when blacklisting was +// done elsewhere in the code), so presumably there is a known +// good reason for it. maOpenCLBlackList.insert(OpenCLImplMatcher(Windows, *, Intel(R) Corporation, *, 9.17.10.2884, )); +// This is what I have tested on Linux and it works for our unit tests. maOpenCLWhiteList.insert(OpenCLImplMatcher(Linux, *, Advanced Micro Devices, Inc., *, 1445.5 (sse2,avx), )); + +// For now, assume that AMD, Intel and NVIDIA drivers are good +maOpenCLWhiteList.insert(OpenCLImplMatcher(*, *, Advanced Micro Devices, Inc., *, *, )); +maOpenCLWhiteList.insert(OpenCLImplMatcher(*, *, Intel(R) Corporation, *, *, )); +maOpenCLWhiteList.insert(OpenCLImplMatcher(*, *, NVIDIA Corporation, *, *, )); } void ScCalcConfig::reset() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: officecfg/registry sc/source
officecfg/registry/schema/org/openoffice/Office/Calc.xcs |3 +-- sc/source/core/tool/calcconfig.cxx | 15 +++ 2 files changed, 16 insertions(+), 2 deletions(-) New commits: commit ab2e6c659ed79c911f1d995567d5162b3b807874 Author: Tor Lillqvist t...@collabora.com Date: Mon Nov 17 17:11:43 2014 +0200 Add a bunch of allegedly common opcodes to the default subset for OpenCL RAND, SIN, COS, TAN, ATAN, EXP, LN, SQRT, NORMSINV, ROUND, POWER, SUMPRODUCT, PRODUCT and NORMDIST. Change-Id: I9619a9a3b022fe00e53bf82735e160a2d449f105 diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs index d4e65eb..31395a9 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs @@ -1372,8 +1372,7 @@ formula contains only these operators and functions, it might be calculated using OpenCL./desc /info - !-- numeric values correspond to MIN;MAX;SUM;AVERAGE;SUMIFS -- - value222;223;224;226;403/value + value66;82;83;84;88;102;103;104;149;204;209;213;222;223;224;225;226;236;403/value /prop prop oor:name=OpenCLAutoSelect oor:type=xs:boolean oor:nillable=false !-- UIHints: Tools - Options Spreadsheet Formula -- diff --git a/sc/source/core/tool/calcconfig.cxx b/sc/source/core/tool/calcconfig.cxx index c93d482..a8527ad 100644 --- a/sc/source/core/tool/calcconfig.cxx +++ b/sc/source/core/tool/calcconfig.cxx @@ -39,10 +39,25 @@ void ScCalcConfig::setOpenCLConfigToDefault() mbOpenCLSubsetOnly = true; mbOpenCLAutoSelect = true; mnOpenCLMinimumFormulaGroupSize = 20; + +maOpenCLSubsetOpCodes.insert(ocRandom); +maOpenCLSubsetOpCodes.insert(ocSin); +maOpenCLSubsetOpCodes.insert(ocCos); +maOpenCLSubsetOpCodes.insert(ocTan); +maOpenCLSubsetOpCodes.insert(ocArcTan); +maOpenCLSubsetOpCodes.insert(ocExp); +maOpenCLSubsetOpCodes.insert(ocLn); +maOpenCLSubsetOpCodes.insert(ocSqrt); +maOpenCLSubsetOpCodes.insert(ocSNormInv); +maOpenCLSubsetOpCodes.insert(ocRound); +maOpenCLSubsetOpCodes.insert(ocPower); +maOpenCLSubsetOpCodes.insert(ocSumProduct); maOpenCLSubsetOpCodes.insert(ocMin); maOpenCLSubsetOpCodes.insert(ocMax); maOpenCLSubsetOpCodes.insert(ocSum); +maOpenCLSubsetOpCodes.insert(ocProduct); maOpenCLSubsetOpCodes.insert(ocAverage); +maOpenCLSubsetOpCodes.insert(ocNormDist); maOpenCLSubsetOpCodes.insert(ocSumIfs); // This entry we have had for some time (when blacklisting was ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: officecfg/registry sc/source
officecfg/registry/schema/org/openoffice/Office/Calc.xcs | 12 sc/source/ui/docshell/datastream.cxx | 15 +-- 2 files changed, 17 insertions(+), 10 deletions(-) New commits: commit fcf953b8ec8ef9652f12a2cc91e9edc6153c1bb1 Author: xukai xu...@multicorewareinc.com Date: Tue Sep 23 21:55:13 2014 -0400 make streamtimeout a config variable instead of an env. var. Change-Id: I6c82142265a0a149206d15fbc267ad61e6b9cf3b diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs index 85fb9f9..cb16b9b 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs @@ -1807,5 +1807,17 @@ /prop /group /group +group oor:name=DataStream +info + descdata stream/desc +/info +prop oor:name=UpdateTimeout oor:type=xs:int oor:nillable=false + !-- UIHints: Tools - Options - Spreadsheet - Defaults -- + info +descset the Timeout of DataStream updating /desc + /info + value2000/value +/prop +/group /component /oor:component-schema diff --git a/sc/source/ui/docshell/datastream.cxx b/sc/source/ui/docshell/datastream.cxx index 449a992..92f9519 100644 --- a/sc/source/ui/docshell/datastream.cxx +++ b/sc/source/ui/docshell/datastream.cxx @@ -27,6 +27,8 @@ #include documentlinkmgr.hxx #include config_orcus.h +#include officecfg/Office/Calc.hxx + #if ENABLE_ORCUS #if defined WNT @@ -501,18 +503,11 @@ void DataStream::MoveData() default: ; } - if(mbIsFirst mbIsUpdate) { - int nImportTimeout = 0; - static char * cenv = getenv( streamtimeout ); - if(cenv) - { - double nEnv = atof(cenv); - nImportTimeout = 1000 * nEnv; - } - maImportTimer.SetTimeout(nImportTimeout); - mbIsFirst = false; +sal_Int32 nStreamTimeout = officecfg::Office::Calc::DataStream::UpdateTimeout::get(); +maImportTimer.SetTimeout(nStreamTimeout); +mbIsFirst = false; } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: officecfg/registry sc/source
officecfg/registry/data/org/openoffice/Office/Calc.xcu | 11 +++ sc/source/core/tool/interpr2.cxx |3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) New commits: commit 21c8b5815a21b6586fe13b12d00a9fb432c2aef4 Author: Aurimas Fišeras auri...@members.fsf.org Date: Sat Aug 23 11:50:56 2014 +0300 added Lithuanian LTL to EUROCONVERT(), CONVERT() Change-Id: Iefde129177df827c4b6508ff190f20e1e1973221 Reviewed-on: https://gerrit.libreoffice.org/11088 Reviewed-by: Thomas Arnhold tho...@arnhold.org Tested-by: Thomas Arnhold tho...@arnhold.org diff --git a/officecfg/registry/data/org/openoffice/Office/Calc.xcu b/officecfg/registry/data/org/openoffice/Office/Calc.xcu index 190766e..a62d065 100644 --- a/officecfg/registry/data/org/openoffice/Office/Calc.xcu +++ b/officecfg/registry/data/org/openoffice/Office/Calc.xcu @@ -217,6 +217,17 @@ value0.702804/value /prop /node +node oor:name=CR19 oor:op=replace + prop oor:name=FromUnit +valueEUR/value + /prop + prop oor:name=ToUnit +valueLTL/value + /prop + prop oor:name=Factor +value3.45280/value + /prop +/node /node node oor:name=Calculate node oor:name=Other diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx index e695d57..ac6d71e 100644 --- a/sc/source/core/tool/interpr2.cxx +++ b/sc/source/core/tool/interpr2.cxx @@ -2795,7 +2795,8 @@ static bool lclConvertMoney( const OUString aSearchUnit, double rfRate, int r { CYP, 0.585274, 2 }, { SKK, 30.1260, 2 }, { EEK, 15.6466, 2 }, -{ LVL, 0.702804, 2 } +{ LVL, 0.702804, 2 }, +{ LTL, 3.45280, 2 } }; static const size_t nConversionCount = sizeof( aConvertTable ) / sizeof( aConvertTable[0] ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: officecfg/registry sc/source
officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu |4 +-- sc/source/ui/view/tabvwsh3.cxx|4 ++- sc/source/ui/view/tabvwsha.cxx| 13 +- 3 files changed, 7 insertions(+), 14 deletions(-) New commits: commit f2d009a675755136e2e06b2866bc055b06cea6c8 Author: Kohei Yoshida kohei.yosh...@collabora.com Date: Fri Mar 21 11:28:59 2014 -0400 Make it harder to accidentally set print range to '- none -'. And make the current print range behavior a bit more intuitive. People often remove ranges to quickly clear any custom ranges if set. They wouldn't expect this to actually set the print range to none. Also, change the wording of the menu item from Remove to Clear, to refect this behavior change. Change-Id: I0369020fedf1c7463d718809875022adef697bf4 diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu index cdfd826..249b0ba 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu @@ -550,10 +550,10 @@ /node node oor:name=.uno:DeletePrintArea oor:op=replace prop oor:name=Label oor:type=xs:string - value xml:lang=en-US~Remove Print Area/value + value xml:lang=en-US~Clear Print Area/value /prop prop oor:name=ContextLabel oor:type=xs:string - value xml:lang=en-US~Remove/value + value xml:lang=en-US~Clear/value /prop prop oor:name=Properties oor:type=xs:int value1/value diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx index c74de5a..d8d4827 100644 --- a/sc/source/ui/view/tabvwsh3.cxx +++ b/sc/source/ui/view/tabvwsh3.cxx @@ -190,8 +190,10 @@ void ScTabViewShell::Execute( SfxRequest rReq ) case SID_DELETE_PRINTAREA: { +// Clear currently defined print range if any, and reset it to +// print entire sheet which is the default. OUString aEmpty; -SetPrintRanges( false, aEmpty, NULL, NULL, false );// Druckbereich loeschen +SetPrintRanges(true, aEmpty, NULL, NULL, false); rReq.Done(); } break; diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx index af5cd66..5e8ae2a 100644 --- a/sc/source/ui/view/tabvwsha.cxx +++ b/sc/source/ui/view/tabvwsha.cxx @@ -191,21 +191,12 @@ void ScTabViewShell::GetState( SfxItemSet rSet ) break; case SID_DELETE_PRINTAREA: -if ( nTabSelCount 1 ) -{ -// #i22589# also take Print Entire Sheet into account here -bool bHas = false; -for (SCTAB i=0; !bHas inTabCount; i++) -bHas = rMark.GetTableSelect(i) (pDoc-GetPrintRangeCount(i) || pDoc-IsPrintEntireSheet(i)); -if (!bHas) -rSet.DisableItem( nWhich ); -} -else if ( !pDoc-GetPrintRangeCount( nTab ) !pDoc-IsPrintEntireSheet( nTab ) ) -rSet.DisableItem( nWhich ); if ( pDocShell pDocShell-IsDocShared() ) { rSet.DisableItem( nWhich ); } +else if (pDoc-IsPrintEntireSheet(nTab)) +rSet.DisableItem(nWhich); break; case SID_STATUS_PAGESTYLE: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: officecfg/registry sc/source
officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu |4 - sc/source/ui/miscdlgs/datastreams.cxx| 27 +- 2 files changed, 28 insertions(+), 3 deletions(-) New commits: commit 9c45345a680f7444df251f9403c7d56572380f21 Author: Matúš Kukan matus.ku...@collabora.com Date: Mon Nov 18 13:31:39 2013 +0100 datastreams: make toolbar docked, hidden and show it when starting streaming Change-Id: Icbf1abffc5424e213550c7cf27cdaa59126fa54d diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu index 8ef44d3..f5e294b 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu @@ -56,13 +56,13 @@ /node node oor:name=private:resource/toolbar/datastreams oor:op=replace prop oor:name=Docked oor:type=xs:boolean - valuefalse/value + valuetrue/value /prop prop oor:name=UIName oor:type=xs:string value xml:lang=en-USData Streams/value /prop prop oor:name=Visible oor:type=xs:boolean - valuetrue/value + valuefalse/value /prop /node node oor:name=private:resource/toolbar/drawobjectbar oor:op=replace diff --git a/sc/source/ui/miscdlgs/datastreams.cxx b/sc/source/ui/miscdlgs/datastreams.cxx index 1639dbc..dd5a821 100644 --- a/sc/source/ui/miscdlgs/datastreams.cxx +++ b/sc/source/ui/miscdlgs/datastreams.cxx @@ -9,14 +9,18 @@ #include datastreams.hxx +#include com/sun/star/frame/XLayoutManager.hpp +#include com/sun/star/ui/XUIElement.hpp #include osl/conditn.hxx #include rtl/strbuf.hxx #include salhelper/thread.hxx +#include sfx2/viewfrm.hxx #include asciiopt.hxx +#include dbfunc.hxx #include docsh.hxx #include impex.hxx +#include tabvwsh.hxx #include viewdata.hxx -#include dbfunc.hxx namespace datastreams { @@ -80,6 +84,27 @@ void DataStreams::Start() mpScDocument-EnableUndo(false); mbRunning = true; mxThread-maStart.set(); +css::uno::Reference css::frame::XFrame xFrame = + mpScDocShell-GetViewData()-GetViewShell()-GetViewFrame()-GetFrame().GetFrameInterface(); +if (!xFrame.is()) +return; + +css::uno::Reference css::beans::XPropertySet xPropSet(xFrame, css::uno::UNO_QUERY); +if (!xPropSet.is()) +return; + +css::uno::Reference css::frame::XLayoutManager xLayoutManager; +xPropSet-getPropertyValue(LayoutManager) = xLayoutManager; +if (!xLayoutManager.is()) +return; + +const OUString sResourceURL( private:resource/toolbar/datastreams ); +css::uno::Reference css::ui::XUIElement xUIElement = xLayoutManager-getElement(sResourceURL); +if (!xUIElement.is()) +{ +xLayoutManager-createElement( sResourceURL ); +xLayoutManager-showElement( sResourceURL ); +} } void DataStreams::Stop() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits