[Libreoffice-commits] core.git: sc/sdi sc/source

2023-10-28 Thread Szymon Kłos (via logerrit)
 sc/sdi/scalc.sdi  |4 -
 sc/source/ui/view/cellsh1.cxx |  155 ++
 2 files changed, 143 insertions(+), 16 deletions(-)

New commits:
commit 50abd90d739410ed34de5e7cd9c4308dc75f9ab6
Author: Szymon Kłos 
AuthorDate: Wed Oct 25 18:23:06 2023 +0200
Commit: Szymon Kłos 
CommitDate: Sat Oct 28 21:31:16 2023 +0200

Introduce easy to apply cond format styles

UNO commands for Data bars and Color scale conditional
formatting now can be called with parameter to apply
few predefined themes.

In the future it could be moved somewhere so it could
be configured from the UI maybe...

Change-Id: I080709709fcc0886dcaf6050a6c1ae621b6728c9
(cherry picked from commit c8d4a99082269c7008df5765232a93d19e7a3d84)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158539
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 

diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index 4da6e21b162e..614293cc90bb 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -787,7 +787,7 @@ SfxVoidItem CurrentConditionalFormatDialog 
SID_OPENDLG_CURRENTCONDFRMT
 
 
 SfxVoidItem ColorScaleFormatDialog SID_OPENDLG_COLORSCALE
-()
+(SfxInt16Item IconSet FN_PARAM_1)
 [
 AutoUpdate = FALSE,
 FastCall = FALSE,
@@ -805,7 +805,7 @@ SfxVoidItem ColorScaleFormatDialog SID_OPENDLG_COLORSCALE
 
 
 SfxVoidItem DataBarFormatDialog SID_OPENDLG_DATABAR
-()
+(SfxInt16Item IconSet FN_PARAM_1)
 [
 AutoUpdate = FALSE,
 FastCall = FALSE,
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index b35796ff0c2e..1b307963dc01 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -2186,27 +2186,154 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
 
 // do we have a parameter with the conditional formatting type?
 const SfxInt16Item* pParam = 
rReq.GetArg(FN_PARAM_1);
-if (pParam && nSlot == SID_OPENDLG_ICONSET)
+if (pParam)
 {
 auto pFormat = std::make_unique(0, 
);
 pFormat->SetRange(aRangeList);
 
-ScIconSetType eIconSetType = 
limit_cast(pParam->GetValue(), IconSet_3Arrows, IconSet_5Boxes);
-const int nSteps = 
ScIconSetFormat::getIconSetElements(eIconSetType);
+if (nSlot == SID_OPENDLG_ICONSET)
+{
+ScIconSetType eIconSetType = 
limit_cast(pParam->GetValue(), IconSet_3Arrows, IconSet_5Boxes);
+const int nSteps = 
ScIconSetFormat::getIconSetElements(eIconSetType);
+
+ScIconSetFormat* pEntry = new ScIconSetFormat();
+ScIconSetFormatData* pIconSetFormatData = new 
ScIconSetFormatData(eIconSetType);
+
+pIconSetFormatData->m_Entries.emplace_back(new 
ScColorScaleEntry(0, COL_RED, COLORSCALE_PERCENT));
+pIconSetFormatData->m_Entries.emplace_back(new 
ScColorScaleEntry(round(100. / nSteps), COL_BROWN, COLORSCALE_PERCENT));
+pIconSetFormatData->m_Entries.emplace_back(new 
ScColorScaleEntry(round(200. / nSteps), COL_YELLOW, COLORSCALE_PERCENT));
+if (nSteps > 3)
+pIconSetFormatData->m_Entries.emplace_back(new 
ScColorScaleEntry(round(300. / nSteps), COL_WHITE, COLORSCALE_PERCENT));
+if (nSteps > 4)
+pIconSetFormatData->m_Entries.emplace_back(new 
ScColorScaleEntry(round(400. / nSteps), COL_GREEN, COLORSCALE_PERCENT));
+
+pEntry->SetIconSetData(pIconSetFormatData);
+pFormat->AddEntry(pEntry);
+}
+else if (nSlot == SID_OPENDLG_COLORSCALE)
+{
+typedef std::tuple ScaleEntry;
+static std::vector> 
aScaleThemes =
+{
+{
+{ 0, Color(0xF8696B), COLORSCALE_MIN },
+{ 0, Color(0x63BE7B), COLORSCALE_MAX },
+{ 50, Color(0xFFEB84), 
COLORSCALE_PERCENTILE }
+},
+{
+{ 0, Color(0x63BE7B), COLORSCALE_MIN },
+{ 0, Color(0xF8696B), COLORSCALE_MAX },
+{ 50, Color(0xFFEB84), 
COLORSCALE_PERCENTILE }
+},
+{
+{ 0, Color(0xF8696B), COLORSCALE_MIN },
+{ 0, Color(0x63BE7B), COLORSCALE_MAX },
+{ 50, Color(0xFCFCFF), 
COLORSCALE_PERCENTILE }
+},
+

[Libreoffice-commits] core.git: sc/sdi sc/source sfx2/source

2023-06-12 Thread Henry Castro (via logerrit)
 sc/sdi/scalc.sdi |4 ++--
 sc/source/ui/view/tabvwsha.cxx   |7 +--
 sfx2/source/control/unoctitm.cxx |8 
 3 files changed, 11 insertions(+), 8 deletions(-)

New commits:
commit 44362e588686e33ff60ddcb6c1cd0c6082073fb0
Author: Henry Castro 
AuthorDate: Wed May 3 16:59:37 2023 -0400
Commit: Henry Castro 
CommitDate: Mon Jun 12 22:58:18 2023 +0200

sc: fix freeze row/column panes

The UNO command  state has changed to Point (row, tab)
and Point (col, tab), Otherwise, if the row or column
has the same value for all sheets, the state cache will
not report any changes to the client side.

Signed-off-by: Henry Castro 
Change-Id: I2080f5e664825d81c4fa4dbb2c5d782f188dae64
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151344
Tested-by: Andras Timar 
Reviewed-by: Andras Timar 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151975
Tested-by: Jenkins CollaboraOffice 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152908
Tested-by: Jenkins

diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index 9da8595a56d5..cfd0f43f580b 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -1947,7 +1947,7 @@ SfxVoidItem FreezePanes SID_WINDOW_FIX
 GroupId = SfxGroupId::View;
 ]
 
-SfxInt32Item FreezePanesColumn SID_WINDOW_FIX_COL
+SfxPointItem FreezePanesColumn SID_WINDOW_FIX_COL
 
 [
 AutoUpdate = FALSE,
@@ -1964,7 +1964,7 @@ SfxInt32Item FreezePanesColumn SID_WINDOW_FIX_COL
 GroupId = SfxGroupId::View;
 ]
 
-SfxInt32Item FreezePanesRow SID_WINDOW_FIX_ROW
+SfxPointItem FreezePanesRow SID_WINDOW_FIX_ROW
 
 [
 AutoUpdate = FALSE,
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index f1305672a096..231630a4e5d3 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -35,6 +35,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -472,9 +473,11 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
 case SID_WINDOW_FIX_COL:
 case SID_WINDOW_FIX_ROW:
 {
+Point aPos;
 bool bIsCol = (nWhich == SID_WINDOW_FIX_COL);
-sal_Int32 nFreezeIndex = 
rViewData.GetLOKSheetFreezeIndex(bIsCol);
-rSet.Put(SfxInt32Item(TypedWhichId(nWhich), 
nFreezeIndex));
+aPos.setX(rViewData.GetLOKSheetFreezeIndex(bIsCol));
+aPos.setY(rViewData.GetTabNo());
+rSet.Put(SfxPointItem(nWhich, aPos));
 }
 break;
 
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index bfc155599a17..1b0d1223a3b7 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -1115,9 +1115,7 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, 
SfxViewFrame* pViewFra
  aEvent.FeatureURL.Path == "StatusSelectionMode" ||
  aEvent.FeatureURL.Path == "Signature" ||
  aEvent.FeatureURL.Path == "SelectionMode" ||
- aEvent.FeatureURL.Path == "StatusBarFunc" ||
- aEvent.FeatureURL.Path == "FreezePanesColumn" ||
- aEvent.FeatureURL.Path == "FreezePanesRow")
+ aEvent.FeatureURL.Path == "StatusBarFunc")
 {
 sal_Int32 aInt32;
 
@@ -1201,7 +1199,9 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, 
SfxViewFrame* pViewFra
 aBuffer.append("disabled");
 }
 }
-else if (aEvent.FeatureURL.Path == "Position")
+else if (aEvent.FeatureURL.Path == "Position" ||
+ aEvent.FeatureURL.Path == "FreezePanesColumn" ||
+ aEvent.FeatureURL.Path == "FreezePanesRow")
 {
 css::awt::Point aPoint;
 


[Libreoffice-commits] core.git: sc/sdi sc/source

2023-05-22 Thread Maxim Monastirsky (via logerrit)
 sc/sdi/drawsh.sdi |1 +
 sc/sdi/drtxtob.sdi|1 +
 sc/source/ui/drawfunc/drawsh.cxx  |   10 --
 sc/source/ui/drawfunc/drtxtob.cxx |   13 -
 4 files changed, 22 insertions(+), 3 deletions(-)

New commits:
commit 0a74b5fcfbfa68ad1cab228d74f08e8c35bc6820
Author: Maxim Monastirsky 
AuthorDate: Fri Apr 28 11:48:25 2023 +0300
Commit: Maxim Monastirsky 
CommitDate: Tue May 23 00:43:06 2023 +0200

sc drawstyles: Enable the clear DF command

.uno:StandardTextAttributes works for shape formatting already
(despite its name), but it's a different command than Format >
Clear DF. So let's connect the regular Clear DF command to the
same code.

Also includes a workaround for comments to maintain their size.
Changing the size (because of the "Fit height to text" setting)
is probably confusing for other shapes as well, but for comments
this requires an extra step to undo, as comments can't be resized
unless they're shown permanently. And manually resizing each
comment back will also result with inconsistency in their size.

Change-Id: I7c158523ecc4be18d17479632eaf9fd2a51dca12
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151161
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky 

diff --git a/sc/sdi/drawsh.sdi b/sc/sdi/drawsh.sdi
index 13f1d6b150df..668608c549ab 100644
--- a/sc/sdi/drawsh.sdi
+++ b/sc/sdi/drawsh.sdi
@@ -37,6 +37,7 @@ interface TableDraw
 SID_DRAW_CHART  [ StateMethod = StateDisableItems; ]
 
 SID_TEXT_STANDARD   [ ExecMethod = ExecDrawAttr; StateMethod = 
NoState; ]
+SID_CELL_FORMAT_RESET   [ ExecMethod = ExecDrawAttr; StateMethod = 
NoState; ]
 SID_DRAWTEXT_ATTR_DLG   [ ExecMethod = ExecDrawAttr; StateMethod = 
NoState; ]
 
 //  Slot-IDs for Objectbar:
diff --git a/sc/sdi/drtxtob.sdi b/sc/sdi/drtxtob.sdi
index 4670d216fba2..a4df9af69108 100644
--- a/sc/sdi/drtxtob.sdi
+++ b/sc/sdi/drtxtob.sdi
@@ -47,6 +47,7 @@ interface TableDrawText
 SID_THESAURUS   [ ExecMethod = Execute; StateMethod = GetState; ]
 // attribute:
 SID_TEXT_STANDARD   [ ExecMethod = ExecuteAttr; StateMethod = 
GetState; ]
+SID_CELL_FORMAT_RESET   [ ExecMethod = ExecuteAttr; StateMethod = 
GetState; ]
 SID_DRAWTEXT_ATTR_DLG   [ ExecMethod = ExecuteAttr; StateMethod = 
GetState; ]
 SID_ATTR_CHAR_FONT  [ ExecMethod = ExecuteAttr; StateMethod = 
GetAttrState; ]
 SID_ATTR_CHAR_FONTHEIGHT[ ExecMethod = ExecuteAttr; StateMethod = 
GetAttrState; ]
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 291ec3e236bc..52ec9d9d438a 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -161,9 +161,15 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
 }
 break;
 
-case SID_TEXT_STANDARD: // delete hard text attributes
+case SID_CELL_FORMAT_RESET:
+case SID_TEXT_STANDARD:
 {
-SfxItemSetFixed 
aEmptyAttr(GetPool());
+SfxItemSetFixed aEmptyAttr(GetPool());
+
+if (ScDrawLayer::IsNoteCaption(pSingleSelectedObj))
+aEmptyAttr.Put(pView->GetAttrFromMarked(true));
+
 pView->SetAttributes(aEmptyAttr, true);
 }
 break;
diff --git a/sc/source/ui/drawfunc/drtxtob.cxx 
b/sc/source/ui/drawfunc/drtxtob.cxx
index f428465936b3..79f2bd1a588c 100644
--- a/sc/source/ui/drawfunc/drtxtob.cxx
+++ b/sc/source/ui/drawfunc/drtxtob.cxx
@@ -791,7 +791,8 @@ void ScDrawTextObjectBar::ExecuteAttr( SfxRequest  )
 {
 switch ( nSlot )
 {
-case SID_TEXT_STANDARD: // delete hard text attributes
+case SID_CELL_FORMAT_RESET:
+case SID_TEXT_STANDARD:
 {
 OutlinerView* pOutView = pView->IsTextEdit() ?
 pView->GetTextEditOutlinerView() : nullptr;
@@ -799,8 +800,18 @@ void ScDrawTextObjectBar::ExecuteAttr( SfxRequest  )
 pOutView->Paint( tools::Rectangle() );
 
 SfxItemSetFixed aEmptyAttr( 
*aEditAttr.GetPool() );
+SfxItemSetFixed aSizeAttr(*aEditAttr.GetPool());
+
+aSizeAttr.Put(pView->GetAttrFromMarked(true));
 pView->SetAttributes( aEmptyAttr, true );
 
+if (IsNoteEdit())
+{
+pView->SetAttributes(aSizeAttr, false);
+
pView->GetTextEditObject()->AdjustTextFrameWidthAndHeight();
+}
+
 if ( pOutView )
 {
 lcl_RemoveFields( *pOutView );


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

2023-05-11 Thread Tomaž Vajngerl (via logerrit)
 sc/sdi/tabvwsh.sdi|1 +
 sc/source/ui/view/tabvwsh3.cxx|   34 +-
 sc/uiconfig/scalc/menubar/menubar.xml |1 +
 3 files changed, 35 insertions(+), 1 deletion(-)

New commits:
commit 7f46e701f25e8eef1572e94d092170e0d793dc87
Author: Tomaž Vajngerl 
AuthorDate: Fri May 5 23:10:14 2023 +0900
Commit: Tomaž Vajngerl 
CommitDate: Thu May 11 18:09:14 2023 +0200

sc: add ThemeDialog to the main menu

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

diff --git a/sc/sdi/tabvwsh.sdi b/sc/sdi/tabvwsh.sdi
index b10d42bdb7f3..e1da8b2f5d14 100644
--- a/sc/sdi/tabvwsh.sdi
+++ b/sc/sdi/tabvwsh.sdi
@@ -184,6 +184,7 @@ interface TableEditView
 SID_JUMPTOMARK  [ ExecMethod = Execute; StateMethod = NoState; ] // 
status(final|play)
 
 SID_PRINTPREVIEW[ ExecMethod = Execute; StateMethod = GetState; ]
+SID_THEME_DIALOG[ ExecMethod = Execute; StateMethod = GetState; ]
 
 
 // search/replace
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index 5c41a4e49b75..da061b14e57b 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -59,6 +59,11 @@
 
 #include 
 
+#include 
+#include 
+#include 
+#include 
+
 namespace
 {
 void collectUIInformation(const OUString& aZoom)
@@ -1335,7 +1340,34 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
 SelectionChanged();
 }
 break;
-
+case SID_THEME_DIALOG:
+{
+MakeDrawLayer();
+ScTabView* pTabView = GetViewData().GetView();
+ScDrawView* pView = pTabView->GetScDrawView();
+SdrPage* pPage = pView->GetSdrPageView()->GetPage();
+auto const& pTheme = pPage->getSdrPageProperties().GetTheme();
+if (pTheme)
+{
+ScViewData& rViewData = GetViewData();
+vcl::Window* pWin = rViewData.GetActiveWin();
+auto pDialog = std::make_shared(pWin ? 
pWin->GetFrameWeld() : nullptr, pTheme.get());
+weld::DialogController::runAsync(pDialog, [pDialog, 
pPage](sal_uInt32 nResult) {
+if (RET_OK != nResult)
+return;
+
+auto oColorSet = pDialog->getCurrentColorSet();
+if (oColorSet)
+{
+auto& rColorSet = (*oColorSet).get();
+svx::ThemeColorChanger aChanger(pPage);
+aChanger.apply(rColorSet);
+}
+});
+}
+rReq.Done();
+}
+break;
 case SID_OPT_LOCALE_CHANGED :
 {   // locale changed, SYSTEM number formats changed => repaint 
cell contents
 PaintGrid();
diff --git a/sc/uiconfig/scalc/menubar/menubar.xml 
b/sc/uiconfig/scalc/menubar/menubar.xml
index 7b51b4b8d816..413e2e5ce11c 100644
--- a/sc/uiconfig/scalc/menubar/menubar.xml
+++ b/sc/uiconfig/scalc/menubar/menubar.xml
@@ -421,6 +421,7 @@
   
   
   
+  
   
   
 


[Libreoffice-commits] core.git: sc/sdi sc/source

2023-03-17 Thread Maxim Monastirsky (via logerrit)
 sc/sdi/formatsh.sdi|   11 
 sc/sdi/tabvwsh.sdi |   12 
 sc/source/ui/inc/formatsh.hxx  |1 
 sc/source/ui/inc/tabvwsh.hxx   |3 
 sc/source/ui/view/formatsh.cxx |  726 -
 sc/source/ui/view/tabvwsha.cxx |  723 
 6 files changed, 738 insertions(+), 738 deletions(-)

New commits:
commit 796c9c5ac2196e62546bcef229dcd08a3b8724db
Author: Maxim Monastirsky 
AuthorDate: Fri Mar 17 11:09:49 2023 +0200
Commit: Maxim Monastirsky 
CommitDate: Fri Mar 17 14:34:04 2023 +

sc drawstyles: Move style commands to ScTabViewShell

For them to be available also when shapes are selected.
This commit alone shouldn't cause any change in behavior.

Change-Id: Ic038618fe8b450ef2c93a19efb2e27c41f6de0f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149047
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky 

diff --git a/sc/sdi/formatsh.sdi b/sc/sdi/formatsh.sdi
index 4e566eb5069e..3cb4c050feaa 100644
--- a/sc/sdi/formatsh.sdi
+++ b/sc/sdi/formatsh.sdi
@@ -39,17 +39,6 @@ interface TableFont
 interface FormatForSelection
 {
 // slots which are disabled in the DrawShell {{
-SID_STYLE_FAMILY2   [ ExecMethod = ExecuteStyle; StateMethod = 
GetStyleState; ]
-SID_STYLE_APPLY [ ExecMethod = ExecuteStyle; StateMethod = 
GetStyleState; ]
-SID_STYLE_WATERCAN  [ ExecMethod = ExecuteStyle; StateMethod = 
GetStyleState; ]
-SID_STYLE_NEW_BY_EXAMPLE[ ExecMethod = ExecuteStyle; StateMethod = 
GetStyleState; ]
-SID_STYLE_UPDATE_BY_EXAMPLE [ ExecMethod = ExecuteStyle; StateMethod = 
GetStyleState; ]
-SID_STYLE_NEW   [ ExecMethod = ExecuteStyle; StateMethod = 
GetStyleState; ]
-SID_STYLE_FAMILY4   [ ExecMethod = ExecuteStyle; StateMethod = 
GetStyleState; ]
-SID_STYLE_EDIT  [ ExecMethod = ExecuteStyle; StateMethod = 
GetStyleState; ]
-SID_STYLE_DELETE[ ExecMethod = ExecuteStyle; StateMethod = 
GetStyleState; ]
-SID_STYLE_HIDE  [ ExecMethod = ExecuteStyle; StateMethod = 
GetStyleState; ]
-SID_STYLE_SHOW  [ ExecMethod = ExecuteStyle; StateMethod = 
GetStyleState; ]
 SID_STYLE_PREVIEW   [ ExecMethod = ExecuteStyle; ]
 SID_STYLE_END_PREVIEW   [ ExecMethod = ExecuteStyle; ]
 SID_CLASSIFICATION_APPLY [ ExecMethod = ExecuteStyle; ]
diff --git a/sc/sdi/tabvwsh.sdi b/sc/sdi/tabvwsh.sdi
index 50049bad7abc..5938317eb8aa 100644
--- a/sc/sdi/tabvwsh.sdi
+++ b/sc/sdi/tabvwsh.sdi
@@ -205,6 +205,18 @@ interface TableEditView
 SID_GRID_USE[ ExecMethod = ExecDrawOpt; StateMethod = 
GetDrawOptState; ]
 SID_HELPLINES_MOVE  [ ExecMethod = ExecDrawOpt; StateMethod = 
GetDrawOptState; ]
 
+SID_STYLE_FAMILY2   [ ExecMethod = ExecStyle; StateMethod = 
GetStyleState; ]
+SID_STYLE_FAMILY4   [ ExecMethod = ExecStyle; StateMethod = 
GetStyleState; ]
+SID_STYLE_APPLY [ ExecMethod = ExecStyle; StateMethod = 
GetStyleState; ]
+SID_STYLE_WATERCAN  [ ExecMethod = ExecStyle; StateMethod = 
GetStyleState; ]
+SID_STYLE_NEW_BY_EXAMPLE[ ExecMethod = ExecStyle; StateMethod = 
GetStyleState; ]
+SID_STYLE_UPDATE_BY_EXAMPLE [ ExecMethod = ExecStyle; StateMethod = 
GetStyleState; ]
+SID_STYLE_NEW   [ ExecMethod = ExecStyle; StateMethod = 
GetStyleState; ]
+SID_STYLE_EDIT  [ ExecMethod = ExecStyle; StateMethod = 
GetStyleState; ]
+SID_STYLE_DELETE[ ExecMethod = ExecStyle; StateMethod = 
GetStyleState; ]
+SID_STYLE_HIDE  [ ExecMethod = ExecStyle; StateMethod = 
GetStyleState; ]
+SID_STYLE_SHOW  [ ExecMethod = ExecStyle; StateMethod = 
GetStyleState; ]
+
 SID_GETUNDOSTRINGS  [ StateMethod = GetUndoState; ]
 SID_GETREDOSTRINGS  [ StateMethod = GetUndoState; ]
 SID_UNDO[ ExecMethod = ExecuteUndo; StateMethod = 
GetUndoState; ]
diff --git a/sc/source/ui/inc/formatsh.hxx b/sc/source/ui/inc/formatsh.hxx
index 193c98e04b4e..85819b1ac50f 100644
--- a/sc/source/ui/inc/formatsh.hxx
+++ b/sc/source/ui/inc/formatsh.hxx
@@ -60,7 +60,6 @@ public:
 voidGetBorderState( SfxItemSet& rSet );
 
 voidExecuteStyle( SfxRequest& rReq );
-voidGetStyleState( SfxItemSet& rSet );
 
 voidExecuteTextDirection( const SfxRequest& rReq );
 voidGetTextDirectionState( SfxItemSet& rSet );
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index 31709a47c16a..e87b6355198c 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -277,6 +277,9 @@ public:
 voidExecDrawOpt(const SfxRequest& rReq);
 voidGetDrawOptState(SfxItemSet );
 
+voidExecStyle(SfxRequest& rReq);
+voidGetStyleState(SfxItemSet );
+
 voidUpdateDrawShell();
 void 

[Libreoffice-commits] core.git: sc/sdi sc/source

2021-03-01 Thread mert (via logerrit)
 sc/sdi/drawsh.sdi|2 +-
 sc/source/ui/drawfunc/drawsh.cxx |   17 +
 2 files changed, 18 insertions(+), 1 deletion(-)

New commits:
commit 62c2e238fba7d926f4a05f52c185f9e727dd903f
Author: mert 
AuthorDate: Fri Feb 19 11:15:02 2021 +0300
Commit: Mert Tumer 
CommitDate: Tue Mar 2 08:28:12 2021 +0100

Implemented MoveShapeHandle uno command for sc

Change-Id: I5f81348cd778d7fbcb3b4e721fbf0412c4f5753d
Signed-off-by: mert 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95
Tested-by: Jenkins CollaboraOffice 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111514
Tested-by: Jenkins

diff --git a/sc/sdi/drawsh.sdi b/sc/sdi/drawsh.sdi
index 21e25f35623c..b1d5ecec44a8 100644
--- a/sc/sdi/drawsh.sdi
+++ b/sc/sdi/drawsh.sdi
@@ -230,7 +230,7 @@ interface TableDraw
 SID_ATTR_GLOW_TRANSPARENCY  [ ExecMethod = ExecDrawAttr; StateMethod = 
GetDrawAttrState; ]
 
 SID_ATTR_SOFTEDGE_RADIUS[ ExecMethod = ExecDrawAttr; StateMethod = 
GetDrawAttrState; ]
-
+SID_MOVE_SHAPE_HANDLE   [ ExecMethod = ExecDrawAttr; ]
 }
 
 
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 60d3b2114e29..90bf9f8e51cd 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -58,6 +58,7 @@
 #include 
 #include 
 #include 
+#include 
 
 SFX_IMPL_INTERFACE(ScDrawShell, SfxShell)
 
@@ -201,6 +202,22 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
 pView->SetAttributes(aEmptyAttr, true);
 }
 break;
+case SID_MOVE_SHAPE_HANDLE:
+{
+const SfxItemSet *pArgs = rReq.GetArgs ();
+if (pArgs && pArgs->Count () == 3)
+{
+const SfxUInt32Item* handleNumItem = 
rReq.GetArg(FN_PARAM_1);
+const SfxUInt32Item* newPosXTwips = 
rReq.GetArg(FN_PARAM_2);
+const SfxUInt32Item* newPosYTwips = 
rReq.GetArg(FN_PARAM_3);
+
+const sal_uLong handleNum = handleNumItem->GetValue();
+const sal_uLong newPosX = 
convertTwipToMm100(newPosXTwips->GetValue());
+const sal_uLong newPosY = 
convertTwipToMm100(newPosYTwips->GetValue());
+pView->MoveShapeHandle(handleNum, Point(newPosX, newPosY));
+}
+}
+break;
 
 case SID_ATTR_LINE_STYLE:
 case SID_ATTR_LINEEND_STYLE:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/sdi sc/source

2020-11-26 Thread Pranam Lashkari (via logerrit)
 sc/sdi/scalc.sdi   |2 +-
 sc/source/ui/view/tabvwshf.cxx |   11 +--
 2 files changed, 10 insertions(+), 3 deletions(-)

New commits:
commit e2af5a1a0aa05884dc93775f0a5864dbb9a94f81
Author: Pranam Lashkari 
AuthorDate: Tue Nov 24 13:14:50 2020 +0530
Commit: Pranam Lashkari 
CommitDate: Thu Nov 26 15:14:46 2020 +0100

added new parameter in uno:Move

new parameter UseCurrentDocument forces to use the correct document
for moving/copying sheet tabs around

When this parameter is true first parameter DocName will be ignored

Change-Id: I207966af5e11fdaaa0bdd91c07e1923399680395
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106478
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Jan Holesovsky 
(cherry picked from commit 7e21086c2903d19ec0981d09d63d8f7c4e078242)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106515
Tested-by: Jenkins
Reviewed-by: Pranam Lashkari 

diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index 077fa4adf9d9..aff341b676e2 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -3412,7 +3412,7 @@ SfxVoidItem Mirror SID_OBJECT_MIRROR
 
 
 SfxVoidItem Move FID_TAB_MOVE
-(SfxStringItem DocName FID_TAB_MOVE,SfxUInt16Item Index FN_PARAM_1,SfxBoolItem 
Copy FN_PARAM_2)
+(SfxStringItem DocName FID_TAB_MOVE,SfxUInt16Item Index FN_PARAM_1,SfxBoolItem 
Copy FN_PARAM_2,SfxBoolItem UseCurrentDocument FN_PARAM_3)
 [
 AutoUpdate = FALSE,
 FastCall = FALSE,
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index 98ce2db58fa7..40f78b7fc85b 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -464,7 +464,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
 bool   bDoIt = false;
 sal_uInt16 nDoc = 0;
 SCTAB nTab = rViewData.GetTabNo();
-bool   bCpy = false;
+bool bCpy = false, bUseCurrentDocument = false;
 OUString aDocName;
 OUString aTabName;
 
@@ -473,8 +473,15 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
 SCTAB nTableCount = rDoc.GetTableCount();
 const SfxPoolItem* pItem;
 
-if( pReqArgs->HasItem( FID_TAB_MOVE,  ) )
+// if UseCurrentDocument(FN_PARAM_3) is true ignore the 
document name provided and use current document
+if( pReqArgs->HasItem( FN_PARAM_3,  ) )
+bUseCurrentDocument = static_cast(pItem)->GetValue();
+
+if (bUseCurrentDocument)
+aDocName = GetViewData().GetDocShell()->GetTitle();
+else if(pReqArgs->HasItem( FID_TAB_MOVE,  ))
 aDocName = static_cast(pItem)->GetValue();
+
 if( pReqArgs->HasItem( FN_PARAM_1,  ) )
 {
 //  table is 1-based
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/sdi sc/source

2020-10-12 Thread gokaysatir (via logerrit)
 sc/sdi/scalc.sdi   |2 +-
 sc/source/ui/inc/viewfunc.hxx  |2 +-
 sc/source/ui/view/tabvwshf.cxx |   20 +++-
 sc/source/ui/view/viewfun2.cxx |6 +-
 4 files changed, 26 insertions(+), 4 deletions(-)

New commits:
commit 53bd76e8f193baf667077eb52d06e3c244964819
Author: gokaysatir 
AuthorDate: Wed Sep 30 15:48:44 2020 +0300
Commit: Szymon Kłos 
CommitDate: Mon Oct 12 09:12:49 2020 +0200

Online: Hide right clicked sheet.

On core side, if user clicks on a tab with right mouse button, clicked tab 
is selected.
So, for core side, if this feature will be desired, some more modification 
will be needed.

Change-Id: Ic4755b27b8ba98d3a6aa086b2e0a3566d095ba16
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103685
Reviewed-by: Szymon Kłos 
Tested-by: Jenkins CollaboraOffice 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104078
Tested-by: Jenkins

diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index 93a6b67be6e5..86ae80497a77 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -2593,7 +2593,7 @@ SfxVoidItem GoUpToStartOfDataSel SID_CURSORBLKUP_SEL
 
 
 SfxVoidItem Hide FID_TABLE_HIDE
-(SfxStringItem aTableName FID_TABLE_HIDE)
+(SfxInt16Item nTabNumber FID_TABLE_HIDE)
 [
 AutoUpdate = FALSE,
 FastCall = FALSE,
diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx
index 7780e74bc790..5a7ad681c628 100644
--- a/sc/source/ui/inc/viewfunc.hxx
+++ b/sc/source/ui/inc/viewfunc.hxx
@@ -285,7 +285,7 @@ public:
 const OUString& rSource );
 
 voidShowTable( const std::vector& rNames );
-voidHideTable( const ScMarkData& rMark );
+voidHideTable( const ScMarkData& rMark, SCTAB nTabToSelect = 
-1);
 
 voidMakeScenario(const OUString& rName, const OUString& 
rComment,
  const Color& rColor, ScScenarioFlags nFlags);
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index 95e566267ae1..98ce2db58fa7 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -107,7 +107,25 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
 if ( rDoc.IsDocEditable() )
 {
 ScMarkData& rMark = rViewData.GetMarkData();
-HideTable( rMark );
+SCTAB nActiveTab = -1;
+// For the cases when user right clicks on a non-active 
tab and hides it. This case is possible for Online.
+if (pReqArgs)
+{
+const SfxPoolItem *pItem;
+if( pReqArgs->HasItem( FID_TABLE_HIDE,  ) )
+{
+SCTAB nTabNumber = static_cast(pItem)->GetValue();
+// Does selected sheets (tabs) list include the 
sheet to be hidden?
+std::set::iterator it = 
rMark.GetSelectedTabs().find(nTabNumber);
+if (it == rMark.GetSelectedTabs().end())
+{
+// No it doesn't, so we won't shift the 
selected tab. Let's remember its position.
+nActiveTab = GetViewData().GetTabNo();
+}
+rMark.SelectOneTable(nTabNumber);
+}
+}
+HideTable( rMark, nActiveTab );
 }
 }
 break;
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 90ddff57df08..572b62cf4036 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -3146,7 +3146,7 @@ void ScViewFunc::ShowTable( const std::vector& 
rNames )
 }
 }
 
-void ScViewFunc::HideTable( const ScMarkData& rMark )
+void ScViewFunc::HideTable( const ScMarkData& rMark, SCTAB nTabToSelect )
 {
 ScDocShell* pDocSh = GetViewData().GetDocShell();
 ScDocument& rDoc = pDocSh->GetDocument();
@@ -3181,6 +3181,10 @@ void ScViewFunc::HideTable( const ScMarkData& rMark )
 undoTabs.push_back(nTab);
 }
 }
+
+if (nTabToSelect != -1)
+SetTabNo(nTabToSelect);
+
 if (bUndo)
 {
 pDocSh->GetUndoManager()->AddUndoAction( 
std::make_unique( pDocSh, undoTabs, false ) );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/sdi sc/source

2020-03-17 Thread Tamás Zolnai (via logerrit)
 sc/sdi/docsh.sdi |1 +
 sc/source/ui/docshell/docsh4.cxx |   24 
 2 files changed, 25 insertions(+)

New commits:
commit 6a670f1aa36630d493b53b19da875395b3173469
Author: Tamás Zolnai 
AuthorDate: Mon Mar 16 19:36:38 2020 +0100
Commit: Tamás Zolnai 
CommitDate: Tue Mar 17 11:41:30 2020 +0100

sc lok: Implement execution of SID_SPELLCHECK_APPLY_SUGGESTION

Used by online spellchecking context menu.

Change-Id: Id065d366d5ef2ddb3ecf78d202a7264b6962ec8a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90601
Tested-by: Tamás Zolnai 
Reviewed-by: Tamás Zolnai 

diff --git a/sc/sdi/docsh.sdi b/sc/sdi/docsh.sdi
index 364bd3adaa69..99019d55ff6f 100644
--- a/sc/sdi/docsh.sdi
+++ b/sc/sdi/docsh.sdi
@@ -76,6 +76,7 @@ interface TableDocument
 SID_NOTEBOOKBAR [ ExecMethod = Execute; StateMethod = GetState; ]
 SID_LANGUAGE_STATUS [ ExecMethod = Execute; StateMethod = GetState; ]
 SID_SPELLCHECK_IGNORE_ALL [ ExecMethod = Execute; StateMethod = 
GetState; ]
+SID_SPELLCHECK_APPLY_SUGGESTION [ ExecMethod = Execute; StateMethod = 
GetState; ]
 }
 
 
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index b35ce4ddc964..14058badaa02 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -1305,6 +1305,30 @@ void ScDocShell::Execute( SfxRequest& rReq )
 }
 }
 break;
+case SID_SPELLCHECK_APPLY_SUGGESTION:
+{
+ScViewData* pViewData = GetViewData();
+if (!pViewData)
+return;
+
+EditView* pEditView = 
pViewData->GetEditView(pViewData->GetActivePart());
+if (!pEditView)
+return;
+
+OUString sApplyText;
+const SfxStringItem* pItem2 = 
rReq.GetArg(FN_PARAM_1);
+if (pItem2)
+sApplyText = pItem2->GetValue();
+
+const OUString sSpellingRule("Spelling_");
+sal_Int32 nPos = 0;
+if(-1 != (nPos = sApplyText.indexOf( sSpellingRule )))
+{
+sApplyText = sApplyText.replaceAt(nPos, 
sSpellingRule.getLength(), "");
+pEditView->InsertText( sApplyText );
+}
+}
+break;
 default:
 {
 // small (?) hack -> forwarding of the slots to TabViewShell
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/sdi sc/source

2020-03-17 Thread Tamás Zolnai (via logerrit)
 sc/sdi/docsh.sdi |1 +
 sc/source/ui/docshell/docsh4.cxx |   24 
 2 files changed, 25 insertions(+)

New commits:
commit 103d65b733e099764fdf8aa3f4889dbc6ca49ff6
Author: Tamás Zolnai 
AuthorDate: Mon Mar 16 19:16:19 2020 +0100
Commit: Tamás Zolnai 
CommitDate: Tue Mar 17 11:13:53 2020 +0100

sc lok: Implement execution of SID_SPELLCHECK_IGNORE_ALL

Used by online spellchecking context menu.

Change-Id: I31779a38f467838d3719a0d32cbf37e335432d38
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90600
Tested-by: Tamás Zolnai 
Reviewed-by: Tamás Zolnai 

diff --git a/sc/sdi/docsh.sdi b/sc/sdi/docsh.sdi
index fdb22acf3e0c..364bd3adaa69 100644
--- a/sc/sdi/docsh.sdi
+++ b/sc/sdi/docsh.sdi
@@ -75,6 +75,7 @@ interface TableDocument
 SID_SHARE_DOC   [ ExecMethod = Execute; StateMethod = GetState; ]
 SID_NOTEBOOKBAR [ ExecMethod = Execute; StateMethod = GetState; ]
 SID_LANGUAGE_STATUS [ ExecMethod = Execute; StateMethod = GetState; ]
+SID_SPELLCHECK_IGNORE_ALL [ ExecMethod = Execute; StateMethod = 
GetState; ]
 }
 
 
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index ff70cfcec1ac..e0700030 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -1230,6 +1230,30 @@ void ScDocShell::Execute( SfxRequest& rReq )
 }
 }
 break;
+case SID_SPELLCHECK_IGNORE_ALL:
+{
+ScViewData* pViewData = GetViewData();
+if (!pViewData)
+return;
+
+EditView* pEditView = 
pViewData->GetEditView(pViewData->GetActivePart());
+if (!pEditView)
+return;
+
+OUString sIgnoreText;
+const SfxStringItem* pItem2 = 
rReq.GetArg(FN_PARAM_1);
+if (pItem2)
+sIgnoreText = pItem2->GetValue();
+
+const OUString sSpellingType("Spelling");
+if(sIgnoreText == sSpellingType)
+{
+ESelection aOldSel = pEditView->GetSelection();
+pEditView->SpellIgnoreWord();
+pEditView->SetSelection( aOldSel );
+}
+}
+break;
 default:
 {
 // small (?) hack -> forwarding of the slots to TabViewShell
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2019-08-06 Thread Samuel Mehrbrodt (via logerrit)
 sc/sdi/drtxtob.sdi   |1 +
 sc/sdi/editsh.sdi|1 +
 sc/source/ui/drawfunc/drtxtob.cxx|   15 +++
 sc/source/ui/view/editsh.cxx |   13 +
 sc/uiconfig/scalc/popupmenu/celledit.xml |1 +
 sc/uiconfig/scalc/popupmenu/drawtext.xml |1 +
 6 files changed, 32 insertions(+)

New commits:
commit a8b400ee8f9a7c80905afe147b7c9b991c6742cd
Author: Samuel Mehrbrodt 
AuthorDate: Tue Aug 6 12:27:03 2019 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Tue Aug 6 13:33:49 2019 +0200

Add "Copy hyperlink location" to sc context menus

Change-Id: I93840c7a7e6a0c5dedb6fa460a46d1785e80
Reviewed-on: https://gerrit.libreoffice.org/77018
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/sc/sdi/drtxtob.sdi b/sc/sdi/drtxtob.sdi
index 89be1b24c3ee..bbc68728c947 100644
--- a/sc/sdi/drtxtob.sdi
+++ b/sc/sdi/drtxtob.sdi
@@ -131,6 +131,7 @@ interface TableDrawText
 SID_HYPERLINK_GETLINK   [ StateMethod = GetState; Export = FALSE; ]
 SID_OPEN_HYPERLINK  [ ExecMethod = Execute; StateMethod = GetState; 
Export = FALSE; ]
 SID_EDIT_HYPERLINK  [ ExecMethod = Execute; StateMethod = GetState; 
Export = FALSE; ]
+SID_COPY_HYPERLINK_LOCATION [ ExecMethod = Execute; StateMethod = 
GetState; Export = FALSE; ]
 SID_REMOVE_HYPERLINK[ ExecMethod = Execute; StateMethod = GetState; 
Export = FALSE; ]
 SID_ENABLE_HYPHENATION  [ ExecMethod = Execute; StateMethod = GetState; 
Export = FALSE; ]
 
diff --git a/sc/sdi/editsh.sdi b/sc/sdi/editsh.sdi
index 5718fc63407e..934e6e8a6535 100644
--- a/sc/sdi/editsh.sdi
+++ b/sc/sdi/editsh.sdi
@@ -80,6 +80,7 @@ interface TableText
 SID_HYPERLINK_GETLINK   [ StateMethod = GetState; Export = FALSE; ]
 SID_OPEN_HYPERLINK  [ ExecMethod = Execute; StateMethod = GetState; 
Export = FALSE; ]
 SID_EDIT_HYPERLINK  [ ExecMethod = Execute; StateMethod = GetState; 
Export = FALSE; ]
+SID_COPY_HYPERLINK_LOCATION [ ExecMethod = Execute; StateMethod = 
GetState; Export = FALSE; ]
 SID_REMOVE_HYPERLINK  [ ExecMethod = Execute; StateMethod = GetState; 
Export = FALSE; ]
 
 SID_TRANSLITERATE_SENTENCE_CASE [ ExecMethod = ExecuteTrans; StateMethod = 
GetState;  Export = FALSE; ]
diff --git a/sc/source/ui/drawfunc/drtxtob.cxx 
b/sc/source/ui/drawfunc/drtxtob.cxx
index 58943add8cbd..334f1933a88b 100644
--- a/sc/source/ui/drawfunc/drtxtob.cxx
+++ b/sc/source/ui/drawfunc/drtxtob.cxx
@@ -58,6 +58,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -310,6 +311,18 @@ void ScDrawTextObjectBar::Execute( SfxRequest  )
 }
 break;
 
+case SID_COPY_HYPERLINK_LOCATION:
+{
+const SvxFieldData* pField = pOutView->GetFieldAtCursor();
+if (const SvxURLField* pURLField = dynamic_cast(pField))
+{
+uno::Reference 
xClipboard
+= pOutView->GetWindow()->GetClipboard();
+
vcl::unohelper::TextDataObject::CopyStringTo(pURLField->GetURL(), xClipboard);
+}
+}
+break;
+
 case SID_REMOVE_HYPERLINK:
 {
 URLFieldHelper::RemoveURLField(pOutliner, pOutView);
@@ -393,6 +406,7 @@ void ScDrawTextObjectBar::GetState( SfxItemSet& rSet )
 
 if (rSet.GetItemState(SID_OPEN_HYPERLINK) != SfxItemState::UNKNOWN
 || rSet.GetItemState(SID_EDIT_HYPERLINK) != SfxItemState::UNKNOWN
+|| rSet.GetItemState(SID_COPY_HYPERLINK_LOCATION) != 
SfxItemState::UNKNOWN
 || rSet.GetItemState(SID_REMOVE_HYPERLINK) != SfxItemState::UNKNOWN)
 {
 SdrView* pView = pViewData->GetScDrawView();
@@ -401,6 +415,7 @@ void ScDrawTextObjectBar::GetState( SfxItemSet& rSet )
 {
 rSet.DisableItem( SID_OPEN_HYPERLINK );
 rSet.DisableItem( SID_EDIT_HYPERLINK );
+rSet.DisableItem( SID_COPY_HYPERLINK_LOCATION );
 rSet.DisableItem( SID_REMOVE_HYPERLINK );
 }
 }
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index 7140f7499c06..3d8cf4c88312 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -56,6 +56,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -636,6 +637,17 @@ void ScEditShell::Execute( SfxRequest& rReq )
 SID_HYPERLINK_DIALOG);
 }
 break;
+case SID_COPY_HYPERLINK_LOCATION:
+{
+const SvxFieldData* pField = pEditView->GetFieldAtCursor();
+if (const SvxURLField* pURLField = dynamic_cast(pField))
+{
+uno::Reference 
xClipboard
+= pEditView->GetWindow()->GetClipboard();
+
vcl::unohelper::TextDataObject::CopyStringTo(pURLField->GetURL(), xClipboard);
+}
+}
+break;
 

[Libreoffice-commits] core.git: sc/sdi sc/source

2018-11-15 Thread Libreoffice Gerrit user
 sc/sdi/scalc.sdi |6 +++---
 sc/source/ui/view/cellsh.cxx |9 +
 2 files changed, 12 insertions(+), 3 deletions(-)

New commits:
commit 525ed5d1fcb89412f0b80be0b1e35410b048c337
Author: Xisco Fauli 
AuthorDate: Thu Oct 18 21:09:12 2018 +0200
Commit: Eike Rathke 
CommitDate: Thu Nov 15 22:33:14 2018 +0100

tdf#107240 tdf#120432 Disable time/date entries in read-only/protected mode

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

diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index 3519242625bb..87ef5950d333 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -3073,7 +3073,7 @@ SfxVoidItem InsertObjectStarMath SID_INSERT_SMATH
 [
 AutoUpdate = FALSE,
 FastCall = FALSE,
-ReadOnlyDoc = TRUE,
+ReadOnlyDoc = FALSE,
 Toggle = FALSE,
 Container = FALSE,
 RecordAbsolute = FALSE,
@@ -6181,7 +6181,7 @@ SfxVoidItem InsertCurrentDate SID_INSERT_CURRENT_DATE
 [
 AutoUpdate = FALSE,
 FastCall = FALSE,
-ReadOnlyDoc = TRUE,
+ReadOnlyDoc = FALSE,
 Toggle = FALSE,
 Container = FALSE,
 RecordAbsolute = FALSE,
@@ -6199,7 +6199,7 @@ SfxVoidItem InsertCurrentTime SID_INSERT_CURRENT_TIME
 [
 AutoUpdate = FALSE,
 FastCall = FALSE,
-ReadOnlyDoc = TRUE,
+ReadOnlyDoc = FALSE,
 Toggle = FALSE,
 Container = FALSE,
 RecordAbsolute = FALSE,
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index 63228e880b9f..1855a5b12892 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -889,6 +889,15 @@ void ScCellShell::GetState(SfxItemSet )
 rSet.DisableItem( nWhich );
 break;
 
+case SID_INSERT_CURRENT_DATE:
+case SID_INSERT_CURRENT_TIME:
+{
+if ( pDoc->IsTabProtected(nTab) &&
+pDoc->HasAttrib(nPosX, nPosY, nTab, nPosX, nPosY, 
nTab, HasAttrFlags::Protected))
+rSet.DisableItem( nWhich );
+}
+break;
+
 case SID_SELECT_SCENARIO:
 {
 std::vector aList;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/sdi sc/source

2017-05-30 Thread Gulsah Kose
 sc/sdi/formatsh.sdi|2 +-
 sc/source/ui/view/formatsh.cxx |   11 ++-
 sc/source/ui/view/tabview3.cxx |1 +
 3 files changed, 12 insertions(+), 2 deletions(-)

New commits:
commit 82beda528fb74ae1c6b5e12a98dbf5d4e9e4c0db
Author: Gulsah Kose 
Date:   Tue May 30 15:45:24 2017 +0300

tdf#86119 Fix toggle behaviour of SID_NUMBER_STANDARD.

Change-Id: I718869c92a3a03c05b8db3fe665f5502202f434b
Signed-off-by: Gulsah Kose 
Reviewed-on: https://gerrit.libreoffice.org/38217
Tested-by: Jenkins 

diff --git a/sc/sdi/formatsh.sdi b/sc/sdi/formatsh.sdi
index 3663955aadfa..54771a8dbb80 100644
--- a/sc/sdi/formatsh.sdi
+++ b/sc/sdi/formatsh.sdi
@@ -110,7 +110,7 @@ interface FormatForSelection
 SID_NUMBER_CURRENCY [ ExecMethod = ExecuteNumFormat; StateMethod = 
GetNumFormatState; ]
 SID_NUMBER_PERCENT  [ ExecMethod = ExecuteNumFormat; StateMethod = 
GetNumFormatState; ]
 SID_NUMBER_TIME [ ExecMethod = ExecuteNumFormat; StateMethod = 
GetNumFormatState; ]
-SID_NUMBER_STANDARD [ ExecMethod = ExecuteNumFormat;]
+SID_NUMBER_STANDARD [ ExecMethod = ExecuteNumFormat; StateMethod = 
GetNumFormatState; ]
 SID_NUMBER_INCDEC   [ ExecMethod = ExecuteNumFormat;]
 SID_NUMBER_DECDEC   [ ExecMethod = ExecuteNumFormat;]
 
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 259338a37ab4..cef3eab48bc3 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -1127,7 +1127,9 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq )
 rReq.Done();
 break;
 case SID_NUMBER_STANDARD:
-pTabViewShell->SetNumberFormat( css::util::NumberFormat::NUMBER );
+if (!(nType & css::util::NumberFormat::NUMBER))
+pTabViewShell->SetNumberFormat( 
css::util::NumberFormat::NUMBER );
+rBindings.Invalidate( nSlot );
 rReq.Done();
 break;
 case SID_NUMBER_INCDEC:
@@ -2637,6 +2639,13 @@ void ScFormatShell::GetNumFormatState( SfxItemSet& rSet )
 rSet.Put( SfxBoolItem(nWhich, (nType & 
css::util::NumberFormat::NUMBER) && nNumberFormat == 4 ) );
 }
 break;
+case SID_NUMBER_STANDARD:
+{
+const SfxItemSet& rAttrSet = 
pTabViewShell->GetSelectionPattern()->GetItemSet();
+sal_uInt32 nNumberFormat = static_cast(rAttrSet.Get(ATTR_VALUE_FORMAT)).GetValue();
+rSet.Put( SfxBoolItem(nWhich, (nType & 
css::util::NumberFormat::NUMBER) && nNumberFormat == 0 ) );
+}
+break;
 }
 nWhich = aIter.NextWhich();
 }
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 429f34e1017e..de638447b567 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -322,6 +322,7 @@ void ScTabView::InvalidateAttribs()
 rBindings.Invalidate( SID_NUMBER_PERCENT );
 rBindings.Invalidate( SID_NUMBER_TWODEC );
 rBindings.Invalidate( SID_NUMBER_TIME );
+rBindings.Invalidate( SID_NUMBER_STANDARD );
 }
 
 // SetCursor - Cursor, set, draw, update InputWin
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-23 Thread Yousuf Philips
 sc/sdi/app.sdi   |2 --
 sc/source/ui/view/editsh.cxx |2 --
 sc/source/ui/view/viewutil.cxx   |2 --
 sd/source/ui/func/fubullet.cxx   |6 ++
 sw/source/uibase/shells/annotsh.cxx  |2 --
 sw/source/uibase/shells/drwtxtex.cxx |2 --
 sw/source/uibase/shells/textsh1.cxx  |2 --
 7 files changed, 2 insertions(+), 16 deletions(-)

New commits:
commit f586c7ec352b3b7b23dba0e1e774d85b1c14e2b7
Author: Yousuf Philips 
Date:   Sat Apr 22 01:09:24 2017 +0400

tdf#104610 Always enabled no-width break formatting marks

Change-Id: I0708a61d43bfa44dac19683b200975e3a6da788a
Reviewed-on: https://gerrit.libreoffice.org/36807
Tested-by: Jenkins 
Reviewed-by: Khaled Hosny 

diff --git a/sc/sdi/app.sdi b/sc/sdi/app.sdi
index d8f2dcea4fdb..7787a5956efe 100644
--- a/sc/sdi/app.sdi
+++ b/sc/sdi/app.sdi
@@ -67,8 +67,6 @@ interface StarCalc
 
 SID_INSERT_RLM  [ StateMethod = HideDisabledSlots; Export = 
FALSE; ]
 SID_INSERT_LRM  [ StateMethod = HideDisabledSlots; Export = 
FALSE; ]
-SID_INSERT_ZWSP [ StateMethod = HideDisabledSlots; Export = 
FALSE; ]
-SID_INSERT_ZWNBSP   [ StateMethod = HideDisabledSlots; Export = 
FALSE; ]
 
 }
 
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index 73ff7b3b5082..0d9465603aca 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -751,8 +751,6 @@ void ScEditShell::GetState( SfxItemSet& rSet )
 case SID_TRANSLITERATE_KATAGANA:
 case SID_INSERT_RLM:
 case SID_INSERT_LRM:
-case SID_INSERT_ZWNBSP:
-case SID_INSERT_ZWSP:
 ScViewUtil::HideDisabledSlot( rSet, pViewData->GetBindings(), 
nWhich );
 break;
 
diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx
index bd4afc6e47e3..8c00d51c6028 100644
--- a/sc/source/ui/view/viewutil.cxx
+++ b/sc/source/ui/view/viewutil.cxx
@@ -323,8 +323,6 @@ void ScViewUtil::HideDisabledSlot( SfxItemSet& rSet, 
SfxBindings& rBindings, sal
 
 case SID_INSERT_RLM:
 case SID_INSERT_LRM:
-case SID_INSERT_ZWNBSP:
-case SID_INSERT_ZWSP:
 bEnabled = aCTLOptions.IsCTLFontEnabled();
 break;
 
diff --git a/sd/source/ui/func/fubullet.cxx b/sd/source/ui/func/fubullet.cxx
index fa1c343f45b0..b0c24ddc925b 100644
--- a/sd/source/ui/func/fubullet.cxx
+++ b/sd/source/ui/func/fubullet.cxx
@@ -315,6 +315,8 @@ void FuBullet::GetSlotState( SfxItemSet& rSet, ViewShell* 
pViewShell, SfxViewFra
 rSet.DisableItem(FN_INSERT_SOFT_HYPHEN);
 rSet.DisableItem(FN_INSERT_HARDHYPHEN);
 rSet.DisableItem(FN_INSERT_HARD_SPACE);
+rSet.DisableItem(SID_INSERT_ZWNBSP);
+rSet.DisableItem(SID_INSERT_ZWSP);
 }
 
 if( !bTextEdit && (dynamic_cast( pViewShell ) == 
nullptr) )
@@ -324,8 +326,6 @@ void FuBullet::GetSlotState( SfxItemSet& rSet, ViewShell* 
pViewShell, SfxViewFra
 {
 rSet.DisableItem(SID_INSERT_RLM);
 rSet.DisableItem(SID_INSERT_LRM);
-rSet.DisableItem(SID_INSERT_ZWNBSP);
-rSet.DisableItem(SID_INSERT_ZWSP);
 }
 
 if( pViewFrame )
@@ -334,8 +334,6 @@ void FuBullet::GetSlotState( SfxItemSet& rSet, ViewShell* 
pViewShell, SfxViewFra
 
 rBindings.SetVisibleState( SID_INSERT_RLM, bCtlEnabled );
 rBindings.SetVisibleState( SID_INSERT_LRM, bCtlEnabled );
-rBindings.SetVisibleState( SID_INSERT_ZWNBSP, bCtlEnabled );
-rBindings.SetVisibleState( SID_INSERT_ZWSP, bCtlEnabled );
 }
 }
 }
diff --git a/sw/source/uibase/shells/annotsh.cxx 
b/sw/source/uibase/shells/annotsh.cxx
index c51072f5695c..a4a3c8f78204 100644
--- a/sw/source/uibase/shells/annotsh.cxx
+++ b/sw/source/uibase/shells/annotsh.cxx
@@ -851,8 +851,6 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet)
 break;
 case SID_INSERT_RLM :
 case SID_INSERT_LRM :
-case SID_INSERT_ZWNBSP :
-case SID_INSERT_ZWSP:
 {
 SvtCTLOptions aCTLOptions;
 bool bEnabled = aCTLOptions.IsCTLFontEnabled();
diff --git a/sw/source/uibase/shells/drwtxtex.cxx 
b/sw/source/uibase/shells/drwtxtex.cxx
index 186ab8fcc0e1..b875b49d721f 100644
--- a/sw/source/uibase/shells/drwtxtex.cxx
+++ b/sw/source/uibase/shells/drwtxtex.cxx
@@ -872,8 +872,6 @@ ASK_ESCAPE:
 break;
 case SID_INSERT_RLM :
 case SID_INSERT_LRM :
-case SID_INSERT_ZWNBSP :
-case SID_INSERT_ZWSP:
 {
 SvtCTLOptions aCTLOptions;
 bool bEnabled = aCTLOptions.IsCTLFontEnabled();
diff --git a/sw/source/uibase/shells/textsh1.cxx 
b/sw/source/uibase/shells/textsh1.cxx
index c4fd2b696f8d..a01601192167 100644
--- 

[Libreoffice-commits] core.git: sc/sdi sc/source

2017-04-05 Thread Marco Cecchetti
 sc/sdi/scalc.sdi  |2 +-
 sc/source/ui/view/cellsh3.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 1fd19d3e45bd192de2ceae84724653a9f722d51c
Author: Marco Cecchetti 
Date:   Sun Apr 2 20:46:41 2017 +0200

LOK - Calc: beyond row 65535 it is not possibile to resize a row

The row parameter type was a unsigned short.

Change-Id: I2da1a96d60988e8f1efeb49f55032fb84a8b562b
Reviewed-on: https://gerrit.libreoffice.org/36087
Reviewed-by: Jan Holesovsky 
Tested-by: Jenkins 

diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index ae0e8682fa90..e95b7474b3c7 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -4352,7 +4352,7 @@ SfxInt32Item Row SID_RANGE_ROW
 
 
 SfxUInt16Item RowHeight FID_ROW_HEIGHT
-(SfxUInt16Item Row FN_PARAM_1,SfxUInt16Item Height FN_PARAM_2)
+(SfxInt32Item Row FN_PARAM_1,SfxUInt16Item Height FN_PARAM_2)
 [
 AutoUpdate = FALSE,
 FastCall = FALSE,
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index 8d46afaffc40..374f5f5a5a5a 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -543,7 +543,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
  pReqArgs->HasItem( FN_PARAM_2,  ) )
 {
 std::vector aRanges;
-SCCOLROW nRow = static_cast(pRow)->GetValue() - 1;
+SCCOLROW nRow = static_cast(pRow)->GetValue() - 1;
 sal_uInt16 nHeight = static_cast(pHeight)->GetValue();
 ScMarkData& rMark = GetViewData()->GetMarkData();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-10-13 Thread Gulsah Kose
 sc/sdi/tabvwsh.sdi  |1 +
 sc/source/ui/drawfunc/fuconrec.cxx  |2 ++
 sc/source/ui/drawfunc/fupoor.cxx|4 +++-
 sc/source/ui/view/tabvwsh2.cxx  |2 ++
 sc/uiconfig/scalc/toolbar/arrowsbar.xml |1 +
 5 files changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 19dc5d725791388f1b7b17af2e48b0abdf8990bd
Author: Gulsah Kose 
Date:   Thu Oct 13 15:17:25 2016 +0300

tdf#101390 Add "Diagonal Line" command to the calc arrowsbar.

Change-Id: I1e29cd9a63424771576d1a5a47558d30faf53dda
Signed-off-by: Gulsah Kose 
Reviewed-on: https://gerrit.libreoffice.org/29769
Reviewed-by: Maxim Monastirsky 
Tested-by: Maxim Monastirsky 

diff --git a/sc/sdi/tabvwsh.sdi b/sc/sdi/tabvwsh.sdi
index f7da47f..ec44746 100644
--- a/sc/sdi/tabvwsh.sdi
+++ b/sc/sdi/tabvwsh.sdi
@@ -88,6 +88,7 @@ interface BaseSelection
 
 SID_OBJECT_SELECT   [ ExecMethod = ExecDraw; StateMethod = 
GetDrawState; ]
 SID_DRAW_LINE   [ ExecMethod = ExecDraw; StateMethod = 
GetDrawState; ]
+SID_DRAW_XLINE  [ ExecMethod = ExecDraw; StateMethod = 
GetDrawState; ]
 SID_LINE_ARROW_END  [ ExecMethod = ExecDraw; StateMethod = 
GetDrawState; ]
 SID_LINE_ARROW_CIRCLE   [ ExecMethod = ExecDraw; StateMethod = 
GetDrawState; ]
 SID_LINE_ARROW_SQUARE   [ ExecMethod = ExecDraw; StateMethod = 
GetDrawState; ]
diff --git a/sc/source/ui/drawfunc/fuconrec.cxx 
b/sc/source/ui/drawfunc/fuconrec.cxx
index ebc2611..d76b1ef 100644
--- a/sc/source/ui/drawfunc/fuconrec.cxx
+++ b/sc/source/ui/drawfunc/fuconrec.cxx
@@ -196,6 +196,7 @@ void FuConstRectangle::Activate()
 switch (aSfxRequest.GetSlot() )
 {
 case SID_DRAW_LINE:
+case SID_DRAW_XLINE:
 case SID_LINE_ARROW_END:
 case SID_LINE_ARROW_CIRCLE:
 case SID_LINE_ARROW_SQUARE:
@@ -403,6 +404,7 @@ SdrObject* FuConstRectangle::CreateDefaultObject(const 
sal_uInt16 nID, const Rec
 switch(nID)
 {
 case SID_DRAW_LINE:
+case SID_DRAW_XLINE:
 case SID_LINE_ARROW_END:
 case SID_LINE_ARROW_CIRCLE:
 case SID_LINE_ARROW_SQUARE:
diff --git a/sc/source/ui/drawfunc/fupoor.cxx b/sc/source/ui/drawfunc/fupoor.cxx
index 94829ea..03a6646 100644
--- a/sc/source/ui/drawfunc/fupoor.cxx
+++ b/sc/source/ui/drawfunc/fupoor.cxx
@@ -308,7 +308,9 @@ bool FuPoor::doConstructOrthogonal() const
 return bIsMediaSelected;
 }
 }
-else if (aSfxRequest.GetSlot() == SID_DRAW_XPOLYGON || 
aSfxRequest.GetSlot() == SID_DRAW_XPOLYGON_NOFILL)
+else if (aSfxRequest.GetSlot() == SID_DRAW_XPOLYGON
+  || aSfxRequest.GetSlot() == SID_DRAW_XPOLYGON_NOFILL
+  || aSfxRequest.GetSlot() == SID_DRAW_XLINE)
 return true;
 
 return false;
diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx
index 13c32a8..a3982db 100644
--- a/sc/source/ui/view/tabvwsh2.cxx
+++ b/sc/source/ui/view/tabvwsh2.cxx
@@ -218,6 +218,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
 break;
 
 case SID_DRAW_LINE:
+case SID_DRAW_XLINE:
 case SID_LINE_ARROW_END:
 case SID_LINE_ARROW_CIRCLE:
 case SID_LINE_ARROW_SQUARE:
@@ -369,6 +370,7 @@ void ScTabViewShell::GetDrawState(SfxItemSet )
 break;
 
 case SID_DRAW_LINE:
+case SID_DRAW_XLINE:
 case SID_LINE_ARROW_END:
 case SID_LINE_ARROW_CIRCLE:
 case SID_LINE_ARROW_SQUARE:
diff --git a/sc/uiconfig/scalc/toolbar/arrowsbar.xml 
b/sc/uiconfig/scalc/toolbar/arrowsbar.xml
index cfe177a..40d7238 100644
--- a/sc/uiconfig/scalc/toolbar/arrowsbar.xml
+++ b/sc/uiconfig/scalc/toolbar/arrowsbar.xml
@@ -29,4 +29,5 @@
  
  
  
+ 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-10-13 Thread Gulsah Kose
 sc/sdi/tabvwsh.sdi  |1 +
 sc/source/ui/drawfunc/fuconrec.cxx  |   19 +++
 sc/source/ui/view/tabvwsh2.cxx  |2 ++
 sc/uiconfig/scalc/toolbar/arrowsbar.xml |2 ++
 4 files changed, 24 insertions(+)

New commits:
commit 042a7fc229c44fcb7a0c009a1b7f5d34913f8c12
Author: Gulsah Kose 
Date:   Tue Oct 11 23:50:47 2016 +0300

tdf#101390 Add "Dimesion Line" command to the calc arrowsbox.

Change-Id: I00a324dd0a27dbcf598e83d2a6cc857ab7b7d6aa
Signed-off-by: Gulsah Kose 
Reviewed-on: https://gerrit.libreoffice.org/29716
Reviewed-by: Maxim Monastirsky 
Tested-by: Maxim Monastirsky 

diff --git a/sc/sdi/tabvwsh.sdi b/sc/sdi/tabvwsh.sdi
index 91e92c9..f7da47f 100644
--- a/sc/sdi/tabvwsh.sdi
+++ b/sc/sdi/tabvwsh.sdi
@@ -95,6 +95,7 @@ interface BaseSelection
 SID_LINE_CIRCLE_ARROW   [ ExecMethod = ExecDraw; StateMethod = 
GetDrawState; ]
 SID_LINE_SQUARE_ARROW   [ ExecMethod = ExecDraw; StateMethod = 
GetDrawState; ]
 SID_LINE_ARROWS [ ExecMethod = ExecDraw; StateMethod = 
GetDrawState; ]
+SID_DRAW_MEASURELINE[ ExecMethod = ExecDraw; StateMethod = 
GetDrawState; ]
 SID_DRAWTBX_ARROWS  [ StateMethod = GetDrawState; ]
 SID_DRAW_RECT   [ ExecMethod = ExecDraw; StateMethod = 
GetDrawState; ]
 SID_DRAW_ELLIPSE[ ExecMethod = ExecDraw; StateMethod = 
GetDrawState; ]
diff --git a/sc/source/ui/drawfunc/fuconrec.cxx 
b/sc/source/ui/drawfunc/fuconrec.cxx
index 310b114..ebc2611 100644
--- a/sc/source/ui/drawfunc/fuconrec.cxx
+++ b/sc/source/ui/drawfunc/fuconrec.cxx
@@ -33,6 +33,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -206,6 +207,11 @@ void FuConstRectangle::Activate()
 aObjKind = OBJ_LINE;
 break;
 
+case SID_DRAW_MEASURELINE:
+aNewPointer = Pointer( PointerStyle::DrawLine );
+aObjKind = OBJ_MEASURE;
+break;
+
 case SID_DRAW_RECT:
 aNewPointer = Pointer( PointerStyle::DrawRect );
 aObjKind = OBJ_RECT;
@@ -420,6 +426,19 @@ SdrObject* FuConstRectangle::CreateDefaultObject(const 
sal_uInt16 nID, const Rec
 
 break;
 }
+
+case SID_DRAW_MEASURELINE:
+{
+if(dynamic_cast( pObj) != nullptr)
+{
+sal_Int32 nYMiddle((aRect.Top() + aRect.Bottom()) / 2);
+
static_cast(pObj)->SetPoint(Point(aStart.X(), nYMiddle), 0);
+
static_cast(pObj)->SetPoint(Point(aEnd.X(), nYMiddle), 1);
+}
+
+break;
+}
+
 case SID_DRAW_CAPTION:
 case SID_DRAW_CAPTION_VERTICAL:
 {
diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx
index f1a0f48..13c32a8 100644
--- a/sc/source/ui/view/tabvwsh2.cxx
+++ b/sc/source/ui/view/tabvwsh2.cxx
@@ -227,6 +227,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
 case SID_LINE_ARROWS:
 case SID_DRAW_RECT:
 case SID_DRAW_ELLIPSE:
+case SID_DRAW_MEASURELINE:
 pTabView->SetDrawFuncPtr(new FuConstRectangle(this, pWin, pView, 
pDoc, rReq));
 break;
 
@@ -375,6 +376,7 @@ void ScTabViewShell::GetDrawState(SfxItemSet )
 case SID_LINE_CIRCLE_ARROW:
 case SID_LINE_SQUARE_ARROW:
 case SID_LINE_ARROWS:
+case SID_DRAW_MEASURELINE:
 case SID_DRAW_RECT:
 case SID_DRAW_ELLIPSE:
 case SID_DRAW_POLYGON:
diff --git a/sc/uiconfig/scalc/toolbar/arrowsbar.xml 
b/sc/uiconfig/scalc/toolbar/arrowsbar.xml
index 5ec4d8a..cfe177a 100644
--- a/sc/uiconfig/scalc/toolbar/arrowsbar.xml
+++ b/sc/uiconfig/scalc/toolbar/arrowsbar.xml
@@ -27,4 +27,6 @@
  
  
  
+ 
+ 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/sdi sc/source

2016-06-01 Thread Pranav Kant
 sc/sdi/scalc.sdi  |2 +-
 sc/source/ui/view/cellsh3.cxx |   32 ++--
 2 files changed, 27 insertions(+), 7 deletions(-)

New commits:
commit c14627d66ca8d9fe14272fadb5305857101f513e
Author: Pranav Kant 
Date:   Wed Jun 1 12:58:30 2016 +0530

sc lok: Add new param to .uno:EnterString to prevent committing

If new param, DontCommit, is specified start the edit engine and
edit the current cell. This helps in not triggering calculations
that depend on the current cell. In case DontCommit param is
missing, it will work as it used to.

Change-Id: I62408932e52ff68fa11568cfc16a43e4c1e919c5
Reviewed-on: https://gerrit.libreoffice.org/25753
Tested-by: Jenkins 
Reviewed-by: pranavk 

diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index 028e703..d55eca4 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -6553,7 +6553,7 @@ SfxVoidItem Ungroup SID_OUTLINE_REMOVE
 ]
 
 SfxVoidItem EnterString SID_ENTER_STRING
-(SfxStringItem StringName SID_ENTER_STRING)
+(SfxStringItem StringName SID_ENTER_STRING,SfxBoolItem DontCommit FN_PARAM_1)
 [
 AutoUpdate = FALSE,
 FastCall = FALSE,
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index 8545781..8ce210d 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -18,6 +18,8 @@
  */
 
 #include "scitems.hxx"
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -176,19 +178,37 @@ void ScCellShell::Execute( SfxRequest& rReq )
 {
 OUString aStr( static_cast(pReqArgs->
 Get( SID_ENTER_STRING )).GetValue() );
-
-pTabViewShell->EnterData( GetViewData()->GetCurX(),
-   GetViewData()->GetCurY(),
-   GetViewData()->GetTabNo(),
-   aStr );
+const SfxPoolItem* pDontCommitItem;
+bool bCommit = true;
+if (pReqArgs->HasItem(FN_PARAM_1, ))
+bCommit = !(static_cast(pDontCommitItem)->GetValue());
 
 ScInputHandler* pHdl = SC_MOD()->GetInputHdl( 
pTabViewShell );
+if (bCommit)
+{
+pTabViewShell->EnterData( GetViewData()->GetCurX(),
+  GetViewData()->GetCurY(),
+  GetViewData()->GetTabNo(),
+  aStr );
+}
+else
+{
+SC_MOD()->SetInputMode(SC_INPUT_TABLE);
+
+EditView* pTableView = pHdl->GetActiveView();
+pHdl->DataChanging();
+if (pTableView)
+pTableView->GetEditEngine()->SetText(aStr);
+pHdl->DataChanged();
+
+SC_MOD()->SetInputMode(SC_INPUT_NONE);
+}
+
 if ( !pHdl || !pHdl->IsInEnterHandler() )
 {
 //  UpdateInputHandler is needed after the cell content
 //  has changed, but if called from EnterHandler, 
UpdateInputHandler
 //  will be called later when moving the cursor.
-
 pTabViewShell->UpdateInputHandler();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/sdi sc/source sc/uiconfig sc/UIConfig_scalc.mk sd/sdi sd/source sd/uiconfig sd/UIConfig_simpress.mk sfx2/source sfx2/uiconfig sfx2/UIConfig_sfx.mk vcl/source

2016-05-17 Thread Szymon Kłos
 sc/UIConfig_scalc.mk   |1 
 sc/sdi/docsh.sdi   |1 
 sc/source/ui/docshell/docsh4.cxx   |   14 ++
 sc/uiconfig/scalc/ui/notebookbar.ui|  172 +
 sd/UIConfig_simpress.mk|1 
 sd/sdi/docshell.sdi|5 
 sd/source/ui/docshell/docshel3.cxx |7 +
 sd/source/ui/docshell/docshell.cxx |7 +
 sd/uiconfig/simpress/ui/notebookbar.ui |  118 ++
 sfx2/UIConfig_sfx.mk   |1 
 sfx2/source/dialog/backingcomp.cxx |   20 +++
 sfx2/uiconfig/ui/notebookbar.ui|  118 ++
 vcl/source/window/brdwin.cxx   |2 
 13 files changed, 467 insertions(+)

New commits:
commit 6ebf9cfbf54052d7fae50cdab146cc5c63ba262a
Author: Szymon Kłos 
Date:   Tue May 10 19:16:47 2016 +0200

Set different ui file for NotebookBar in each app

Changes:
+ added ui file for start center, calc and impress
+ NotebookBar not visible in Math, Draw

Change-Id: Ie35935e67524ac712930b088591e9e53955de4a1
Reviewed-on: https://gerrit.libreoffice.org/24860
Reviewed-by: Samuel Mehrbrodt 
Tested-by: Samuel Mehrbrodt 

diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk
index f67a879..21bb7e1 100644
--- a/sc/UIConfig_scalc.mk
+++ b/sc/UIConfig_scalc.mk
@@ -137,6 +137,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
sc/uiconfig/scalc/ui/leftfooterdialog \
sc/uiconfig/scalc/ui/leftheaderdialog \
sc/uiconfig/scalc/ui/namerangesdialog \
+   sc/uiconfig/scalc/ui/notebookbar \
sc/uiconfig/scalc/ui/managenamesdialog \
sc/uiconfig/scalc/ui/movecopysheet \
sc/uiconfig/scalc/ui/movingaveragedialog \
diff --git a/sc/sdi/docsh.sdi b/sc/sdi/docsh.sdi
index 25852fb..852af49 100644
--- a/sc/sdi/docsh.sdi
+++ b/sc/sdi/docsh.sdi
@@ -87,6 +87,7 @@ interface TableDocument
 SID_EDIT_SCENARIO   [ ExecMethod = Execute; ]
 SID_ATTR_CHAR_FONTLIST  [ StateMethod = GetState; ]
 SID_SHARE_DOC   [ ExecMethod = Execute; StateMethod = GetState; ]
+SID_NOTEBOOKBAR [ ExecMethod = Execute; StateMethod = GetState; ]
 }
 
 
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 1bedf91..bdf1c52 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -101,6 +101,7 @@ using namespace ::com::sun::star;
 #include "formulacell.hxx"
 #include 
 #include 
+#include 
 
 void ScDocShell::Execute( SfxRequest& rReq )
 {
@@ -1103,6 +1104,12 @@ void ScDocShell::Execute( SfxRequest& rReq )
 { ,  });
 }
 break;
+case SID_NOTEBOOKBAR:
+{
+if (pBindings)
+sfx2::SfxNotebookBar::ExecMethod(*pBindings);
+}
+break;
 default:
 {
 // kleiner (?) Hack -> forward der Slots an TabViewShell
@@ -1857,6 +1864,13 @@ void ScDocShell::GetState( SfxItemSet  )
 rSet.Put( SvxFontListItem( pImpl->pFontList, nWhich ) );
 break;
 
+case SID_NOTEBOOKBAR:
+{
+if (GetViewBindings())
+sfx2::SfxNotebookBar::StateMethod(*GetViewBindings(), 
"modules/scalc/ui/notebookbar.ui");
+}
+break;
+
 default:
 {
 }
diff --git a/sc/uiconfig/scalc/ui/notebookbar.ui 
b/sc/uiconfig/scalc/ui/notebookbar.ui
new file mode 100644
index 000..337448d
--- /dev/null
+++ b/sc/uiconfig/scalc/ui/notebookbar.ui
@@ -0,0 +1,172 @@
+
+
+
+  
+  
+  
+True
+False
+
+  
+True
+False
+vertical
+
+  
+True
+True
+True
+True
+
+  
+True
+False
+6
+
+  
+True
+False
+vertical
+
+  
+True
+True
+True
+.uno:Open
+none
+  
+  
+False
+True
+0
+  
+
+
+  
+True
+True
+True
+.uno:Save
+none
+  
+  
+False
+True
+1
+  
+
+  
+  
+False
+True
+

[Libreoffice-commits] core.git: sc/sdi sc/source

2016-03-19 Thread Pranav Kant
 sc/sdi/scalc.sdi   |4 +--
 sc/source/ui/inc/tabview.hxx   |   15 ++
 sc/source/ui/view/cellsh4.cxx  |   31 +++--
 sc/source/ui/view/gridwin4.cxx |   11 ++
 sc/source/ui/view/tabview3.cxx |   43 +
 5 files changed, 100 insertions(+), 4 deletions(-)

New commits:
commit 0bd43b8c782135e5eb3018ee345a3bd409419a1b
Author: Pranav Kant 
Date:   Tue Mar 15 15:35:27 2016 +0530

sc lok: Extend uno commands: .uno:SelectRow/Column

Now also accepts a row/column index with modifier key to do various
selection/block selection/negative selection operations

Change-Id: Idfb56b94ca2eb4553eb9388b786f5d1e89448ec2
Reviewed-on: https://gerrit.libreoffice.org/23256
Tested-by: Jenkins 
Reviewed-by: Jan Holesovsky 

diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index 60a4bac..99a5313 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -4578,7 +4578,7 @@ SfxVoidItem SelectOLE SID_OLE_SELECT
 
 
 SfxVoidItem SelectColumn SID_SELECT_COL
-()
+(SfxInt32Item Col FN_PARAM_1,SfxInt16Item Modifier FN_PARAM_2)
 [
 AutoUpdate = FALSE,
 FastCall = FALSE,
@@ -4754,7 +4754,7 @@ SfxObjectItem Selection SID_SC_SELECTION
 
 
 SfxVoidItem SelectRow SID_SELECT_ROW
-()
+(SfxInt32Item Row FN_PARAM_1,SfxInt16Item Modifier FN_PARAM_2)
 [
 AutoUpdate = FALSE,
 FastCall = FALSE,
diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index cb6c65b..508af34 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -474,6 +474,21 @@ public:
 
 voidMarkColumns();
 voidMarkRows();
+
+/**
+ * @brief Called to select a full column
+ *
+ * @param nCol: Column number to do operation on
+ * @param nModifier:
+ */
+voidMarkColumns(SCCOL nCol, sal_Int16 nModifier);
+/**
+ * @brief Called to select a full row
+ *
+ * @param nRow: Row number to do operation on
+ * @param nModifier:
+ */
+voidMarkRows(SCROW nRow, sal_Int16 nModifier);
 voidMarkDataArea( bool bIncludeCursor = true );
 voidMarkMatrixFormula();
 voidUnmark();
diff --git a/sc/source/ui/view/cellsh4.cxx b/sc/source/ui/view/cellsh4.cxx
index 5fe24c6..aa8442d 100644
--- a/sc/source/ui/view/cellsh4.cxx
+++ b/sc/source/ui/view/cellsh4.cxx
@@ -275,6 +275,7 @@ void ScCellShell::ExecuteMove( SfxRequest& rReq )
 {
 ScTabViewShell* pTabViewShell   = GetViewData()->GetViewShell();
 sal_uInt16 nSlotId  = rReq.GetSlot();
+const SfxItemSet* pReqArgs = rReq.GetArgs();
 
 if(nSlotId != SID_CURSORTOPOFSCREEN && nSlotId != SID_CURSORENDOFSCREEN)
 pTabViewShell->ExecuteInputDirect();
@@ -316,11 +317,37 @@ void ScCellShell::ExecuteMove( SfxRequest& rReq )
 break;
 
 case SID_SELECT_COL:
-pTabViewShell->MarkColumns();
+{
+const SfxPoolItem* pColItem;
+const SfxPoolItem* pModifierItem;
+if ( pReqArgs && pReqArgs->HasItem( FN_PARAM_1,  ) &&
+ pReqArgs->HasItem( FN_PARAM_2,  ) )
+{
+SCCOL nCol = static_cast(static_cast(pColItem)->GetValue());;
+sal_Int16 nModifier = 
static_cast(static_cast(pModifierItem)->GetValue());
+
+pTabViewShell->MarkColumns( nCol, nModifier );
+}
+else
+pTabViewShell->MarkColumns();
+}
 break;
 
 case SID_SELECT_ROW:
-pTabViewShell->MarkRows();
+{
+const SfxPoolItem* pRowItem;
+const SfxPoolItem* pModifierItem;
+if ( pReqArgs && pReqArgs->HasItem( FN_PARAM_1,  ) &&
+ pReqArgs->HasItem( FN_PARAM_2,  ) )
+{
+SCROW nRow = static_cast(static_cast(pRowItem)->GetValue());;
+sal_Int16 nModifier = 
static_cast(static_cast(pModifierItem)->GetValue());
+
+pTabViewShell->MarkRows( nRow, nModifier );
+}
+else
+pTabViewShell->MarkRows();
+}
 break;
 
 case SID_SELECT_NONE:
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index e36bf90..95b6dfe 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -1609,6 +1609,17 @@ void ScGridWindow::GetSelectionRects( ::std::vector< 
Rectangle >& rPixelRects )
 if (nY2 > nYBottom)
 nY2 = nYBottom;
 }
+else
+{
+SCCOL nMaxTiledCol;
+SCROW nMaxTiledRow;
+pDoc->GetTiledRenderingArea( nTab, nMaxTiledCol, nMaxTiledRow );
+
+if (nX2 > nMaxTiledCol)
+nX2 = nMaxTiledCol;
+if (nY2 > nMaxTiledRow)
+ 

[Libreoffice-commits] core.git: sc/sdi sc/source

2015-09-15 Thread Justin Luth
 sc/sdi/editsh.sdi|2 ++
 sc/sdi/scalc.sdi |   24 
 sc/source/ui/view/editsh.cxx |   41 +
 3 files changed, 67 insertions(+)

New commits:
commit 7c9a484249da249dea7129ca93f5d1cbf5fbe462
Author: Justin Luth 
Date:   Mon Sep 14 07:39:25 2015 +0300

tdf#73691 - add alt-x support to calc

Alt-X (Unicode notation toggling) was added to Writer
and Draw/Impress in earlier.  This adds it to Calc as well.

Change-Id: Ieb5188b9ff35cb35941c36d22292069723df80b6
Reviewed-on: https://gerrit.libreoffice.org/18558
Tested-by: Jenkins 
Reviewed-by: Samuel Mehrbrodt 
Tested-by: Samuel Mehrbrodt 

diff --git a/sc/sdi/editsh.sdi b/sc/sdi/editsh.sdi
index 52cc6b4..b5c35c9 100644
--- a/sc/sdi/editsh.sdi
+++ b/sc/sdi/editsh.sdi
@@ -43,6 +43,8 @@ interface TableText
 SID_REDO[ ExecMethod = ExecuteUndo; StateMethod = 
GetUndoState; Export = FALSE; ]
 SID_REPEAT  [ ExecMethod = ExecuteUndo; StateMethod = 
GetUndoState; Export = FALSE; ]
 
+SID_UNICODE_NOTATION_TOGGLE [ ExecMethod = Execute; Export = FALSE; ]
+
  //  Attribute:
 SID_ATTR_CHAR_FONT  [ ExecMethod = ExecuteAttr; StateMethod = 
GetAttrState; Export = FALSE; ]
 SID_ATTR_CHAR_FONTHEIGHT[ ExecMethod = ExecuteAttr; StateMethod = 
GetAttrState; Export = FALSE; ]
diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index 1fade23..a33801b 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -8903,6 +8903,30 @@ SfxVoidItem ConvertFormulaToValue 
SID_CONVERT_FORMULA_TO_VALUE
 GroupId = GID_OPTIONS;
 ]
 
+SfxVoidItem UnicodeNotationToggle SID_UNICODE_NOTATION_TOGGLE
+()
+[
+/* flags: */
+AutoUpdate = FALSE,
+Cachable = Cachable,
+FastCall = FALSE,
+HasCoreId = FALSE,
+HasDialog = FALSE,
+ReadOnlyDoc = FALSE,
+Toggle = FALSE,
+Container = FALSE,
+RecordAbsolute = FALSE,
+RecordPerSet;
+Synchron;
+
+/* config: */
+AccelConfig = TRUE,
+MenuConfig = FALSE,
+StatusBarConfig = FALSE,
+ToolBoxConfig = FALSE,
+GroupId = GID_OPTIONS;
+]
+
 SfxVoidItem ShowDetail SID_OUTLINE_SHOW
 ()
 [
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index 846d780..c95251e 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -21,6 +21,7 @@
 #include 
 #include "scitems.hxx"
 #include 
+#include 
 
 #include 
 #include 
@@ -331,6 +332,46 @@ void ScEditShell::Execute( SfxRequest& rReq )
 bSetModified = false;
 }
 return;
+case SID_UNICODE_NOTATION_TOGGLE:
+{
+EditView* pActiveView = pHdl ? pHdl->GetActiveView() : 
pEditView;
+if( pActiveView )
+{
+OUString sInput = pEngine->GetText();
+ESelection aSel( pActiveView->GetSelection() );
+if( aSel.HasRange() )
+sInput = pActiveView->GetSelected();
+
+if( aSel.nStartPos > aSel.nEndPos )
+aSel.nEndPos = aSel.nStartPos;
+
+//calculate a valid end-position by reading logical 
characters
+sal_Int32 nUtf16Pos=0;
+while( (nUtf16Pos < sInput.getLength()) && (nUtf16Pos < 
aSel.nEndPos) )
+{
+sInput.iterateCodePoints();
+if( nUtf16Pos > aSel.nEndPos )
+aSel.nEndPos = nUtf16Pos;
+   }
+
+ToggleUnicodeCodepoint aToggle = ToggleUnicodeCodepoint();
+while( nUtf16Pos && aToggle.AllowMoreInput( 
sInput[nUtf16Pos-1]) )
+--nUtf16Pos;
+OUString sReplacement = aToggle.ReplacementString();
+if( !sReplacement.isEmpty() )
+{
+aSel.nStartPos = aSel.nEndPos - 
aToggle.StringToReplace().getLength();
+pTableView->SetSelection( aSel );
+pTableView->InsertText(sReplacement, true);
+if( pTopView )
+{
+pTopView->SetSelection( aSel );
+pTopView->InsertText(sReplacement, true);
+}
+}
+}
+}
+break;
 
 case SID_CHARMAP:
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/sdi sc/source

2015-08-09 Thread Julien Nabet
 sc/sdi/scalc.sdi  |6 +++---
 sc/source/ui/view/cellsh1.cxx |2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 958ec9ccfe3bbe54369f9e9105c10beae80d9548
Author: Julien Nabet serval2...@yahoo.fr
Date:   Sun Aug 9 12:30:40 2015 +0200

tdf#79741: Macro with Find @ Replace crash Calc

0x2f4bd163 in SfxItemSet::GetItemState (this=0x0, nWhich=26182, 
bSrchInParent=true, ppItem=0x7fff1730)
at 
/home/julien/compile-libreoffice/libreoffice/svl/source/items/itemset.cxx:422
422 SfxItemArray ppFnd = pAktSet-m_pItems;
(gdb) bt
0  0x2f4bd163 in SfxItemSet::GetItemState(unsigned short, bool, 
SfxPoolItem const**) const (this=0x0, nWhich=26182, bSrchInParent=true, 
ppItem=0x7fff1730)
at 
/home/julien/compile-libreoffice/libreoffice/svl/source/items/itemset.cxx:422
1  0x2f4bd306 in SfxItemSet::HasItem(unsigned short, SfxPoolItem 
const**) const (this=0x0, nWhich=26182, ppItem=0x7fff1730)
at 
/home/julien/compile-libreoffice/libreoffice/svl/source/items/itemset.cxx:463
2  0x2aaacd9902c9 in ScCellShell::ExecuteEdit(SfxRequest) 
(this=0x312fe10, rReq=...) at 
/home/julien/compile-libreoffice/libreoffice/sc/source/ui/view/cellsh1.cxx:1032

See https://gerrit.libreoffice.org/#/c/17603/ for details
Thank you Maxim!

Change-Id: Ie4cf31e3764c02f335830c59674a94acd6c209df
Reviewed-on: https://gerrit.libreoffice.org/17603
Reviewed-by: Maxim Monastirsky momonas...@gmail.com
Tested-by: Maxim Monastirsky momonas...@gmail.com

diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index 482107e..1fade23 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -3280,7 +3280,7 @@ SfxVoidItem SolverDialog SID_OPENDLG_OPTSOLVER
 ]
 
 SfxVoidItem SearchResultsDialog SID_SEARCH_RESULTS_DIALOG
-()
+(SfxBoolItem Visible SID_SEARCH_RESULTS_DIALOG)
 [
 /* flags: */
 AutoUpdate = FALSE,
@@ -3297,9 +3297,9 @@ SfxVoidItem SearchResultsDialog SID_SEARCH_RESULTS_DIALOG
 
 /* config: */
 AccelConfig = TRUE,
-MenuConfig = TRUE,
+MenuConfig = FALSE,
 StatusBarConfig = FALSE,
-ToolBoxConfig = TRUE,
+ToolBoxConfig = FALSE,
 GroupId = GID_OPTIONS;
 ]
 
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 254f543..54b28e1 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -1029,7 +1029,7 @@ void ScCellShell::ExecuteEdit( SfxRequest rReq )
 case SID_SEARCH_RESULTS_DIALOG:
 {
 const SfxPoolItem* pItem = NULL;
-if (pReqArgs-HasItem(SID_SEARCH_RESULTS_DIALOG, pItem))
+if (pReqArgs  pReqArgs-HasItem(SID_SEARCH_RESULTS_DIALOG, 
pItem))
 {
 bool bVisible = static_castconst 
SfxBoolItem*(pItem)-GetValue();
 SfxViewFrame* pViewFrm = pTabViewShell-GetViewFrame();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/sdi sc/source

2014-12-05 Thread Samuel Mehrbrodt
 sc/sdi/scalc.sdi   |2 +-
 sc/source/ui/view/tabvwsh3.cxx |   16 ++--
 sc/source/ui/view/tabvwsha.cxx |6 --
 3 files changed, 7 insertions(+), 17 deletions(-)

New commits:
commit 2f90974fd06870457301ec0be0ab8c43981689ec
Author: Samuel Mehrbrodt s.mehrbr...@gmail.com
Date:   Fri Dec 5 13:22:06 2014 +0100

fdo85897 Make 'Function List' only accessible in sidebar

Change-Id: I875d1dd75c02f617814a934b34b5099f9c2279cc

diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index e196e85..2fbf373 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -2866,7 +2866,7 @@ SfxVoidItem FreezePanes SID_WINDOW_FIX
 ]
 
 
-SfxBoolItem FunctionBox FID_FUNCTION_BOX
+SfxVoidItem FunctionBox FID_FUNCTION_BOX
 
 [
 /* flags: */
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index 312ff21..8253b37 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -25,6 +25,7 @@
 #include sfx2/dispatch.hxx
 #include sfx2/passwd.hxx
 #include sfx2/request.hxx
+#include sfx2/sidebar/Sidebar.hxx
 #include svl/ptitem.hxx
 #include svl/stritem.hxx
 #include tools/urlobj.hxx
@@ -540,16 +541,11 @@ void ScTabViewShell::Execute( SfxRequest rReq )
 
 case FID_FUNCTION_BOX:
 {
-sal_uInt16 nChildId = 
ScFunctionChildWindow::GetChildWindowId();
-if ( rReq.GetArgs() )
-pThisFrame-SetChildWindow( nChildId, static_castconst 
SfxBoolItem(rReq.GetArgs()-Get(FID_FUNCTION_BOX)).GetValue());
-else
-{
-pThisFrame-ToggleChildWindow( nChildId );
-rReq.AppendItem( SfxBoolItem( FID_FUNCTION_BOX , 
pThisFrame-HasChildWindow( nChildId ) ) );
-}
+// First make sure that the sidebar is visible
+pThisFrame-ShowChildWindow(SID_SIDEBAR);
 
-GetViewFrame()-GetBindings().Invalidate(FID_FUNCTION_BOX);
+::sfx2::sidebar::Sidebar::ShowPanel(FunctionsPanel,
+
pThisFrame-GetFrame().GetFrameInterface());
 rReq.Done ();
 }
 break;
@@ -1107,7 +1103,7 @@ void ScTabViewShell::Execute( SfxRequest rReq )
 break;
 
 default:
-OSL_FAIL(Unbekannter Slot bei ScTabViewShell::Execute);
+OSL_FAIL(Unknown Slot at ScTabViewShell::Execute);
 break;
 }
 }
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index e543588..6c2896d 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -152,7 +152,6 @@ void ScTabViewShell::GetState( SfxItemSet rSet )
 SCCOL   nPosX   = rViewData.GetCurX();
 SCROW   nPosY   = rViewData.GetCurY();
 SCTAB   nTab= rViewData.GetTabNo();
-sal_uInt16  nMyId   = 0;
 
 SfxViewFrame* pThisFrame = GetViewFrame();
 bool bOle = GetViewFrame()-GetFrame().IsInPlace();
@@ -344,11 +343,6 @@ void ScTabViewShell::GetState( SfxItemSet rSet )
 }
 break;
 
-case FID_FUNCTION_BOX:
-nMyId = ScFunctionChildWindow::GetChildWindowId();
-rSet.Put(SfxBoolItem(FID_FUNCTION_BOX, 
pThisFrame-HasChildWindow(nMyId)));
-break;
-
 case FID_PROTECT_DOC:
 {
 if ( pDocShell  pDocShell-IsDocShared() )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/sdi sc/source

2013-05-14 Thread Lennard Wasserthal
 sc/sdi/drawsh.sdi |1 +
 sc/source/ui/drawfunc/drawsh5.cxx |3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 9fa5c64eeb5d038a5fac25dfd80e72bd22b5ed18
Author: Lennard Wasserthal wassert...@nefkom.net
Date:   Sun May 12 17:50:12 2013 +0200

fdo#55582 calc part

Since the actual Patch for fdo#55582 hangs on the writer part,
I commit that bloody sc part NOW,
to appear as early as in 4.1.

Change-Id: I01ce4a7a7738304f47efc718c382a5b1dee68ea2
Signed-off-by: Lennard Wasserthal wassert...@nefkom.net
Reviewed-on: https://gerrit.libreoffice.org/3872
Reviewed-by: Bosdonnat Cedric cedric.bosdon...@free.fr
Tested-by: Bosdonnat Cedric cedric.bosdon...@free.fr

diff --git a/sc/sdi/drawsh.sdi b/sc/sdi/drawsh.sdi
index 6c9ec0b..ff8cd35 100644
--- a/sc/sdi/drawsh.sdi
+++ b/sc/sdi/drawsh.sdi
@@ -142,6 +142,7 @@ interface TableDraw
 SID_DELETE_CONTENTS [ ExecMethod = ExecDrawFunc; StateMethod = 
GetDrawFuncState; Export = FALSE; ]
 SID_CUT [ ExecMethod = ExecDrawFunc; StateMethod = 
GetDrawFuncState; Export = FALSE; ]
 SID_COPY[ ExecMethod = ExecDrawFunc; StateMethod = 
GetDrawFuncState; Export = FALSE; ]
+SID_PASTE   [ ExecMethod = ExecDrawFunc; StateMethod = 
GetDrawFuncState; Export = FALSE; ]
 SID_SELECTALL   [ ExecMethod = ExecDrawFunc; StateMethod = 
GetDrawFuncState; Export = FALSE; ]
 SID_OBJECT_ROTATE   [ ExecMethod = ExecDrawFunc; StateMethod = GetState; 
Export = FALSE; ]
 SID_OBJECT_MIRROR   [ ExecMethod = ExecDrawFunc; StateMethod = GetState; 
Export = FALSE; ]
diff --git a/sc/source/ui/drawfunc/drawsh5.cxx 
b/sc/source/ui/drawfunc/drawsh5.cxx
index 153ea16..8a82fda 100644
--- a/sc/source/ui/drawfunc/drawsh5.cxx
+++ b/sc/source/ui/drawfunc/drawsh5.cxx
@@ -23,6 +23,7 @@
 #include sfx2/request.hxx
 #include sfx2/bindings.hxx
 #include tools/urlobj.hxx
+#include cliputil.hxx
 #include svx/svxdlg.hxx
 #include svx/dialogs.hrc
 #include svx/fmglob.hxx
@@ -357,7 +358,7 @@ void ScDrawShell::ExecDrawFunc( SfxRequest rReq )
 break;
 
 case SID_PASTE:
-OSL_FAIL( SdrView::PasteClipboard not supported anymore );
+ScClipUtil::PasteFromClipboard ( GetViewData(), 
GetViewData()-GetViewShell(), true );
 break;
 
 case SID_SELECTALL:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits