[Libreoffice-commits] .: Branch 'feature/tubes2' - sc/inc sc/Library_sc.mk sc/source

Michael Meeks michael at kemper.freedesktop.org
Fri Mar 23 09:58:44 PDT 2012


 sc/Library_sc.mk                 |    1 
 sc/inc/sc.hrc                    |    1 
 sc/source/ui/collab/contacts.cxx |   73 +++++++++++++
 sc/source/ui/collab/contacts.hrc |    7 +
 sc/source/ui/collab/contacts.src |  218 +++++++++++++++++++++++++++++++++++++++
 sc/source/ui/collab/sendfunc.cxx |    4 
 6 files changed, 304 insertions(+)

New commits:
commit 0b054ef8c89aafde7d8e2aafe5835dbe954b73cf
Author: Michael Meeks <michael.meeks at suse.com>
Date:   Fri Mar 23 16:57:09 2012 +0000

    tubes: very early start of contacts dialog, in the wrong place too.

diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk
index 42fd0fd..3132603 100644
--- a/sc/Library_sc.mk
+++ b/sc/Library_sc.mk
@@ -336,6 +336,7 @@ $(eval $(call gb_Library_add_exception_objects,sc,\
 	sc/source/ui/cctrl/tbinsert \
 	sc/source/ui/cctrl/tbzoomsliderctrl \
 	sc/source/ui/collab/collab \
+	sc/source/ui/collab/contacts \
 	sc/source/ui/collab/sendfunc \
 	sc/source/ui/dbgui/asciiopt \
 	sc/source/ui/dbgui/consdlg \
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index ad4649e..0651c41 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -1122,6 +1122,7 @@
 
 #define RID_SCDLG_CHAR                  (SC_DIALOGS_START + 76)
 #define RID_SCDLG_PARAGRAPH             (SC_DIALOGS_START + 77)
+#define RID_SCDLG_CONTACTS              (SC_DIALOGS_START + 78)
 
 #define RID_SCPAGE_STAT                 (SC_DIALOGS_START + 79)
 #define RID_SCDLG_CHARTCOLROW           (SC_DIALOGS_START + 80)
diff --git a/sc/source/ui/collab/contacts.cxx b/sc/source/ui/collab/contacts.cxx
new file mode 100644
index 0000000..ff3db98
--- /dev/null
+++ b/sc/source/ui/collab/contacts.cxx
@@ -0,0 +1,73 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License or as specified alternatively below. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * Major Contributor(s):
+ * Copyright (C) 2012 Michael Meeks <michael.meeks at suse.com> (initial developer)
+ *
+ * All Rights Reserved.
+ *
+ * For minor contributions see the git repository.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+
+#include "sal/config.h"
+
+#include <vector>
+#include "collab.hxx"
+#include <tubes/conference.hxx>
+#include <vcl/syswin.hxx>
+#include <svx/simptabl.hxx>
+
+// #define CONTACTS
+
+#ifdef CONTACTS_DLG
+namespace {
+class TubeContacts : SfxModelessDialog
+{
+    SvxSimpleTableContainer maListContainer;
+    SvxSimpleTable          maList;
+
+public:
+    TubeContacts() :
+        SystemWindow( WINDOW_FLOATINGWINDOW,  ),
+        maListContainer( this, CUI_RES( LB_JAVA ) ),
+        maList( maListContainer ),
+    {
+ScResId( FL_PRINTAREA ) ),
+
+        ResId aResId;
+        mpListContainer = new SvxSimpleTableContainer( this, aResId );
+        SetMinOutputSizePixel( Size( 640, 480 ) );
+        Show();
+    }
+    virtual ~TubeContacts() {}
+};
+} // anonymous namespace
+#endif
+
+namespace tubes {
+void createContacts()
+{
+#ifdef CONTACTS_DLG
+    new TubeContacts();
+#endif
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/collab/contacts.hrc b/sc/source/ui/collab/contacts.hrc
new file mode 100644
index 0000000..0ee1b06
--- /dev/null
+++ b/sc/source/ui/collab/contacts.hrc
@@ -0,0 +1,7 @@
+#include "sc.hrc"   // -> RID_SCDLG_CONTACTS
+
+#define FL_LABEL             1
+#define CTL_LIST             2
+
+#define STR_HEADER_ALIAS     20
+#define STR_HEADER_FEATURES  21
diff --git a/sc/source/ui/collab/contacts.src b/sc/source/ui/collab/contacts.src
new file mode 100644
index 0000000..ab20c87
--- /dev/null
+++ b/sc/source/ui/collab/contacts.src
@@ -0,0 +1,218 @@
+#include "sc.hrc"
+#include "contacts.hrc"
+#include <cuires.hrc>
+
+ModelessDialog RID_SCDLG_CONTACTS
+{
+    HelpId = HID_SCPAGE_AREAS; // has to be something ...
+    OutputSize = TRUE ;
+    SVLook = TRUE ;
+    Hide = TRUE ;
+    Moveable = TRUE ;
+    Closeable = TRUE ;
+    Size = MAP_APPFONT ( 320 , 480 ) ;
+    Text [ en-US ] = "Contacts" ;
+
+    FixedLine FL_LABEL
+    {
+        Pos = MAP_APPFONT ( 6 , 3 ) ;
+        Size = MAP_APPFONT ( 400 , 8 ) ;
+        Text [ en-US ] = "Here are your contacts" ;
+    };
+    Control LB_JAVA
+    {
+        Pos = MAP_APPFONT ( 21 , 38 ) ;
+        Size = MAP_APPFONT ( 177 , 130 ) ;
+        Border = TRUE ;
+        TabStop = TRUE ;
+    };
+    String STR_HEADER_ALIAS
+    {
+        Text [ en-US ] = "Vendor" ;
+    };
+    String STR_HEADER_VERSION
+    {
+        Text [ en-US ] = "Version" ;
+    };
+    String STR_HEADER_FEATURES
+    {
+        Text [ en-US ] = "Features" ;
+    };
+};
+
+// RID_SVXDLG_JAVA_PARAMETER ---------------------------------------------
+
+ModalDialog RID_SVXDLG_JAVA_PARAMETER
+{
+    HelpId = HID_OPTIONS_JAVA_PARAMETER ;
+    OutputSize = TRUE ;
+    SVLook = TRUE ;
+    Size = MAP_APPFONT ( 270 , 140 ) ;
+    Text [ en-US ] = "Java Start Parameters" ;
+    Moveable = TRUE ;
+    FixedText FT_PARAMETER
+    {
+        Pos = MAP_APPFONT ( 6 , 3 ) ;
+        Size = MAP_APPFONT ( 202 , 8 ) ;
+        Text [ en-US ] = "Java start ~parameter" ;
+    };
+    Edit ED_PARAMETER
+    {
+        HelpID = "cui:Edit:RID_SVXDLG_JAVA_PARAMETER:ED_PARAMETER";
+        Pos = MAP_APPFONT ( 6 , 15 ) ;
+        Size = MAP_APPFONT ( 202 , 12 ) ;
+        Border = TRUE ;
+    };
+    PushButton PB_ASSIGN
+    {
+        HelpID = "cui:PushButton:RID_SVXDLG_JAVA_PARAMETER:PB_ASSIGN";
+        Pos = MAP_APPFONT ( 214 , 14 ) ;
+        Size = MAP_APPFONT ( 50 , 14 ) ;
+        Text [ en-US ] = "~Assign" ;
+    };
+    FixedText FT_ASSIGNED
+    {
+        Pos = MAP_APPFONT ( 6 , 31 ) ;
+        Size = MAP_APPFONT ( 202 , 8 ) ;
+        Text [ en-US ] = "Assig~ned start parameters" ;
+    };
+    ListBox LB_ASSIGNED
+    {
+        HelpID = "cui:ListBox:RID_SVXDLG_JAVA_PARAMETER:LB_ASSIGNED";
+        Border = TRUE ;
+        Pos = MAP_APPFONT ( 6 , 42 ) ;
+        Size = MAP_APPFONT ( 202 , 53 ) ;
+        AutoHScroll = TRUE ;
+    };
+    FixedText FT_EXAMPLE
+    {
+        Pos = MAP_APPFONT ( 6 , 98 ) ;
+        Size = MAP_APPFONT ( 202 , 8 ) ;
+        Text [ en-US ] = "For example: -Dmyprop=c:\\program files\\java" ;
+    };
+    PushButton PB_REMOVE
+    {
+        HelpID = "cui:PushButton:RID_SVXDLG_JAVA_PARAMETER:PB_REMOVE";
+        Pos = MAP_APPFONT ( 214 , 42 ) ;
+        Size = MAP_APPFONT ( 50 , 14 ) ;
+        Text [ en-US ] = "~Remove" ;
+    };
+    FixedLine FL_BUTTONS
+    {
+        Pos = MAP_APPFONT ( 3 , 109 ) ;
+        Size = MAP_APPFONT ( 264 , 8 ) ;
+    };
+    OKButton PB_PARAMETER_OK
+    {
+        Pos = MAP_APPFONT ( 105 , 120 ) ;
+        Size = MAP_APPFONT ( 50 , 14 ) ;
+        DefButton = TRUE ;
+    };
+    CancelButton PB_PARAMETER_ESC
+    {
+        Pos = MAP_APPFONT ( 158 , 120 ) ;
+        Size = MAP_APPFONT ( 50 , 14 ) ;
+    };
+    HelpButton PB_PARAMETER_HLP
+    {
+        Pos = MAP_APPFONT ( 214 , 120 ) ;
+        Size = MAP_APPFONT ( 50 , 14 ) ;
+    };
+};
+
+// RID_SVXDLG_JAVA_CLASSPATH ---------------------------------------------
+
+ModalDialog RID_SVXDLG_JAVA_CLASSPATH
+{
+    HelpId = HID_OPTIONS_JAVA_CLASSPATH ;
+    OutputSize = TRUE ;
+    SVLook = TRUE ;
+    Size = MAP_APPFONT ( 240 , 120 ) ;
+    Text [ en-US ] = "Class Path" ;
+    Moveable = TRUE ;
+    FixedText FT_PATH
+    {
+        Pos = MAP_APPFONT ( 6 , 3 ) ;
+        Size = MAP_APPFONT ( 172 , 8 ) ;
+        Text [ en-US ] = "A~ssigned folders and archives" ;
+    };
+    ListBox LB_PATH
+    {
+        HelpID = "cui:ListBox:RID_SVXDLG_JAVA_CLASSPATH:LB_PATH";
+        Pos = MAP_APPFONT ( 6 , 14 ) ;
+        Size = MAP_APPFONT ( 172 , 72 ) ;
+        Border = TRUE ;
+        AutoHScroll = TRUE ;
+    };
+    PushButton PB_ADDARCHIVE
+    {
+        HelpID = "cui:PushButton:RID_SVXDLG_JAVA_CLASSPATH:PB_ADDARCHIVE";
+        Pos = MAP_APPFONT ( 184 , 14 ) ;
+        Size = MAP_APPFONT ( 50 , 14 ) ;
+        Text [ en-US ] = "~Add Archive..." ;
+    };
+    PushButton PB_ADDPATH
+    {
+        HelpID = "cui:PushButton:RID_SVXDLG_JAVA_CLASSPATH:PB_ADDPATH";
+        Pos = MAP_APPFONT ( 184 , 31 ) ;
+        Size = MAP_APPFONT ( 50 , 14 ) ;
+        Text [ en-US ] = "Add ~Folder" ;
+    };
+    PushButton PB_REMOVE_PATH
+    {
+        HelpID = "cui:PushButton:RID_SVXDLG_JAVA_CLASSPATH:PB_REMOVE_PATH";
+        Pos = MAP_APPFONT ( 184 , 48 ) ;
+        Size = MAP_APPFONT ( 50 , 14 ) ;
+        Text [ en-US ] = "~Remove" ;
+    };
+    FixedLine FL_PATH_BUTTONS
+    {
+        Pos = MAP_APPFONT ( 3 , 89 ) ;
+        Size = MAP_APPFONT ( 236 , 8 ) ;
+    };
+    OKButton PB_PATH_OK
+    {
+        Pos = MAP_APPFONT ( 75 , 100 ) ;
+        Size = MAP_APPFONT ( 50 , 14 ) ;
+        DefButton = TRUE ;
+    };
+    CancelButton PB_PATH_ESC
+    {
+        Pos = MAP_APPFONT ( 128 , 100 ) ;
+        Size = MAP_APPFONT ( 50 , 14 ) ;
+    };
+    HelpButton PB_PATH_HLP
+    {
+        Pos = MAP_APPFONT ( 186 , 100 ) ;
+        Size = MAP_APPFONT ( 50 , 14 ) ;
+    };
+};
+
+ErrorBox RID_SVXERR_JRE_NOT_RECOGNIZED
+{
+    BUTTONS = WB_OK ;
+    DEFBUTTON = WB_DEF_OK ;
+    Message [ en-US ] = "The folder you selected does not contain a Java runtime environment.\nPlease select a different folder." ;
+};
+
+ErrorBox RID_SVXERR_JRE_FAILED_VERSION
+{
+    BUTTONS = WB_OK ;
+    DEFBUTTON = WB_DEF_OK ;
+    Message [ en-US ] = "The Java runtime environment you selected is not the required version.\nPlease select a different folder." ;
+};
+
+WarningBox RID_SVX_MSGBOX_JAVA_RESTART
+{
+    BUTTONS = WB_OK ;
+    DEFBUTTON = WB_DEF_OK ;
+    Message [ en-US ] = "For the selected Java runtime environment to work properly, %PRODUCTNAME must be restarted.\nPlease restart %PRODUCTNAME now." ;
+};
+
+WarningBox RID_SVX_MSGBOX_JAVA_RESTART2
+{
+    BUTTONS = WB_OK ;
+    DEFBUTTON = WB_DEF_OK ;
+    Message [ en-US ] = "You have to restart %PRODUCTNAME so the new or modified values can take effect.\nPlease restart %PRODUCTNAME now." ;
+};
+
diff --git a/sc/source/ui/collab/sendfunc.cxx b/sc/source/ui/collab/sendfunc.cxx
index 6980edd..08383fa 100644
--- a/sc/source/ui/collab/sendfunc.cxx
+++ b/sc/source/ui/collab/sendfunc.cxx
@@ -34,6 +34,7 @@
 #include "docsh.hxx"
 #include "docfunc.hxx"
 #include "collab.hxx"
+#include "contacts.hxx"
 #include <tubes/conference.hxx>
 
 // new file send/recv fun ...
@@ -452,6 +453,9 @@ public:
         if ( rtl::OUString( rText ) == "saveme" )
             SendFile( rText );
 
+        if ( rtl::OUString( rText ) == "contacts" )
+            tubes::createContacts();
+
         return true; // needs some code auditing action
     }
 


More information about the Libreoffice-commits mailing list