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

2022-01-01 Thread scito (via logerrit)
 include/vcl/svapp.hxx|7 +++
 sc/source/core/tool/interpr5.cxx |9 +
 vcl/source/app/svapp.cxx |   18 --
 3 files changed, 28 insertions(+), 6 deletions(-)

New commits:
commit 4d0d4fb11f7251e0437ec8e6fe7b7693f3a31800
Author: scito 
AuthorDate: Thu Dec 30 13:25:38 2021 +0100
Commit: Eike Rathke 
CommitDate: Sat Jan 1 16:52:20 2022 +0100

tdf#140286 fix INFO("OSVERSION") for Linux: return kernel version

If LibreOffice Calc is running on Linux, the Linux version as shown in
about dialog is returned, e.g. "Linux 5.3".
MacOS and Windows parts are prepared, but  not implemented.
(I develop only on Linux.)

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

diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index b1db15915815..f4d065f1d664 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -901,6 +901,13 @@ public:
 */
 static OUString GetAppName();
 
+/**
+ * Get the OS version based on the OS specific implementation.
+ *
+ * @return OUString version string or "-" in case of problems
+ */
+static OUString GetOSVersion();
+
 /** Get useful OS, Hardware and configuration information,
  * cf. Help->About, and User-Agent
  * bSelection = 0 to return all info, 1 for environment only,
diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx
index 74807696e055..f29fd1eaf941 100644
--- a/sc/source/core/tool/interpr5.cxx
+++ b/sc/source/core/tool/interpr5.cxx
@@ -38,6 +38,7 @@
 #include 
 #include 
 #include 
+#include  //Application::
 
 #include 
 
@@ -3320,7 +3321,15 @@ void ScInterpreter::ScInfo()
 if( aStr == "SYSTEM" )
 PushString( SC_INFO_OSVERSION );
 else if( aStr == "OSVERSION" )
+#if (defined LINUX || defined __FreeBSD__)
+PushString(Application::GetOSVersion());
+#elif defined MACOSX
+// TODO tdf#140286 handle MACOSX version to get result compatible to 
Excel
+PushString("Windows (32-bit) NT 5.01");
+#else // handle Windows (WNT, WIN_NT, WIN32, _WIN32)
+// TODO tdf#140286 handle Windows version to get a result compatible 
to Excel
 PushString( "Windows (32-bit) NT 5.01" );
+#endif
 else if( aStr == "RELEASE" )
 PushString( ::utl::Bootstrap::getBuildIdData( OUString() ) );
 else if( aStr == "NUMFILE" )
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 66c030dd5501..f5e84b94bbd1 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -1152,9 +1152,19 @@ static OUString Localize(TranslateId aId, const bool 
bLocalize)
 return Translate::get(aId, Translate::Create("vcl", 
LanguageTag("en-US")));
 }
 
-OUString Application::GetHWOSConfInfo(const int bSelection, const bool 
bLocalize)
+OUString Application::GetOSVersion()
 {
 ImplSVData* pSVData = ImplGetSVData();
+OUString aVersion;
+if (pSVData && pSVData->mpDefInst)
+aVersion = pSVData->mpDefInst->getOSVersion();
+else
+aVersion = "-";
+return aVersion;
+}
+
+OUString Application::GetHWOSConfInfo(const int bSelection, const bool 
bLocalize)
+{
 OUStringBuffer aDetails;
 
 const auto appendDetails = [](std::u16string_view sep, auto&& 
val) {
@@ -1167,11 +1177,7 @@ OUString Application::GetHWOSConfInfo(const int 
bSelection, const bool bLocalize
 appendDetails(u"; ", Localize(SV_APP_CPUTHREADS, bLocalize)
 + 
OUString::number(std::thread::hardware_concurrency()));
 
-OUString aVersion;
-if ( pSVData && pSVData->mpDefInst )
-aVersion = pSVData->mpDefInst->getOSVersion();
-else
-aVersion = "-";
+OUString aVersion = GetOSVersion();
 
 appendDetails(u"; ", Localize(SV_APP_OSVERSION, bLocalize) + aVersion);
 }


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

2020-04-06 Thread Caolán McNamara (via logerrit)
 include/vcl/treelistbox.hxx|2 ++
 include/vcl/weld.hxx   |1 +
 sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx |1 +
 vcl/source/app/salvtables.cxx  |5 +
 vcl/source/treelist/treelistbox.cxx|   12 ++--
 vcl/unx/gtk3/gtk3gtkinst.cxx   |5 +
 6 files changed, 24 insertions(+), 2 deletions(-)

New commits:
commit 251fbdc642b9c27e9ad467322fb6d4e5c8f76a4c
Author: Caolán McNamara 
AuthorDate: Mon Apr 6 14:19:32 2020 +0100
Commit: Caolán McNamara 
CommitDate: Mon Apr 6 16:42:47 2020 +0200

unset dest dnd row highlight after drop

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

diff --git a/include/vcl/treelistbox.hxx b/include/vcl/treelistbox.hxx
index e56fd1081fb2..cce02a9286b6 100644
--- a/include/vcl/treelistbox.hxx
+++ b/include/vcl/treelistbox.hxx
@@ -278,6 +278,8 @@ private:
 VCL_DLLPRIVATE void DrawCustomEntry(vcl::RenderContext& rRenderContext, 
const tools::Rectangle& rRect, const SvTreeListEntry& rEntry);
 VCL_DLLPRIVATE Size MeasureCustomEntry(vcl::RenderContext& rRenderContext, 
const SvTreeListEntry& rEntry);
 
+void UnsetDropTarget();
+
 protected:
 
 boolCheckDragAndDropMode( SvTreeListBox const * pSource, 
sal_Int8 );
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index e8536e4a5660..3f3689fccc61 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -1096,6 +1096,7 @@ public:
 
 // for dnd
 virtual bool get_dest_row_at_pos(const Point& rPos, weld::TreeIter* 
pResult) = 0;
+virtual void unset_drag_dest_row() = 0;
 virtual tools::Rectangle get_row_area(const weld::TreeIter& rIter) const = 
0;
 // for dragging and dropping between TreeViews, return the active source
 virtual TreeView* get_drag_source() const = 0;
diff --git a/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx 
b/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx
index 2ae02800c032..c80b64b4a5c6 100644
--- a/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx
+++ b/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx
@@ -58,6 +58,7 @@ sal_Int8 ScPivotLayoutTreeDropTarget::ExecuteDrop( const 
ExecuteDropEvent& rEvt
 if (rWidget.get_dest_row_at_pos(rEvt.maPosPixel, xTarget.get()))
 nTargetPos = rWidget.get_iter_index_in_parent(*xTarget);
 m_rTreeView.InsertEntryForSourceTarget(*pSource, nTargetPos);
+rWidget.unset_drag_dest_row();
 return DND_ACTION_NONE;
 }
 
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 1ae61d3ee21a..14dab888e080 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -4564,6 +4564,11 @@ public:
 return pTarget != nullptr;
 }
 
+virtual void unset_drag_dest_row() override
+{
+m_xTreeView->UnsetDropTarget();
+}
+
 virtual tools::Rectangle get_row_area(const weld::TreeIter& rIter) const 
override
 {
 return m_xTreeView->GetBoundingRect(static_cast(rIter).iter);
diff --git a/vcl/source/treelist/treelistbox.cxx 
b/vcl/source/treelist/treelistbox.cxx
index f54e184356d4..274b61b906b5 100644
--- a/vcl/source/treelist/treelistbox.cxx
+++ b/vcl/source/treelist/treelistbox.cxx
@@ -1225,13 +1225,21 @@ nAction
 }
 #endif
 
-ImplShowTargetEmphasis( pTargetEntry, false );
+UnsetDropTarget();
 g_pDDSource = nullptr;
 g_pDDTarget = nullptr;
-pTargetEntry = nullptr;
 nDragDropMode = nOldDragMode;
 }
 
+void SvTreeListBox::UnsetDropTarget()
+{
+if (pTargetEntry)
+{
+ImplShowTargetEmphasis(pTargetEntry, false);
+pTargetEntry = nullptr;
+}
+}
+
 DragDropMode SvTreeListBox::NotifyStartDrag( TransferDataContainer&, 
SvTreeListEntry* )
 {
 return DragDropMode(0x);
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 63f5e710f817..8b644d22d1c5 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -10970,6 +10970,11 @@ public:
 return ret;
 }
 
+virtual void unset_drag_dest_row() override
+{
+gtk_tree_view_set_drag_dest_row(m_pTreeView, nullptr, 
GTK_TREE_VIEW_DROP_BEFORE);
+}
+
 virtual tools::Rectangle get_row_area(const weld::TreeIter& rIter) const 
override
 {
 tools::Rectangle aRet;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2019-05-24 Thread Thorsten Wagner (via logerrit)
 include/vcl/toolbox.hxx   |   15 +
 sc/source/ui/app/inputwin.cxx |  345 --
 sc/source/ui/inc/inputwin.hxx |   93 +++
 vcl/source/window/toolbox.cxx |  150 +-
 4 files changed, 383 insertions(+), 220 deletions(-)

New commits:
commit 04b60370a73b79e3aa0a04bc7cff45dff1db6286
Author: Thorsten Wagner 
AuthorDate: Tue May 21 13:36:32 2019 +0200
Commit: Eike Rathke 
CommitDate: Fri May 24 19:53:30 2019 +0200

tdf#101443 Calc multiline input bar reworked

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

diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx
index 19e02a0d85e7..8b43fa65d75b 100644
--- a/include/vcl/toolbox.hxx
+++ b/include/vcl/toolbox.hxx
@@ -68,11 +68,13 @@ enum class ToolBoxButtonSize
 Size32,
 };
 
-// ToolBoxLayoutMode::Normal   - traditional layout, items are centered in the 
toolbar
-// ToolBoxLayoutMode::LockVert - special mode (currently used for calc 
input/formula
-//   bar) where item's vertical position is locked, e.g.
-//   toolbox is prevented from centering the items
-enum class ToolBoxLayoutMode { Normal, LockVert };
+enum class ToolBoxLayoutMode
+{
+Normal,  // traditional layout, items are centered in the toolbar
+Locked   // horizontal positions of all items remain unchanged,
+ // vertical positions of items smaller than first item are 
aligned to first item's vertical center,
+ // vertical positions of items larger than first item remain 
unchanged
+};
 
 // Position of the text when icon and text are painted
 enum class ToolBoxTextPosition { Right, Bottom };
@@ -149,7 +151,8 @@ private:
 mbIsKeyEvent:1,
 mbChangingHighlight:1,
 mbImagesMirrored:1,
-mbLineSpacing:1;
+mbLineSpacing:1,
+mbIsArranged:1;
 WindowAlign meAlign;
 WindowAlign meDockAlign;
 ButtonType  meButtonType;
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 031546dc0f78..e206a3506669 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -72,14 +72,14 @@
 
 namespace com::sun::star::accessibility { class XAccessible; }
 
-#define THESIZE 100 // Should be more than enough!
-#define TBX_WINDOW_HEIGHT   22 // in pixel - TODO: The same on all systems?
-#define MULTILINE_BUTTON_WIDTH 20 // Width of the button which opens the 
multiline dropdown
-#define LEFT_OFFSET 5
-#define INPUTWIN_MULTILINES 6
-const long BUTTON_OFFSET = 2; ///< space between input line and the button to 
expand / collapse
-const long ADDITIONAL_BORDER = 1; ///< height of the line at the bottom
-const long ADDITIONAL_SPACE = 4; ///< additional vertical space when the 
multiline edit has more lines
+const long THESIZE = 100;// Should be more than enough!
+const long INPUTLINE_INSET_MARGIN = 2;   // Space between border and interior 
widgets of input line
+const long MIN_FONT_SIZE = 16;   // Minimum font size of input line in 
pixels
+const long LEFT_OFFSET = 5;  // Left offset of input line
+const long BUTTON_OFFSET = 2;// Space between input line and 
button to expand/collapse
+const long MULTILINE_BUTTON_WIDTH = 20;  // Width of the button which opens 
multiline dropdown
+const long INPUTWIN_MULTILINES = 6;  // Initial number of lines within 
multiline dropdown
+const long TOOLBOX_WINDOW_HEIGHT = 22;   // Height of toolbox window in pixels 
- TODO: The same on all systems?
 
 using com::sun::star::uno::Reference;
 using com::sun::star::uno::UNO_QUERY;
@@ -247,6 +247,8 @@ ScInputWindow::ScInputWindow( vcl::Window* pParent, const 
SfxBindings* pBind ) :
 else if (pViewSh)
 pViewSh->UpdateInputHandler(true); // Absolutely necessary update
 
+SetToolbarLayoutMode( ToolBoxLayoutMode::Locked );
+
 SetAccessibleName(ScResId(STR_ACC_TOOLBAR_FORMULA));
 }
 
@@ -390,10 +392,8 @@ void ScInputWindow::Paint(vcl::RenderContext& 
rRenderContext, const tools::Recta
 ToolBox::Paint(rRenderContext, rRect);
 
 // draw a line at the bottom to distinguish that from the grid
-// (we have space for that thanks to ADDITIONAL_BORDER)
 const StyleSettings& rStyleSettings = 
rRenderContext.GetSettings().GetStyleSettings();
 rRenderContext.SetLineColor(rStyleSettings.GetShadowColor());
-
 Size aSize = GetSizePixel();
 rRenderContext.DrawLine(Point(0, aSize.Height() - 1),
 Point(aSize.Width() - 1, aSize.Height() - 1));
@@ -402,21 +402,23 @@ void ScInputWindow::Paint(vcl::RenderContext& 
rRenderContext, const tools::Recta
 void ScInputWindow::Resize()
 {
 ToolBox::Resize();
-
 aTextWindow.Resize();

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

2019-05-24 Thread Noel Grandin (via logerrit)
 include/vcl/weld.hxx   |5 -
 sc/source/ui/miscdlgs/solvrdlg.cxx |2 +-
 vcl/source/app/salvtables.cxx  |7 +--
 vcl/unx/gtk3/gtk3gtkinst.cxx   |   11 +++
 4 files changed, 17 insertions(+), 8 deletions(-)

New commits:
commit b358bb95c04772a6ff00d7fcbb6fbef9d3dca13c
Author: Noel Grandin 
AuthorDate: Fri May 24 14:40:56 2019 +0200
Commit: Stephan Bergmann 
CommitDate: Fri May 24 16:09:56 2019 +0200

cannot create a shared_ptr from an existing object

so pass in the shared_ptr we already have (and enforce that we pass in
the right one)

Change-Id: Ic481b5ec17c34ed9cba50586dedb6184505dee24
Reviewed-on: https://gerrit.libreoffice.org/72908
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 71214ada80cf..af7271037a3b 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -403,7 +403,10 @@ private:
 public:
 virtual int run() = 0;
 // Run async without a controller
-virtual bool runAsync(const std::function& func) = 0;
+// @param self - must point to this, to enforce that the dialog was 
created/held by a shared_ptr
+virtual bool runAsync(std::shared_ptr const& rxSelf,
+  const std::function& func)
+= 0;
 virtual void response(int response) = 0;
 virtual void add_button(const OUString& rText, int response, const 
OString& rHelpId = OString())
 = 0;
diff --git a/sc/source/ui/miscdlgs/solvrdlg.cxx 
b/sc/source/ui/miscdlgs/solvrdlg.cxx
index 551e781cbf8a..25a36c30941d 100644
--- a/sc/source/ui/miscdlgs/solvrdlg.cxx
+++ b/sc/source/ui/miscdlgs/solvrdlg.cxx
@@ -38,7 +38,7 @@ namespace
 std::shared_ptr 
xBox(Application::CreateMessageDialog(pParent,
   VclMessageType::Warning, 
VclButtonsType::Ok,
   rString));
-xBox->runAsync(func);
+xBox->runAsync(xBox, func);
 }
 }
 
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 5c75d2f369a2..e68e3818dcbc 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -1199,10 +1199,13 @@ public:
 return m_xDialog->StartExecuteAsync(aCtx);
 }
 
-virtual bool runAsync(const std::function ) 
override
+virtual bool runAsync(std::shared_ptr const & rxSelf, const 
std::function ) override
 {
+assert( rxSelf.get() == this );
 VclAbstractDialog::AsyncContext aCtx;
-aCtx.mxOwnerSelf.reset(this);
+// In order to store a shared_ptr to ourself, we have to have been 
constructed by make_shared,
+// which is that rxSelf enforces.
+aCtx.mxOwnerSelf = rxSelf;
 aCtx.maEndDialogFn = rEndDialogFn;
 return m_xDialog->StartExecuteAsync(aCtx);
 }
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 39581793b406..263577731bdc 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -3004,7 +3004,7 @@ private:
 DialogRunner m_aDialogRun;
 std::shared_ptr m_xDialogController;
 // Used to keep ourself alive during a runAsync(when doing runAsync 
without a DialogController)
-std::shared_ptr m_xRunAsyncSelf;
+std::shared_ptr m_xRunAsyncSelf;
 std::function m_aFunc;
 gulong m_nCloseSignalId;
 gulong m_nResponseSignalId;
@@ -3088,11 +3088,14 @@ public:
 return true;
 }
 
-virtual bool runAsync(const std::function& func) override
+virtual bool runAsync(std::shared_ptr const & rxSelf, const 
std::function& func) override
 {
+assert( rxSelf.get() == this );
 assert(!m_nResponseSignalId);
 
-m_xRunAsyncSelf.reset(this);
+// In order to store a shared_ptr to ourself, we have to have been 
constructed by make_shared,
+// which is that rxSelf enforces.
+m_xRunAsyncSelf = rxSelf;
 m_aFunc = func;
 
 show();
@@ -4630,7 +4633,7 @@ void GtkInstanceDialog::asyncresponse(gint ret)
 m_aFunc(GtkToVcl(ret));
 m_aFunc = nullptr;
 // move the self pointer, otherwise it might be de-allocated by time we 
try to reset it
-std::shared_ptr me = std::move(m_xRunAsyncSelf);
+std::shared_ptr me = std::move(m_xRunAsyncSelf);
 m_xDialogController.reset();
 me.reset();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-01-25 Thread Libreoffice Gerrit user
 include/vcl/abstdlg.hxx|7 ++-
 include/vcl/weld.hxx   |2 ++
 sc/source/ui/miscdlgs/solvrdlg.cxx |   30 +++---
 vcl/source/app/salvtables.cxx  |   10 +-
 vcl/source/window/dialog.cxx   |9 ++---
 vcl/unx/gtk3/gtk3gtkinst.cxx   |   17 +
 6 files changed, 59 insertions(+), 16 deletions(-)

New commits:
commit bf359d01ac8b1e0292e8a92c38e58c03e6c17d8b
Author: Noel Grandin 
AuthorDate: Fri Jan 25 09:09:36 2019 +0200
Commit: Noel Grandin 
CommitDate: Sat Jan 26 07:41:06 2019 +0100

add a Dialog::runAsync for the non-controller case

.. and use it to make the solver warning dialogs async

Change-Id: I3589a1d3ae58190bf545bac1e2a95f81a114d44f
Reviewed-on: https://gerrit.libreoffice.org/66896
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/include/vcl/abstdlg.hxx b/include/vcl/abstdlg.hxx
index f000d92c26e5..71369c92057b 100644
--- a/include/vcl/abstdlg.hxx
+++ b/include/vcl/abstdlg.hxx
@@ -37,6 +37,7 @@ class Dialog;
 class BitmapEx;
 namespace weld
 {
+class Dialog;
 class DialogController;
 class Window;
 }
@@ -54,8 +55,12 @@ public:
 virtual short   Execute() = 0;
 
 struct AsyncContext {
+// for the case where the owner is the dialog itself, and the dialog 
is an unwelded VclPtr based dialog
 VclPtr mxOwner;
-std::shared_ptr mxOwnerDialog;
+// for the case where the dialog is welded, and owned by a 
DialogController
+std::shared_ptr mxOwnerDialogController;
+// for the case where the dialog is welded, and is running async 
without a DialogController
+std::shared_ptr mxOwnerSelf;
 std::function maEndDialogFn;
 bool isSet() { return !!maEndDialogFn; }
 };
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 91e77ce216a4..ea5576c35ce8 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -305,6 +305,8 @@ private:
 
 public:
 virtual int run() = 0;
+// Run async without a controller
+virtual bool runAsync(const std::function& func) = 0;
 virtual void response(int response) = 0;
 virtual void add_button(const OUString& rText, int response, const 
OString& rHelpId = OString())
 = 0;
diff --git a/sc/source/ui/miscdlgs/solvrdlg.cxx 
b/sc/source/ui/miscdlgs/solvrdlg.cxx
index c64802940ffa..4ed6da3b7d1c 100644
--- a/sc/source/ui/miscdlgs/solvrdlg.cxx
+++ b/sc/source/ui/miscdlgs/solvrdlg.cxx
@@ -33,12 +33,12 @@
 
 namespace
 {
-void lclErrorDialog(weld::Window* pParent, const OUString& rString)
+void lclErrorDialog(weld::Window* pParent, const OUString& rString, const 
std::function& func)
 {
-std::unique_ptr 
xBox(Application::CreateMessageDialog(pParent,
+std::shared_ptr 
xBox(Application::CreateMessageDialog(pParent,
   VclMessageType::Warning, 
VclButtonsType::Ok,
   rString));
-xBox->run();
+xBox->runAsync(func);
 }
 }
 
@@ -166,23 +166,31 @@ void ScSolverDlg::RaiseError( ScSolverErr eError )
 switch ( eError )
 {
 case SOLVERR_NOFORMULA:
-lclErrorDialog(GetFrameWeld() , errMsgNoFormula);
-m_pEdFormulaCell->GrabFocus();
+lclErrorDialog(GetFrameWeld(), errMsgNoFormula,
+[this](sal_Int32 /*nResult*/) {
+m_pEdFormulaCell->GrabFocus();
+});
 break;
 
 case SOLVERR_INVALID_FORMULA:
-lclErrorDialog(GetFrameWeld(), errMsgInvalidForm);
-m_pEdFormulaCell->GrabFocus();
+lclErrorDialog(GetFrameWeld(), errMsgInvalidForm,
+[this](sal_Int32 /*nResult*/) {
+m_pEdFormulaCell->GrabFocus();
+});
 break;
 
 case SOLVERR_INVALID_VARIABLE:
-lclErrorDialog(GetFrameWeld(), errMsgInvalidVar);
-m_pEdVariableCell->GrabFocus();
+lclErrorDialog(GetFrameWeld(), errMsgInvalidVar,
+[this](sal_Int32 /*nResult*/) {
+m_pEdVariableCell->GrabFocus();
+});
 break;
 
 case SOLVERR_INVALID_TARGETVALUE:
-lclErrorDialog(GetFrameWeld(), errMsgInvalidVal);
-m_pEdTargetVal->GrabFocus();
+lclErrorDialog(GetFrameWeld(), errMsgInvalidVal,
+[this](sal_Int32 /*nResult*/) {
+m_pEdTargetVal->GrabFocus();
+});
 break;
 }
 }
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index e1087b4f311c..823c4bb2a666 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -883,7 +883,15 @@ public:
 virtual bool runAsync(std::shared_ptr aOwner, 
const std::function ) override
 {
 VclAbstractDialog::AsyncContext aCtx;
-

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

2018-10-01 Thread Libreoffice Gerrit user
 include/vcl/menu.hxx |4 ++--
 include/vcl/menubtn.hxx  |3 ++-
 sc/source/ui/navipi/content.cxx  |4 ++--
 vcl/source/control/menubtn.cxx   |   11 ---
 vcl/source/window/menu.cxx   |   26 +-
 vcl/source/window/menufloatingwindow.cxx |9 -
 vcl/source/window/menuitemlist.cxx   |   11 ---
 vcl/source/window/menuitemlist.hxx   |1 -
 8 files changed, 31 insertions(+), 38 deletions(-)

New commits:
commit 38bef03742c94376a974f84693ff2e48693e6839
Author: Caolán McNamara 
AuthorDate: Mon Oct 1 13:10:10 2018 +0100
Commit: Caolán McNamara 
CommitDate: Mon Oct 1 18:06:21 2018 +0200

pass menuitem ident around directly, instead of deriving from itemid

sidestepping the while duplicate itemids in separate submenus problem

Change-Id: Icb57ac805f3c8c4fc3a68341e318375c6492cbb1
Reviewed-on: https://gerrit.libreoffice.org/61189
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx
index f865166c0b57..3d0e6cb09195 100644
--- a/include/vcl/menu.hxx
+++ b/include/vcl/menu.hxx
@@ -146,6 +146,7 @@ private:
 sal_uInt16 mnHighlightedItemPos; // for native menus: keeps track of the 
highlighted item
 MenuFlags nMenuFlags;
 sal_uInt16 nSelectedId;
+OString sSelectedIdent;
 
 // for output:
 sal_uInt16 nImgOrChkPos;
@@ -262,8 +263,7 @@ public:
 OString GetItemIdent(sal_uInt16 nItemId) const;
 MenuItemType GetItemType( sal_uInt16 nPos ) const;
 sal_uInt16 GetCurItemId() const { return nSelectedId;}
-OString GetCurItemIdent() const;
-OString GetItemIdentFromSubMenu(sal_uInt16 nItemId) const;
+OString GetCurItemIdent() const { return sSelectedIdent; }
 void SetItemBits( sal_uInt16 nItemId, MenuItemBits nBits );
 MenuItemBits GetItemBits( sal_uInt16 nItemId ) const;
 
diff --git a/include/vcl/menubtn.hxx b/include/vcl/menubtn.hxx
index b5c1e226a372..a76e3a3aba94 100644
--- a/include/vcl/menubtn.hxx
+++ b/include/vcl/menubtn.hxx
@@ -38,6 +38,7 @@ private:
 std::unique_ptr mpMenuTimer;
 VclPtr mpMenu;
 VclPtr  mpFloatingWindow;
+OString msCurItemIdent;
 sal_uInt16  mnCurItemId;
 boolmbDelayMenu;
 Link maActivateHdl;
@@ -81,7 +82,7 @@ public:
 voidSetPopover(Window* pWindow);
 
 sal_uInt16  GetCurItemId() const { return mnCurItemId; }
-OString GetCurItemIdent() const;
+OString GetCurItemIdent() const { return msCurItemIdent; }
 
 voidSetActivateHdl( const Link& rLink ) { 
maActivateHdl = rLink; }
 voidSetSelectHdl( const Link& rLink ) { 
maSelectHdl = rLink; }
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index 6ab4e597fa15..489a12de9739 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -668,8 +668,8 @@ void ScContentTree::Command( const CommandEvent& rCEvt )
 aPop->InsertItem( 2, pParentWindow->GetStrDisplay() );
 aPop->SetPopupMenu( 2, aDocMenu.get() );
 
-sal_uInt16 nSelected = aPop->Execute(this, 
rCEvt.GetMousePosPixel());
-OString sIdent = aPop->GetItemIdentFromSubMenu(nSelected);
+aPop->Execute(this, rCEvt.GetMousePosPixel());
+OString sIdent = aPop->GetCurItemIdent();
 
 if (sIdent.startsWith("document"))
 {
diff --git a/vcl/source/control/menubtn.cxx b/vcl/source/control/menubtn.cxx
index 8ffa935e9141..6aa89d937b8b 100644
--- a/vcl/source/control/menubtn.cxx
+++ b/vcl/source/control/menubtn.cxx
@@ -50,7 +50,9 @@ void MenuButton::ExecuteMenu()
 {
 Point aPos(0, 1);
 tools::Rectangle aRect(aPos, aSize );
-mnCurItemId = mpMenu->Execute(this, aRect, 
PopupMenuFlags::ExecuteDown);
+mpMenu->Execute(this, aRect, PopupMenuFlags::ExecuteDown);
+mnCurItemId = mpMenu->GetCurItemId();
+msCurItemIdent = mpMenu->GetCurItemIdent();
 }
 else
 {
@@ -70,6 +72,7 @@ void MenuButton::ExecuteMenu()
 {
 Select();
 mnCurItemId = 0;
+msCurItemIdent.clear();
 }
 }
 
@@ -107,12 +110,6 @@ bool MenuButton::MenuShown() const
 }
 }
 
-OString MenuButton::GetCurItemIdent() const
-{
-return (mnCurItemId && mpMenu) ?
-mpMenu->GetItemIdent(mnCurItemId) : OString();
-}
-
 MenuButton::MenuButton( vcl::Window* pParent, WinBits nWinBits )
 : PushButton(WindowType::MENUBUTTON)
 , mnCurItemId(0)
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index b92daf20f10c..d1adaf25211c 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -364,6 +364,7 @@ void Menu::Select()
 if ( pStartMenu && ( pStartMenu != this ) )
 {
 pStartMenu->nSelectedId = nSelectedId;
+  

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

2018-07-23 Thread Libreoffice Gerrit user
 include/vcl/menu.hxx   |2 +-
 sc/source/ui/navipi/content.cxx|2 +-
 vcl/source/window/menu.cxx |6 ++
 vcl/source/window/menuitemlist.cxx |   11 +++
 vcl/source/window/menuitemlist.hxx |1 +
 5 files changed, 20 insertions(+), 2 deletions(-)

New commits:
commit 7cc85bfd54645d3786828816972a2f039cb134e9
Author: SalimHabchi 
AuthorDate: Wed Jul 11 11:53:03 2018 +0200
Commit: Katarina Behrens 
CommitDate: Mon Jul 23 10:16:38 2018 +0200

tdf#118453 Reactivate navitagor submenu drag mode and display

I add a function to get the data from the submenu

Change-Id: If8aedc72abfc7ca967377f0e588167f9f62fe137
Reviewed-on: https://gerrit.libreoffice.org/57269
Tested-by: Jenkins
Reviewed-by: Katarina Behrens 

diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx
index 705486ab7356..f865166c0b57 100644
--- a/include/vcl/menu.hxx
+++ b/include/vcl/menu.hxx
@@ -263,7 +263,7 @@ public:
 MenuItemType GetItemType( sal_uInt16 nPos ) const;
 sal_uInt16 GetCurItemId() const { return nSelectedId;}
 OString GetCurItemIdent() const;
-
+OString GetItemIdentFromSubMenu(sal_uInt16 nItemId) const;
 void SetItemBits( sal_uInt16 nItemId, MenuItemBits nBits );
 MenuItemBits GetItemBits( sal_uInt16 nItemId ) const;
 
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index a0c709966c27..b800833e1b43 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -668,7 +668,7 @@ void ScContentTree::Command( const CommandEvent& rCEvt )
 aPop->SetPopupMenu( 2, aDocMenu.get() );
 
 sal_uInt16 nSelected = aPop->Execute(this, 
rCEvt.GetMousePosPixel());
-OString sIdent = aPop->GetItemIdent(nSelected);
+OString sIdent = aPop->GetItemIdentFromSubMenu(nSelected);
 
 if (sIdent.startsWith("document"))
 {
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index cf509a91374a..a1e3180ace35 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -702,6 +702,12 @@ OString Menu::GetItemIdent(sal_uInt16 nId) const
 return pData ? pData->sIdent : OString();
 }
 
+OString Menu::GetItemIdentFromSubMenu(sal_uInt16 nId) const
+{
+const MenuItemData* pData = pItemList->GetDataFromSubMenu(nId);
+return pData ? pData->sIdent : OString();
+}
+
 void Menu::SetItemBits( sal_uInt16 nItemId, MenuItemBits nBits )
 {
 MenuItemData* pData = pItemList->GetData( nItemId );
diff --git a/vcl/source/window/menuitemlist.cxx 
b/vcl/source/window/menuitemlist.cxx
index 7778a8004b53..1d63118af096 100644
--- a/vcl/source/window/menuitemlist.cxx
+++ b/vcl/source/window/menuitemlist.cxx
@@ -140,6 +140,17 @@ MenuItemData* MenuItemList::GetData( sal_uInt16 nSVId, 
size_t& rPos ) const
 return nullptr;
 }
 
+MenuItemData* MenuItemList::GetDataFromSubMenu(sal_uInt16 nSVId) const
+{
+for ( size_t i = 0, n = maItemList.size(); i < n; ++i )
+{
+if ( maItemList[i]->pSubMenu
+&& maItemList[i]->pSubMenu->GetCurItemId() != 0 ) // if something 
is selected
+return 
maItemList[i].get()->pSubMenu->GetItemList()->GetDataFromPos(nSVId - 1);
+}
+return nullptr;
+}
+
 MenuItemData* MenuItemList::SearchItem(
 sal_Unicode cSelectChar,
 KeyCode aKeyCode,
diff --git a/vcl/source/window/menuitemlist.hxx 
b/vcl/source/window/menuitemlist.hxx
index c25eae263dac..bb7ef90dc026 100644
--- a/vcl/source/window/menuitemlist.hxx
+++ b/vcl/source/window/menuitemlist.hxx
@@ -116,6 +116,7 @@ public:
 voidClear();
 
 MenuItemData*   GetData( sal_uInt16 nSVId, size_t& rPos ) const;
+MenuItemData*   GetDataFromSubMenu( sal_uInt16 nSVId ) const;
 MenuItemData*   GetData( sal_uInt16 nSVId ) const
 {
 size_t nTemp;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-26 Thread Jan Holesovsky
 include/vcl/dialog.hxx|4 +++-
 sc/source/ui/app/inputhdl.cxx |8 ++--
 vcl/source/window/msgbox.cxx  |1 +
 3 files changed, 10 insertions(+), 3 deletions(-)

New commits:
commit b8d5061f54408960177992d0f4be312b7d123167
Author: Jan Holesovsky 
Date:   Wed Feb 21 19:58:11 2018 +0100

sc lok: Make the Validation "Invalid value." message box working.

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

diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx
index 8695cc4fa632..e53a71782f3a 100644
--- a/include/vcl/dialog.hxx
+++ b/include/vcl/dialog.hxx
@@ -62,7 +62,6 @@ private:
 SAL_DLLPRIVATE voidRemoveFromDlgList();
 SAL_DLLPRIVATE voidImplInitDialogData();
 SAL_DLLPRIVATE voidImplInitSettings();
-SAL_DLLPRIVATE inline  void ImplLOKNotifier(vcl::Window* pParent);
 SAL_DLLPRIVATE VclPtr AddBorderWindow(vcl::Window* pParent, 
WinBits nBits);
 
 virtual void ApplySettings(vcl::RenderContext& rRenderContext) override;
@@ -77,6 +76,9 @@ protected:
 using Window::ImplInit;
 SAL_DLLPRIVATE voidImplInit( vcl::Window* pParent, WinBits nStyle, 
InitFlag eFlag = InitFlag::Default );
 
+/// Find and set the LOK notifier according to the pParent.
+void ImplLOKNotifier(vcl::Window* pParent);
+
 public:
 SAL_DLLPRIVATE boolIsInClose() const { return mbInClose; }
 virtualvoiddoDeferredInit(WinBits nBits) override;
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index dcbfba02d73b..bff453de38cd 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -2664,8 +2664,12 @@ void ScInputHandler::EnterHandler( ScEnterMode 
nBlockMode )
 if ( pActiveViewSh )// If it came from 
MouseButtonDown
 pActiveViewSh->StopMarking();   // (the InfoBox consumes 
the MouseButtonUp)
 
-//FIXME: We still run into problems if the input is triggered 
by activating another View
-vcl::Window* pParent = Application::GetDefDialogParent();
+vcl::Window* pParent = nullptr;
+if (pActiveViewSh)
+pParent = >GetViewFrame()->GetWindow();
+else
+pParent = Application::GetDefDialogParent();
+
 if ( pData->DoError( pParent, aString, aCursorPos ) )
 bForget = true; // Do not take over input
 }
diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx
index 8fbd0475c57d..efe8bfcfe175 100644
--- a/vcl/source/window/msgbox.cxx
+++ b/vcl/source/window/msgbox.cxx
@@ -130,6 +130,7 @@ MessBox::MessBox(vcl::Window* pParent, MessBoxStyle 
nMessBoxStyle, WinBits nWinB
 mnMessBoxStyle( nMessBoxStyle ),
 maMessText( rMessage )
 {
+ImplLOKNotifier(pParent);
 ImplInit(pParent, nWinBits | WB_MOVEABLE | WB_HORZ | WB_CENTER);
 ImplInitButtons();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-11-29 Thread Noel Grandin
 include/vcl/errcode.hxx   |5 
 sc/source/filter/xml/xmlimprt.hxx |  270 --
 vcl/source/helper/errcode.cxx |   15 --
 3 files changed, 290 deletions(-)

New commits:
commit 5ecc8e79d84c985fc5835b941924541c135c
Author: Noel Grandin 
Date:   Wed Nov 29 12:20:39 2017 +0200

loplugin:unusedenumconstants

Change-Id: Iebcd8688ec807aa61989b4622ea0d3eca5c4c671
Reviewed-on: https://gerrit.libreoffice.org/45478
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/include/vcl/errcode.hxx b/include/vcl/errcode.hxx
index 31582a79d962..4116a792c43e 100644
--- a/include/vcl/errcode.hxx
+++ b/include/vcl/errcode.hxx
@@ -148,18 +148,13 @@ VCL_DLLPUBLIC std::ostream& operator<<(std::ostream& os, 
const ErrCode& err);
 
 enum class ErrCodeArea {
 Io  = 0 ,
-Sv  = 1 ,
 Sfx = 2 ,
 Inet= 3 ,
 Vcl = 4 ,
 Svx = 8 ,
 So  = 9 ,
 Sbx = 10,
-Db  = 11,
-Java= 12,
 Uui = 13,
-Lib2= 14,
-Chaos   = 15,
 Sc  = 32,
 Sd  = 40,
 Sw  = 56,
diff --git a/sc/source/filter/xml/xmlimprt.hxx 
b/sc/source/filter/xml/xmlimprt.hxx
index 89a9cbb0c99a..6cf664bdcf8d 100644
--- a/sc/source/filter/xml/xmlimprt.hxx
+++ b/sc/source/filter/xml/xmlimprt.hxx
@@ -242,276 +242,6 @@ enum ScXMLAnnotationAttrTokens
 XML_TOK_TABLE_ANNOTATION_ATTR_Y
 };
 
-enum ScXMLDetectiveElemTokens
-{
-XML_TOK_DETECTIVE_ELEM_HIGHLIGHTED,
-XML_TOK_DETECTIVE_ELEM_OPERATION
-};
-
-enum ScXMLDetectiveHighlightedAttrTokens
-{
-XML_TOK_DETECTIVE_HIGHLIGHTED_ATTR_CELL_RANGE,
-XML_TOK_DETECTIVE_HIGHLIGHTED_ATTR_DIRECTION,
-XML_TOK_DETECTIVE_HIGHLIGHTED_ATTR_CONTAINS_ERROR,
-XML_TOK_DETECTIVE_HIGHLIGHTED_ATTR_MARKED_INVALID
-};
-
-enum ScXMLDetectiveOperationAttrTokens
-{
-XML_TOK_DETECTIVE_OPERATION_ATTR_NAME,
-XML_TOK_DETECTIVE_OPERATION_ATTR_INDEX
-};
-
-enum ScXMLCellRangeSourceAttrTokens
-{
-XML_TOK_TABLE_CELL_RANGE_SOURCE_ATTR_NAME,
-XML_TOK_TABLE_CELL_RANGE_SOURCE_ATTR_HREF,
-XML_TOK_TABLE_CELL_RANGE_SOURCE_ATTR_FILTER_NAME,
-XML_TOK_TABLE_CELL_RANGE_SOURCE_ATTR_FILTER_OPTIONS,
-XML_TOK_TABLE_CELL_RANGE_SOURCE_ATTR_LAST_COLUMN,
-XML_TOK_TABLE_CELL_RANGE_SOURCE_ATTR_LAST_ROW,
-XML_TOK_TABLE_CELL_RANGE_SOURCE_ATTR_REFRESH_DELAY
-};
-
-enum ScXMLDatabaseRangeSourceSQLAttrTokens
-{
-XML_TOK_SOURCE_SQL_ATTR_DATABASE_NAME,
-XML_TOK_SOURCE_SQL_ATTR_HREF,
-XML_TOK_SOURCE_SQL_ATTR_CONNECTION_RESOURCE,
-XML_TOK_SOURCE_SQL_ATTR_SQL_STATEMENT,
-XML_TOK_SOURCE_SQL_ATTR_PARSE_SQL_STATEMENT
-};
-
-enum ScXMLDatabaseRangeSourceTableAttrTokens
-{
-XML_TOK_SOURCE_TABLE_ATTR_DATABASE_NAME,
-XML_TOK_SOURCE_TABLE_ATTR_HREF,
-XML_TOK_SOURCE_TABLE_ATTR_CONNECTION_RESOURCE,
-XML_TOK_SOURCE_TABLE_ATTR_TABLE_NAME
-};
-
-enum ScXMLDatabaseRangeSourceQueryAttrTokens
-{
-XML_TOK_SOURCE_QUERY_ATTR_DATABASE_NAME,
-XML_TOK_SOURCE_QUERY_ATTR_HREF,
-XML_TOK_SOURCE_QUERY_ATTR_CONNECTION_RESOURCE,
-XML_TOK_SOURCE_QUERY_ATTR_QUERY_NAME
-};
-
-enum ScXMLFilterTokens
-{
-XML_TOK_FILTER_AND,
-XML_TOK_FILTER_OR,
-XML_TOK_FILTER_CONDITION
-};
-
-enum ScXMLFilterAttrTokens
-{
-XML_TOK_FILTER_ATTR_TARGET_RANGE_ADDRESS,
-XML_TOK_FILTER_ATTR_CONDITION_SOURCE_RANGE_ADDRESS,
-XML_TOK_FILTER_ATTR_CONDITION_SOURCE,
-XML_TOK_FILTER_ATTR_DISPLAY_DUPLICATES
-};
-
-enum ScXMLFilterConditionElemTokens
-{
-XML_TOK_CONDITION_FILTER_SET_ITEM
-};
-
-enum ScXMLFilterConditionAttrTokens
-{
-XML_TOK_CONDITION_ATTR_FIELD_NUMBER,
-XML_TOK_CONDITION_ATTR_CASE_SENSITIVE,
-XML_TOK_CONDITION_ATTR_DATA_TYPE,
-XML_TOK_CONDITION_ATTR_VALUE,
-XML_TOK_CONDITION_ATTR_OPERATOR
-};
-
-enum ScXMLFilterSetItemAttrTokens
-{
-XML_TOK_FILTER_SET_ITEM_ATTR_VALUE
-};
-
-enum ScXMLSortTokens
-{
-XML_TOK_SORT_SORT_BY
-};
-
-enum ScXMLSortSortByAttrTokens
-{
-XML_TOK_SORT_BY_ATTR_FIELD_NUMBER,
-XML_TOK_SORT_BY_ATTR_DATA_TYPE,
-XML_TOK_SORT_BY_ATTR_ORDER
-};
-
-enum ScXMLDataPilotTablesElemTokens
-{
-XML_TOK_DATA_PILOT_TABLE
-};
-
-enum ScXMLDataPilotTableAttrTokens
-{
-XML_TOK_DATA_PILOT_TABLE_ATTR_NAME,
-XML_TOK_DATA_PILOT_TABLE_ATTR_APPLICATION_DATA,
-XML_TOK_DATA_PILOT_TABLE_ATTR_GRAND_TOTAL,
-XML_TOK_DATA_PILOT_TABLE_ATTR_IGNORE_EMPTY_ROWS,
-XML_TOK_DATA_PILOT_TABLE_ATTR_IDENTIFY_CATEGORIES,
-XML_TOK_DATA_PILOT_TABLE_ATTR_TARGET_RANGE_ADDRESS,
-XML_TOK_DATA_PILOT_TABLE_ATTR_BUTTONS,
-XML_TOK_DATA_PILOT_TABLE_ATTR_SHOW_FILTER_BUTTON,
-XML_TOK_DATA_PILOT_TABLE_ATTR_DRILL_DOWN,
-XML_TOK_DATA_PILOT_TABLE_ATTR_HEADER_GRID_LAYOUT
-};
-
-enum 

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

2016-07-11 Thread Caolán McNamara
 include/vcl/dialog.hxx|1 
 include/vcl/syswin.hxx|1 
 sc/source/ui/src/scstring.src |2 -
 vcl/source/window/dialog.cxx  |   48 ---
 vcl/source/window/syswin.cxx  |   51 ++
 vcl/source/window/winproc.cxx |   17 +-
 6 files changed, 64 insertions(+), 56 deletions(-)

New commits:
commit 545d5157f26b7fd3c5648ae6e727b1e1addca68f
Author: Caolán McNamara 
Date:   Mon Jul 11 13:01:52 2016 +0100

Resolves: tdf#95729 move 'alt' accel enable/disable down to systemwindow

from dialog and send the 'alt' to the active floating window, if there
is one, before trying the menubar.

so popups like the calc autofilter one can display their accelerators
when alt is pressed

Change-Id: I52e45b72885b1b0a7362cecc30e41d218a48a58d

diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx
index ecf086d8..466b3e3 100644
--- a/include/vcl/dialog.hxx
+++ b/include/vcl/dialog.hxx
@@ -105,7 +105,6 @@ public:
 private:
 boolImplStartExecuteModal();
 static void ImplEndExecuteModal();
-boolImplHandleCmdEvent ( const CommandEvent& rCEvent );
 public:
 
 // Dialog::Execute replacement API
diff --git a/include/vcl/syswin.hxx b/include/vcl/syswin.hxx
index 3ea4dcb..eb2e82a 100644
--- a/include/vcl/syswin.hxx
+++ b/include/vcl/syswin.hxx
@@ -179,6 +179,7 @@ public:
 private:
 SAL_DLLPRIVATE void ImplMoveToScreen( long& io_rX, long& io_rY, long 
i_nWidth, long i_nHeight, vcl::Window* i_pConfigureWin );
 virtual void setPosSizeOnContainee(Size aSize, Window );
+boolImplHandleCmdEvent ( const CommandEvent& rCEvent );
 DECL_DLLPRIVATE_LINK_TYPED( ImplHandleLayoutTimerHdl, Idle*, void );
 
 protected:
diff --git a/sc/source/ui/src/scstring.src b/sc/source/ui/src/scstring.src
index 82e5e62..2da99e2 100644
--- a/sc/source/ui/src/scstring.src
+++ b/sc/source/ui/src/scstring.src
@@ -98,7 +98,7 @@ String SCSTR_MULTIPLE
 
 String SCSTR_STDFILTER
 {
-Text [ en-US ] = "~Standard Filter..." ;
+Text [ en-US ] = "Standard Filter..." ;
 };
 
 String SCSTR_TOP10FILTER
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 9a872bd..63657f5 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -240,16 +240,6 @@ void ImplWindowAutoMnemonic( vcl::Window* pWindow )
 }
 }
 
-void ImplHandleControlAccelerator( vcl::Window* pWindow, bool bShow )
-{
-Control *pControl = dynamic_cast(pWindow->ImplGetWindow());
-if (pControl && pControl->GetText().indexOf('~') != -1)
-{
-pControl->SetShowAccelerator( bShow );
-pControl->Invalidate(InvalidateFlags::Update);
-}
-}
-
 static VclButtonBox* getActionArea(Dialog *pDialog)
 {
 VclButtonBox *pButtonBox = nullptr;
@@ -597,39 +587,6 @@ IMPL_LINK_NOARG_TYPED(Dialog, ImplAsyncCloseHdl, void*, 
void)
 Close();
 }
 
-bool Dialog::ImplHandleCmdEvent( const CommandEvent& rCEvent )
-{
-if (rCEvent.GetCommand() == CommandEventId::ModKeyChange)
-{
-const CommandModKeyData *pCData = rCEvent.GetModKeyData ();
-bool bShowAccel =  pCData && pCData->IsMod2();
-
-Window *pGetChild = firstLogicalChildOfParent(this);
-while (pGetChild)
-{
-if ( pGetChild->GetType() == WINDOW_TABCONTROL )
-{
- // find currently shown tab page
- TabControl* pTabControl = static_cast( pGetChild 
);
- TabPage* pTabPage = pTabControl->GetTabPage( 
pTabControl->GetCurPageId() );
- vcl::Window* pTabPageChild =  firstLogicalChildOfParent( 
pTabPage );
-
- // and go through its children
- while ( pTabPageChild )
- {
- ImplHandleControlAccelerator(pTabPageChild, bShowAccel);
- pTabPageChild = nextLogicalChildOfParent(pTabPage, 
pTabPageChild);
- }
-}
-
-ImplHandleControlAccelerator( pGetChild, bShowAccel );
-pGetChild = nextLogicalChildOfParent(this, pGetChild);
-}
-return true;
-}
-return false;
-}
-
 bool Dialog::Notify( NotifyEvent& rNEvt )
 {
 // first call the base class due to Tab control
@@ -672,11 +629,6 @@ bool Dialog::Notify( NotifyEvent& rNEvt )
 
 }
 }
-else if (rNEvt.GetType() == MouseNotifyEvent::COMMAND)
-{
-if (ImplHandleCmdEvent( *rNEvt.GetCommandEvent()))
-return true;
-}
 }
 
 return bRet;
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index 242b98a..8e8e5fb 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -31,6 +31,9 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
 
 #include 
 
@@ -116,6 +119,49 @@ void SystemWindow::dispose()
 

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

2016-05-31 Thread Noel Grandin
 include/vcl/toolbox.hxx   |6 +++---
 sc/source/ui/app/inputwin.cxx |4 ++--
 vcl/source/window/toolbox.cxx |8 
 3 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit 5ca16c7b3153395d9107f84d366c796a22930756
Author: Noel Grandin 
Date:   Mon May 30 17:00:28 2016 +0200

Convert ToolBoxLayoutMode to scoped enum

Change-Id: I95b2432fc9f4df8d055227331a44151af4d773ab
Reviewed-on: https://gerrit.libreoffice.org/25672
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx
index 95cc60b..f87e8ef 100644
--- a/include/vcl/toolbox.hxx
+++ b/include/vcl/toolbox.hxx
@@ -62,11 +62,11 @@ namespace o3tl
 // dontcare will let the toolbox decide about its size
 enum ToolBoxButtonSize { TOOLBOX_BUTTONSIZE_DONTCARE, 
TOOLBOX_BUTTONSIZE_SMALL, TOOLBOX_BUTTONSIZE_LARGE };
 
-// TBX_LAYOUT_NORMAL   - traditional layout, items are centered in the toolbar
-// TBX_LAYOUT_LOCKVERT - special mode (currently used for calc input/formula
+// ToolBoxLayoutMode::Normal   - traditional layout, items are centered in the 
toolbar
+// ToolBoxLayoutMode::LockVert - special mode (currently used for calc 
input/formula
 //   bar) where item's vertical position is locked, e.g.
 //   toolbox is prevented from centering the items
-enum ToolBoxLayoutMode { TBX_LAYOUT_NORMAL, TBX_LAYOUT_LOCKVERT };
+enum class ToolBoxLayoutMode { Normal, LockVert };
 
 struct ImplToolSize
 {
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 882dfdd..dc46535 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1086,9 +1086,9 @@ void ScInputBarGroup::TriggerToolboxLayout()
 if ( xLayoutManager.is() )
 {
 if ( maTextWnd->GetNumLines() > 1)
-rParent.SetToolbarLayoutMode( TBX_LAYOUT_LOCKVERT );
+rParent.SetToolbarLayoutMode( ToolBoxLayoutMode::LockVert );
 else
-rParent.SetToolbarLayoutMode( TBX_LAYOUT_NORMAL );
+rParent.SetToolbarLayoutMode( ToolBoxLayoutMode::Normal );
 xLayoutManager->lock();
 DataChangedEvent aFakeUpdate( DataChangedEventType::SETTINGS, 
nullptr,  AllSettingsFlags::STYLE );
 
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 7327a5e..f75a03a 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -1382,7 +1382,7 @@ void ToolBox::ImplInitToolBoxData()
 meDockAlign   = WindowAlign::Top;
 meLastStyle   = PointerStyle::Arrow;
 mnWinStyle= 0;
-meLayoutMode  = TBX_LAYOUT_NORMAL;
+meLayoutMode  = ToolBoxLayoutMode::Normal;
 mnLastFocusItemId = 0;
 mnKeyModifier = 0;
 mnActivateCount   = 0;
@@ -2545,13 +2545,13 @@ void ToolBox::ImplFormat( bool bResize )
 if ( mbHorz )
 {
 it->maCalcRect.Left() = nX;
-// if special TBX_LAYOUT_LOCKVERT lock vertical 
position
+// if special ToolBoxLayoutMode::LockVert lock 
vertical position
 // don't recalculate the vertical position of the item
-if ( meLayoutMode == TBX_LAYOUT_LOCKVERT && mnLines == 
1 )
+if ( meLayoutMode == ToolBoxLayoutMode::LockVert && 
mnLines == 1 )
 {
 // Somewhat of a hack here, calc deletes and 
re-adds
 // the sum/assign & ok/cancel items dynamically.
-// Because TBX_LAYOUT_LOCKVERT effectively prevents
+// Because ToolBoxLayoutMode::LockVert effectively 
prevents
 // recalculation of the vertical pos of an item the
 // it->maRect.Top() for those newly added items is
 // 0. The hack here is that we want to effectively
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-05-30 Thread Katarina Behrens
 include/vcl/window.hxx  |   10 ++
 sc/source/ui/dbgui/scuiimoptdlg.cxx |   10 --
 sc/source/ui/inc/scuiimoptdlg.hxx   |3 +++
 vcl/source/window/window2.cxx   |5 +
 4 files changed, 26 insertions(+), 2 deletions(-)

New commits:
commit 697eaa91bd008e992b325e05ce3f20853ad965f7
Author: Katarina Behrens 
Date:   Wed May 25 16:10:23 2016 +0200

tdf#100068: Initial implementation of ScreenshotId

it's the same as HelpId in default implementation and extended with
'=?config=foo' string otherwise, depending on different configurations
the dialog/tabpage can have (e.g. different widgets hidden/shown)

Change-Id: I01312a5a88ef7ba784bca315b336420cdb63c8dc
Reviewed-on: https://gerrit.libreoffice.org/25455
Reviewed-by: Katarina Behrens 
Tested-by: Katarina Behrens 

diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 62e8c64..e93870c 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -1180,6 +1180,16 @@ public:
 voidSetHelpId( const OString& );
 const OString&  GetHelpId() const;
 
+/** String ID of this window for the purpose of creating a screenshot
+
+In default implementation this ID is the same as HelpId. Override this 
method
+in windows (dialogs,tabpages) that need different IDs for different 
configurations
+they can be in
+
+@return screenshot ID of this window
+*/
+virtual OString GetScreenshotId() const;
+
 vcl::Window*FindWindow( const Point& rPos ) const;
 
 sal_uInt16  GetChildCount() const;
diff --git a/sc/source/ui/dbgui/scuiimoptdlg.cxx 
b/sc/source/ui/dbgui/scuiimoptdlg.cxx
index 114ec3c..a32b361 100644
--- a/sc/source/ui/dbgui/scuiimoptdlg.cxx
+++ b/sc/source/ui/dbgui/scuiimoptdlg.cxx
@@ -107,7 +107,8 @@ ScImportOptionsDlg::ScImportOptionsDlg(
 boolbOnlyDbtoolsEncodings,
 boolbImport )
 :   ModalDialog ( pParent, "ImOptDialog",
-"modules/scalc/ui/imoptdialog.ui" )
+"modules/scalc/ui/imoptdialog.ui" ),
+m_bIsAsciiImport( bAscii )
 {
 get(m_pFieldFrame, "fieldframe");
 get(m_pFtCharset, "charsetft");
@@ -291,7 +292,7 @@ sal_uInt16 ScImportOptionsDlg::GetCodeFromCombo( const 
ComboBox& rEd ) const
 
 if ( aStr.isEmpty() )
 {
-nCode = 0;  // kein Trennzeichen
+nCode = 0;  // no separator
 }
 else
 {
@@ -304,6 +305,11 @@ sal_uInt16 ScImportOptionsDlg::GetCodeFromCombo( const 
ComboBox& rEd ) const
 return nCode;
 }
 
+OString ScImportOptionsDlg::GetScreenshotId() const
+{
+return (m_bIsAsciiImport) ? GetHelpId() : GetHelpId() + 
"?config=NonTextImport";
+}
+
 IMPL_LINK_TYPED( ScImportOptionsDlg, FixedWidthHdl, Button*, pCheckBox, void )
 {
 if (pCheckBox == m_pCbFixed)
diff --git a/sc/source/ui/inc/scuiimoptdlg.hxx 
b/sc/source/ui/inc/scuiimoptdlg.hxx
index 9848e33..f4a29ca 100644
--- a/sc/source/ui/inc/scuiimoptdlg.hxx
+++ b/sc/source/ui/inc/scuiimoptdlg.hxx
@@ -40,6 +40,7 @@ public:
 virtual void dispose() override;
 
 void GetImportOptions( ScImportOptions& rOptions ) const;
+virtual OString GetScreenshotId() const override;
 
 private:
 VclPtr   m_pFieldFrame;
@@ -60,6 +61,8 @@ private:
 ScDelimiterTable*   pFieldSepTab;
 ScDelimiterTable*   pTextSepTab;
 
+bool m_bIsAsciiImport;
+
 private:
 sal_uInt16 GetCodeFromCombo( const ComboBox& rEd ) const;
 
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 00475f1..801943b 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -909,6 +909,11 @@ const OString& Window::GetHelpId() const
 return mpWindowImpl->maHelpId;
 }
 
+OString Window::GetScreenshotId() const
+{
+return GetHelpId();
+}
+
 // - old inline methods ---
 
 vcl::Window* Window::ImplGetWindow()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-01-07 Thread Chris Sherlock
 include/vcl/ITiledRenderable.hxx  |4 ++--
 sc/source/ui/unoobj/docuno.cxx|   24 
 vcl/source/filter/jpeg/transupp.c |2 +-
 3 files changed, 15 insertions(+), 15 deletions(-)

New commits:
commit 3f787ee4ad062fc5c14d783140a1d9d67e79af41
Author: Chris Sherlock 
Date:   Fri Jan 8 15:47:42 2016 +1100

vcl: fix WaE messages

Change-Id: Ib861efdaa9e18a22fb967bcef251792c9b9f5768
Reviewed-on: https://gerrit.libreoffice.org/21240
Tested-by: Jenkins 
Reviewed-by: Chris Sherlock 

diff --git a/include/vcl/ITiledRenderable.hxx b/include/vcl/ITiledRenderable.hxx
index ba77330..a1e1d80 100644
--- a/include/vcl/ITiledRenderable.hxx
+++ b/include/vcl/ITiledRenderable.hxx
@@ -23,8 +23,8 @@ namespace vcl
 class VCL_DLLPUBLIC ITiledRenderable
 {
 protected:
-int nTilePixelWidth, nTilePixelHeight;
-int nTileTwipWidth, nTileTwipHeight;
+int mnTilePixelWidth, mnTilePixelHeight;
+int mnTileTwipWidth, mnTileTwipHeight;
 public:
 virtual ~ITiledRenderable();
 
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 2bdab21..18fe18d 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -603,8 +603,8 @@ void ScModelObj::postMouseEvent(int nType, int nX, int nY, 
int nCount, int nButt
 return;
 
 // update the aLogicMode in ScViewData to something predictable
-pViewData->SetZoom(Fraction(nTilePixelWidth * TWIPS_PER_PIXEL, 
nTileTwipWidth),
-   Fraction(nTilePixelHeight * TWIPS_PER_PIXEL, 
nTileTwipHeight), true);
+pViewData->SetZoom(Fraction(mnTilePixelWidth * TWIPS_PER_PIXEL, 
mnTileTwipWidth),
+   Fraction(mnTilePixelHeight * TWIPS_PER_PIXEL, 
mnTileTwipHeight), true);
 
 // Calc operates in pixels...
 MouseEvent aEvent(Point(nX * pViewData->GetPPTX(), nY * 
pViewData->GetPPTY()), nCount,
@@ -874,10 +874,10 @@ bool ScModelObj::isMimeTypeSupported()
 
 void ScModelObj::setClientZoom(int nTilePixelWidth_, int nTilePixelHeight_, 
int nTileTwipWidth_, int nTileTwipHeight_)
 {
-nTilePixelWidth = nTilePixelWidth_;
-nTilePixelHeight = nTilePixelHeight_;
-nTileTwipWidth = nTileTwipWidth_;
-nTileTwipHeight = nTileTwipHeight_;
+mnTilePixelWidth = nTilePixelWidth_;
+mnTilePixelHeight = nTilePixelHeight_;
+mnTileTwipWidth = nTileTwipWidth_;
+mnTileTwipHeight = nTileTwipHeight_;
 }
 
 OUString ScModelObj::getRowColumnHeaders(const Rectangle& rRectangle)
@@ -888,8 +888,8 @@ OUString ScModelObj::getRowColumnHeaders(const Rectangle& 
rRectangle)
 return OUString();
 
 // update the aLogicMode in ScViewData to something predictable
-pViewData->SetZoom(Fraction(nTilePixelWidth * TWIPS_PER_PIXEL, 
nTileTwipWidth),
-   Fraction(nTilePixelHeight * TWIPS_PER_PIXEL, 
nTileTwipHeight), true);
+pViewData->SetZoom(Fraction(mnTilePixelWidth * TWIPS_PER_PIXEL, 
mnTileTwipWidth),
+   Fraction(mnTilePixelHeight * TWIPS_PER_PIXEL, 
mnTileTwipHeight), true);
 
 ScTabView* pTabView = pViewData->GetView();
 if (!pTabView)
@@ -942,11 +942,11 @@ void ScModelObj::initializeForTiledRendering(const 
css::uno::SequenceCalcOutputFactor();
 
 // default tile size in pixels
-nTilePixelWidth = 256;
-nTilePixelHeight = 256;
+mnTilePixelWidth = 256;
+mnTilePixelHeight = 256;
 // the default zoom level will be 1
-nTileTwipWidth = nTilePixelWidth * TWIPS_PER_PIXEL;
-nTileTwipHeight = nTilePixelHeight * TWIPS_PER_PIXEL;
+mnTileTwipWidth = mnTilePixelWidth * TWIPS_PER_PIXEL;
+mnTileTwipHeight = mnTilePixelHeight * TWIPS_PER_PIXEL;
 }
 
 uno::Any SAL_CALL ScModelObj::queryInterface( const uno::Type& rType )
diff --git a/vcl/source/filter/jpeg/transupp.c 
b/vcl/source/filter/jpeg/transupp.c
index e9fbbd0..4530be0 100644
--- a/vcl/source/filter/jpeg/transupp.c
+++ b/vcl/source/filter/jpeg/transupp.c
@@ -16,7 +16,7 @@
 
 #include 
 
-#include "jinclude.h"
+#include "filter/jinclude.h"
 #include "jerror.h"
 #include "jpeglib.h"
 #include "filter/transupp.h"   /* My own external interface */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits