[Libreoffice-commits] .: 2 commits - officecfg/registry svtools/inc svtools/source svtools/uiconfig

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Nov 15 04:16:16 PST 2012


 officecfg/registry/data/org/openoffice/Office/Common.xcu   |   22 +
 officecfg/registry/data/org/openoffice/Setup.xcu           |    2 
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |   10 
 svtools/inc/svtools/ServerDetailsControls.hxx              |    3 
 svtools/source/dialogs/ServerDetailsControls.cxx           |   26 +
 svtools/uiconfig/ui/placeedit.ui                           |  220 +++++++------
 6 files changed, 185 insertions(+), 98 deletions(-)

New commits:
commit 812b7362c18a70fe97b3ebb8e1a6e32ff189f48e
Author: Cédric Bosdonnat <cedric.bosdonnat at free.fr>
Date:   Wed Nov 14 13:22:58 2012 +0100

    Migrate places configuration in user profile
    
    Change-Id: Ia4494c3a1164026f5da25d2040a5cc187016b958

diff --git a/officecfg/registry/data/org/openoffice/Setup.xcu b/officecfg/registry/data/org/openoffice/Setup.xcu
index 4979ce7..bf5de32 100644
--- a/officecfg/registry/data/org/openoffice/Setup.xcu
+++ b/officecfg/registry/data/org/openoffice/Setup.xcu
@@ -857,6 +857,8 @@
                 <it>/org.openoffice.Office.Common/Misc/UseSystemFileDialog</it>
                 <it>/org.openoffice.Office.Common/Misc/UseSystemPrintDialog</it>
                 <it>/org.openoffice.Office.Common/Misc/SymbolStyle</it>
+                <it>/org.openoffice.Office.Common/Misc/FilePickerPlacesNames</it>
+                <it>/org.openoffice.Office.Common/Misc/FilePickerPlacesUrls</it>
                 <it>/org.openoffice.Office.Common/Passwords</it>
                 <it>/org.openoffice.Office.Common/Print/PrintingModifiesDocument</it>
                 <it>/org.openoffice.Office.Common/Print/Warning</it>
commit b4fc58675b98d68544acc4aaa292548f10cb5c3b
Author: Cédric Bosdonnat <cedric.bosdonnat at free.fr>
Date:   Wed Nov 14 10:25:55 2012 +0100

    PlaceEditDialog: simplified CMIS by adding template URLs for common servers
    
    Change-Id: I041d58d09e132e481cfa278300c494c9f1d75f29

diff --git a/officecfg/registry/data/org/openoffice/Office/Common.xcu b/officecfg/registry/data/org/openoffice/Office/Common.xcu
index 27f4ab6..45f4cfe 100644
--- a/officecfg/registry/data/org/openoffice/Office/Common.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Common.xcu
@@ -602,6 +602,28 @@
     <prop oor:name="FilePickerPlacesNames">
       <value/>
     </prop>
+    <prop oor:name="CmisServersUrls">
+      <value>
+        <it>http://<host>/alfresco/cmisws/RepositoryService?wsdl</it>
+        <it>http://<host>/p8cmis/wsdl</it>
+        <it>https://apps.lotuslive.com/files/basic/cmis/my/servicedoc</it>
+        <it>http://<host>/servlet/cmis/repository/_P<Quickr place name>_RMain.nsf/servicedoc</it>
+        <it>http://<host>/nuxeo/webservices/cmis/RepositoryService?wsdl</it>
+        <it>http://ec2-184-72-233-127.compute-1.amazonaws.com/ot-cmis/services/RepositoryService?wsdl</it>
+        <it>http://<host>/_vti_bin/CMISSoapwsdl.aspx</it>
+      </value>
+    </prop>
+    <prop oor:name="CmisServersNames">
+      <value>
+        <it>Alfresco 4</it>
+        <it>IBM FileNet P8</it>
+        <it>Lotus Live Files</it>
+        <it>Lotus Quickr Domino</it>
+        <it>Nuxeo 5.4</it>
+        <it>OpenText ELS 10.2.0</it>
+        <it>SharePoint 2010</it>
+      </value>
+    </prop>
   </node>
   <node oor:name="Save">
     <node oor:name="Document">
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index 8295320..f857c32 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -6792,6 +6792,16 @@
           <desc>List of names of the places the user bookmarked in the file picker dialog.</desc>
         </info>
       </prop>
+      <prop oor:name="CmisServersUrls" oor:type="oor:string-list" oor:nillable="false">
+        <info>
+          <desc>List of sample URLs of the CMIS servers in the place edition dialog.</desc>
+        </info>
+      </prop>
+      <prop oor:name="CmisServersNames" oor:type="oor:string-list" oor:nillable="false">
+        <info>
+          <desc>List of names of the CMIS servers in the place edition dialog.</desc>
+        </info>
+      </prop>
     </group>
     <group oor:name="Forms">
       <info>
diff --git a/svtools/inc/svtools/ServerDetailsControls.hxx b/svtools/inc/svtools/ServerDetailsControls.hxx
index f29ec44..c6ab63f 100644
--- a/svtools/inc/svtools/ServerDetailsControls.hxx
+++ b/svtools/inc/svtools/ServerDetailsControls.hxx
@@ -135,12 +135,14 @@ class CmisDetailsContainer : public DetailsContainer
     private:
         rtl::OUString m_sUsername;
         com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment > m_xCmdEnv;
+        std::vector< rtl::OUString > m_aServerTypesURLs;
         std::vector< rtl::OUString > m_aRepoIds;
         rtl::OUString m_sRepoId;
 
         Edit*       m_pEDBinding;
         ListBox*    m_pLBRepository;
         Button*     m_pBTRepoRefresh;
+        ListBox*    m_pLBServerType;
 
     public:
         CmisDetailsContainer( VclBuilderContainer* pBuilder );
@@ -152,6 +154,7 @@ class CmisDetailsContainer : public DetailsContainer
 
     private:
         void selectRepository( );
+        DECL_LINK ( SelectServerTypeHdl, void * );
         DECL_LINK ( RefreshReposHdl, void * );
         DECL_LINK ( SelectRepoHdl, void * );
 };
diff --git a/svtools/source/dialogs/ServerDetailsControls.cxx b/svtools/source/dialogs/ServerDetailsControls.cxx
index 297e750..88f57e6 100644
--- a/svtools/source/dialogs/ServerDetailsControls.cxx
+++ b/svtools/source/dialogs/ServerDetailsControls.cxx
@@ -34,6 +34,7 @@
 #include <com/sun/star/sdbc/XRow.hpp>
 
 #include <comphelper/processfactory.hxx>
+#include <officecfg/Office/Common.hxx>
 #include <rtl/uri.hxx>
 #include <ucbhelper/content.hxx>
 #include <ucbhelper/commandenvironment.hxx>
@@ -270,13 +271,19 @@ bool SmbDetailsContainer::setUrl( const INetURLObject& rUrl )
 CmisDetailsContainer::CmisDetailsContainer( VclBuilderContainer* pBuilder ) :
     DetailsContainer( pBuilder, "CmisDetails" ),
     m_sUsername( ),
-    m_xCmdEnv( )
+    m_xCmdEnv( ),
+    m_aServerTypesURLs( ),
+    m_aRepoIds( ),
+    m_sRepoId( )
 {
     Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
     Reference< XInteractionHandler > xGlobalInteractionHandler(
         InteractionHandler::createWithParent(xContext, 0), UNO_QUERY );
     m_xCmdEnv = new ucbhelper::CommandEnvironment( xGlobalInteractionHandler, Reference< XProgressHandler >() );
 
+    pBuilder->get( m_pLBServerType, "serverType" );
+    m_pLBServerType->SetSelectHdl( LINK( this, CmisDetailsContainer, SelectServerTypeHdl ) );
+
     pBuilder->get( m_pEDBinding, "binding" );
     m_pEDBinding->SetModifyHdl( LINK( this, DetailsContainer, ValueChangeHdl ) );
 
@@ -287,6 +294,15 @@ CmisDetailsContainer::CmisDetailsContainer( VclBuilderContainer* pBuilder ) :
     m_pBTRepoRefresh->SetClickHdl( LINK( this, CmisDetailsContainer, RefreshReposHdl ) );
 
     show( false );
+
+    // Load the ServerType entries
+    Sequence< ::rtl::OUString > aTypesUrlsList( officecfg::Office::Common::Misc::CmisServersUrls::get( xContext ) );
+    Sequence< ::rtl::OUString > aTypesNamesList( officecfg::Office::Common::Misc::CmisServersNames::get( xContext ) );
+    for ( sal_Int32 i = 0; i < aTypesUrlsList.getLength( ) && aTypesNamesList.getLength( ); ++i )
+    {
+        m_pLBServerType->InsertEntry( aTypesNamesList[i] );
+        m_aServerTypesURLs.push_back( aTypesUrlsList[i] );
+    }
 }
 
 INetURLObject CmisDetailsContainer::getUrl( )
@@ -341,6 +357,14 @@ void CmisDetailsContainer::selectRepository( )
     notifyChange( );
 }
 
+IMPL_LINK( CmisDetailsContainer, SelectServerTypeHdl, void *, EMPTYARG  )
+{
+    // Set a sample URL for the server
+    sal_uInt16 nId = m_pLBServerType->GetSelectEntryPos( );
+    m_pEDBinding->SetText( m_aServerTypesURLs[nId] );
+    return 0;
+}
+
 IMPL_LINK( CmisDetailsContainer, RefreshReposHdl, void *, EMPTYARG  )
 {
     rtl::OUString sBindingUrl = rtl::OUString( m_pEDBinding->GetText() ).trim( );
diff --git a/svtools/uiconfig/ui/placeedit.ui b/svtools/uiconfig/ui/placeedit.ui
index 2f0a2aa..285b023 100644
--- a/svtools/uiconfig/ui/placeedit.ui
+++ b/svtools/uiconfig/ui/placeedit.ui
@@ -6,29 +6,6 @@
     <property name="step_increment">1</property>
     <property name="page_increment">10</property>
   </object>
-  <object class="GtkListStore" id="ServerTypes">
-    <columns>
-      <!-- column-name ServerType -->
-      <column type="gchararray"/>
-    </columns>
-    <data>
-      <row>
-        <col id="0" translatable="yes">WebDAV</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">FTP</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">SSH</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">Windows Share</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">CMIS</col>
-      </row>
-    </data>
-  </object>
   <object class="GtkDialog" id="PlaceEditDialog">
     <property name="can_focus">False</property>
     <property name="border_width">5</property>
@@ -92,7 +69,7 @@
                 <property name="can_focus">False</property>
                 <property name="margin_top">6</property>
                 <property name="hexpand">True</property>
-                <property name="model">ServerTypes</property>
+                <property name="model">liststore1</property>
                 <child>
                   <object class="GtkCellRendererText" id="cellrenderertext1"/>
                   <attributes>
@@ -273,102 +250,128 @@
           </packing>
         </child>
         <child>
-          <object class="GtkFrame" id="SmbDetails">
+          <object class="GtkFrame" id="CmisDetails">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <property name="label_xalign">0</property>
             <property name="shadow_type">none</property>
             <child>
-              <object class="GtkAlignment" id="alignment2">
+              <object class="GtkAlignment" id="alignment3">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="left_padding">12</property>
                 <child>
-                  <object class="GtkGrid" id="grid4">
+                  <object class="GtkGrid" id="grid5">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="row_spacing">6</property>
                     <property name="column_spacing">6</property>
                     <child>
-                      <object class="GtkLabel" id="label9">
+                      <object class="GtkLabel" id="bindingLabel">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="halign">start</property>
-                        <property name="label" translatable="yes">Host</property>
+                        <property name="label" translatable="yes">Binding URL</property>
                       </object>
                       <packing>
                         <property name="left_attach">0</property>
-                        <property name="top_attach">0</property>
+                        <property name="top_attach">1</property>
                         <property name="width">1</property>
                         <property name="height">1</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkLabel" id="label10">
+                      <object class="GtkLabel" id="repositoryLabel">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="halign">start</property>
-                        <property name="label" translatable="yes">Share</property>
+                        <property name="label" translatable="yes">Repository</property>
                       </object>
                       <packing>
                         <property name="left_attach">0</property>
-                        <property name="top_attach">1</property>
+                        <property name="top_attach">2</property>
                         <property name="width">1</property>
                         <property name="height">1</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkLabel" id="label11">
+                      <object class="GtkEntry" id="binding">
                         <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="halign">start</property>
-                        <property name="label" translatable="yes">Path</property>
+                        <property name="can_focus">True</property>
+                        <property name="hexpand">True</property>
+                        <property name="invisible_char">●</property>
                       </object>
                       <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">2</property>
+                        <property name="left_attach">1</property>
+                        <property name="top_attach">1</property>
                         <property name="width">1</property>
                         <property name="height">1</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkEntry" id="smbHost">
+                      <object class="GtkGrid" id="grid6">
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="hexpand">True</property>
-                        <property name="invisible_char">●</property>
+                        <property name="can_focus">False</property>
+                        <property name="column_spacing">6</property>
+                        <child>
+                          <object class="GtkComboBox" id="repositories">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="hexpand">True</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">0</property>
+                            <property name="top_attach">0</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkButton" id="repositoriesRefresh">
+                            <property name="use_action_appearance">False</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="image">image1</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="top_attach">0</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
+                          </packing>
+                        </child>
                       </object>
                       <packing>
                         <property name="left_attach">1</property>
-                        <property name="top_attach">0</property>
+                        <property name="top_attach">2</property>
                         <property name="width">1</property>
                         <property name="height">1</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkEntry" id="smbShare">
+                      <object class="GtkLabel" id="label3">
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="hexpand">True</property>
-                        <property name="invisible_char">●</property>
+                        <property name="can_focus">False</property>
+                        <property name="halign">start</property>
+                        <property name="label" translatable="yes">Server Type</property>
                       </object>
                       <packing>
-                        <property name="left_attach">1</property>
-                        <property name="top_attach">1</property>
+                        <property name="left_attach">0</property>
+                        <property name="top_attach">0</property>
                         <property name="width">1</property>
                         <property name="height">1</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkEntry" id="smbPath">
+                      <object class="GtkComboBox" id="serverType">
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="hexpand">True</property>
-                        <property name="invisible_char">●</property>
+                        <property name="can_focus">False</property>
                       </object>
                       <packing>
                         <property name="left_attach">1</property>
-                        <property name="top_attach">2</property>
+                        <property name="top_attach">0</property>
                         <property name="width">1</property>
                         <property name="height">1</property>
                       </packing>
@@ -378,7 +381,7 @@
               </object>
             </child>
             <child type="label">
-              <object class="GtkLabel" id="label8">
+              <object class="GtkLabel" id="label12">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Server Details</property>
@@ -395,28 +398,28 @@
           </packing>
         </child>
         <child>
-          <object class="GtkFrame" id="CmisDetails">
+          <object class="GtkFrame" id="SmbDetails">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <property name="label_xalign">0</property>
             <property name="shadow_type">none</property>
             <child>
-              <object class="GtkAlignment" id="alignment3">
+              <object class="GtkAlignment" id="alignment2">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="left_padding">12</property>
                 <child>
-                  <object class="GtkGrid" id="grid5">
+                  <object class="GtkGrid" id="grid4">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="row_spacing">6</property>
                     <property name="column_spacing">6</property>
                     <child>
-                      <object class="GtkLabel" id="bindingLabel">
+                      <object class="GtkLabel" id="label9">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="halign">start</property>
-                        <property name="label" translatable="yes">Binding URL</property>
+                        <property name="label" translatable="yes">Host</property>
                       </object>
                       <packing>
                         <property name="left_attach">0</property>
@@ -426,11 +429,11 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkLabel" id="repositoryLabel">
+                      <object class="GtkLabel" id="label10">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="halign">start</property>
-                        <property name="label" translatable="yes">Repository</property>
+                        <property name="label" translatable="yes">Share</property>
                       </object>
                       <packing>
                         <property name="left_attach">0</property>
@@ -440,7 +443,21 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkEntry" id="binding">
+                      <object class="GtkLabel" id="label11">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="halign">start</property>
+                        <property name="label" translatable="yes">Path</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">0</property>
+                        <property name="top_attach">2</property>
+                        <property name="width">1</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkEntry" id="smbHost">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="hexpand">True</property>
@@ -454,39 +471,11 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkGrid" id="grid6">
+                      <object class="GtkEntry" id="smbShare">
                         <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="column_spacing">6</property>
-                        <child>
-                          <object class="GtkComboBox" id="repositories">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="hexpand">True</property>
-                          </object>
-                          <packing>
-                            <property name="left_attach">0</property>
-                            <property name="top_attach">0</property>
-                            <property name="width">1</property>
-                            <property name="height">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkButton" id="repositoriesRefresh">
-                            <property name="use_action_appearance">False</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">True</property>
-                            <property name="use_action_appearance">False</property>
-                            <property name="image">image1</property>
-                          </object>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="top_attach">0</property>
-                            <property name="width">1</property>
-                            <property name="height">1</property>
-                          </packing>
-                        </child>
+                        <property name="can_focus">True</property>
+                        <property name="hexpand">True</property>
+                        <property name="invisible_char">●</property>
                       </object>
                       <packing>
                         <property name="left_attach">1</property>
@@ -495,12 +484,26 @@
                         <property name="height">1</property>
                       </packing>
                     </child>
+                    <child>
+                      <object class="GtkEntry" id="smbPath">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="hexpand">True</property>
+                        <property name="invisible_char">●</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="top_attach">2</property>
+                        <property name="width">1</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
                   </object>
                 </child>
               </object>
             </child>
             <child type="label">
-              <object class="GtkLabel" id="label12">
+              <object class="GtkLabel" id="label8">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Server Details</property>
@@ -657,4 +660,27 @@
     <property name="can_focus">False</property>
     <property name="stock">gtk-refresh</property>
   </object>
+  <object class="GtkListStore" id="liststore1">
+    <columns>
+      <!-- column-name type -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">WebDAV</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">FTP</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">SSH</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Windows Share</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">CMIS</col>
+      </row>
+    </data>
+  </object>
 </interface>


More information about the Libreoffice-commits mailing list