[Libreoffice-commits] core.git: Branch 'feature/gsoc15-open-remote-files-dialog' - 3 commits - framework/inc framework/source icon-themes/breeze icon-themes/tango officecfg/registry sc/uiconfig sw/uiconfig

Szymon Kłos eszkadev at gmail.com
Mon Jul 6 08:45:18 PDT 2015


 framework/inc/classes/resource.hrc                                  |    1 
 framework/source/classes/resource.src                               |    5 ++
 framework/source/uielement/recentfilesmenucontroller.cxx            |   20 ++++++++++
 icon-themes/breeze/links.txt                                        |    2 +
 icon-themes/tango/links.txt                                         |    2 +
 officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu   |    8 ++++
 officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu |    8 ++++
 sc/uiconfig/scalc/toolbar/standardbar.xml                           |    1 
 sw/uiconfig/swriter/toolbar/standardbar.xml                         |    1 
 9 files changed, 48 insertions(+)

New commits:
commit eb77e83ecd94e7809240848ef1c5ab7a9f8ce761
Author: Szymon Kłos <eszkadev at gmail.com>
Date:   Mon Jul 6 17:42:29 2015 +0200

    open remote button in sc toolbar
    
    Change-Id: I3ad382e246cf16270bc78d57726107fe72b0fac3

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
index 433c723..d2076ff 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
@@ -1809,6 +1809,14 @@
           <value>1</value>
         </prop>
       </node>
+      <node oor:name=".uno:OpenRemote" oor:op="replace">
+        <prop oor:name="Label" oor:type="xs:string">
+          <value xml:lang="en-US">~Open Remote File...</value>
+        </prop>
+        <prop oor:name="Properties" oor:type="xs:int">
+          <value>1</value>
+        </prop>
+      </node>
       <node oor:name=".uno:ConvertFormulaToValue" oor:op="replace">
         <prop oor:name="Label" oor:type="xs:string">
           <value xml:lang="en-US">Formula to Value</value>
diff --git a/sc/uiconfig/scalc/toolbar/standardbar.xml b/sc/uiconfig/scalc/toolbar/standardbar.xml
index 40c45b3..1402b8b 100644
--- a/sc/uiconfig/scalc/toolbar/standardbar.xml
+++ b/sc/uiconfig/scalc/toolbar/standardbar.xml
@@ -22,6 +22,7 @@
  <toolbar:toolbaritem xlink:href=".uno:AddDirect"/>
  <toolbar:toolbaritem xlink:href=".uno:NewDoc" toolbar:visible="false"/>
  <toolbar:toolbaritem xlink:href=".uno:OpenFromCalc" toolbar:style="dropdown"/>
+ <toolbar:toolbaritem xlink:href=".uno:OpenRemote"/>
  <toolbar:toolbaritem xlink:href=".uno:Save"/>
  <toolbar:toolbaritem xlink:href=".uno:SaveAs"/>
  <toolbar:toolbaritem xlink:href=".uno:SendMail" toolbar:visible="false"/>
commit 34ae168f34e94904152792f7b70878f26f7078ab
Author: Szymon Kłos <eszkadev at gmail.com>
Date:   Mon Jul 6 17:14:55 2015 +0200

    open remote button in sw standard toolbar
    
    Change-Id: I7e702da5d4ecc8c32d91e86bd209ec4b7d4f4431

diff --git a/icon-themes/breeze/links.txt b/icon-themes/breeze/links.txt
index c0c797b..a659bb9 100644
--- a/icon-themes/breeze/links.txt
+++ b/icon-themes/breeze/links.txt
@@ -1,8 +1,10 @@
 # Open
 cmd/lc_openfromwriter.png cmd/lc_open.png
 cmd/lc_openfromcalc.png cmd/lc_open.png
+cmd/lc_openremote.png cmd/lc_open.png
 cmd/sc_openfromwriter.png cmd/sc_open.png
 cmd/sc_openfromcalc.png cmd/sc_open.png
+cmd/sc_openremote.png cmd/sc_open.png
 
 # Hyperlink
 cmd/lc_hyperlinkdialog.png cmd/lc_inserthyperlink.png
diff --git a/icon-themes/tango/links.txt b/icon-themes/tango/links.txt
index 4272e6a..2810c97 100644
--- a/icon-themes/tango/links.txt
+++ b/icon-themes/tango/links.txt
@@ -270,8 +270,10 @@ cmd/sc_nextpage.png cmd/sc_navigateforward.png
 res/sc06300.png cmd/sc_navigateforward.png
 cmd/lc_openfromwriter.png cmd/lc_open.png
 cmd/lc_openfromcalc.png cmd/lc_open.png
+cmd/lc_openremote.png cmd/lc_open.png
 cmd/sc_openfromwriter.png cmd/sc_open.png
 cmd/sc_openfromcalc.png cmd/sc_open.png
+cmd/sc_openremote.png cmd/sc_open.png
 sc/imglst/lc26048.png cmd/lc_autosum.png
 sc/imglst/sc26048.png cmd/sc_autosum.png
 cmd/lc_fontcolor.png cmd/lc_color.png
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
index 40ddf82..a02bc72 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
@@ -2275,6 +2275,14 @@
           <value>1</value>
         </prop>
       </node>
+      <node oor:name=".uno:OpenRemote" oor:op="replace">
+        <prop oor:name="Label" oor:type="xs:string">
+          <value xml:lang="en-US">~Open Remote File...</value>
+        </prop>
+        <prop oor:name="Properties" oor:type="xs:int">
+          <value>1</value>
+        </prop>
+      </node>
     </node>
     <node oor:name="Popups">
       <node oor:name=".uno:TableMenu" oor:op="replace">
diff --git a/sw/uiconfig/swriter/toolbar/standardbar.xml b/sw/uiconfig/swriter/toolbar/standardbar.xml
index 4910fb8..d94a44b 100644
--- a/sw/uiconfig/swriter/toolbar/standardbar.xml
+++ b/sw/uiconfig/swriter/toolbar/standardbar.xml
@@ -22,6 +22,7 @@
  <toolbar:toolbaritem xlink:href=".uno:AddDirect" toolbar:helpid="5537"/>
  <toolbar:toolbaritem xlink:href=".uno:NewDoc" toolbar:visible="false" toolbar:helpid="5500"/>
  <toolbar:toolbaritem xlink:href=".uno:OpenFromWriter" toolbar:style="dropdown"/>
+ <toolbar:toolbaritem xlink:href=".uno:OpenRemote"/>
  <toolbar:toolbaritem xlink:href=".uno:Save" toolbar:helpid="5505"/>
  <toolbar:toolbaritem xlink:href=".uno:SaveAs" toolbar:helpid="5502"/>
  <toolbar:toolbaritem xlink:href=".uno:SendMail" toolbar:visible="false" toolbar:helpid="5331"/>
commit 2de5bc24e05ffcb202c02ba3c72f852e0415cce4
Author: Szymon Kłos <eszkadev at gmail.com>
Date:   Mon Jul 6 16:01:26 2015 +0200

    open remote entry in the open drop down menu
    
    Change-Id: Idebc8a926c6653c476c2507606d4a89b22e2eaaf

diff --git a/framework/inc/classes/resource.hrc b/framework/inc/classes/resource.hrc
index 8d23371..6620c99 100644
--- a/framework/inc/classes/resource.hrc
+++ b/framework/inc/classes/resource.hrc
@@ -50,6 +50,7 @@
 #define STR_CLEAR_RECENT_FILES                  (RID_STR_START+23)
 #define STR_CLEAR_RECENT_FILES_HELP             (RID_STR_START+24)
 #define STR_LANGSTATUS_HINT                     (RID_STR_START+25)
+#define STR_OPEN_REMOTE                         (RID_STR_START+26)
 
 #define POPUPMENU_TOOLBAR_QUICKCUSTOMIZATION    (RID_MENU_START+0)
 
diff --git a/framework/source/classes/resource.src b/framework/source/classes/resource.src
index c54eaa3..0ef53ae 100644
--- a/framework/source/classes/resource.src
+++ b/framework/source/classes/resource.src
@@ -114,6 +114,11 @@ String STR_CLEAR_RECENT_FILES_HELP
     Text [ en-US ] = "Clears the list with the most recently opened files. This action can not be undone.";
 };
 
+String STR_OPEN_REMOTE
+{
+    Text [ en-US ] = "Open remote file";
+};
+
 String STR_TOOLBAR_TITLE_ADDON
 {
     Text [ en-US ] = "Add-On %num%";
diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx
index 1ea02d2..9ea9621 100644
--- a/framework/source/uielement/recentfilesmenucontroller.cxx
+++ b/framework/source/uielement/recentfilesmenucontroller.cxx
@@ -44,6 +44,7 @@ using namespace framework;
 namespace {
 
 static const char CMD_CLEAR_LIST[]   = ".uno:ClearRecentFileList";
+static const char CMD_OPEN_REMOTE[]  = ".uno:OpenRemote";
 static const char CMD_PREFIX[]       = "vnd.sun.star.popup:RecentFileList?entry=";
 static const char MENU_SHORTCUT[]     = "~N. ";
 
@@ -224,6 +225,12 @@ void RecentFilesMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >
                                            OUString( CMD_CLEAR_LIST ) );
             pVCLPopupMenu->SetHelpText( sal_uInt16( nCount + 1 ),
                                         FWK_RESSTR(STR_CLEAR_RECENT_FILES_HELP) );
+
+            // Open remote menu entry
+            pVCLPopupMenu->InsertItem( sal_uInt16( nCount + 2 ),
+                                       FWK_RESSTR(STR_OPEN_REMOTE) );
+            pVCLPopupMenu->SetItemCommand( sal_uInt16( nCount + 2 ),
+                                           OUString( CMD_OPEN_REMOTE ) );
         }
         else
         {
@@ -232,6 +239,14 @@ void RecentFilesMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >
             // Do not disable it, otherwise the Toolbar controller and MenuButton
             // will display SV_RESID_STRING_NOSELECTIONPOSSIBLE instead of STR_NODOCUMENT
             pVCLPopupMenu->SetItemBits( 1, pVCLPopupMenu->GetItemBits( 1 ) | MenuItemBits::NOSELECT );
+
+            pVCLPopupMenu->InsertSeparator();
+
+            // Open remote menu entry
+            pVCLPopupMenu->InsertItem( sal_uInt16( 2 ),
+                                       FWK_RESSTR(STR_OPEN_REMOTE) );
+            pVCLPopupMenu->SetItemCommand( sal_uInt16( 2 ),
+                                           OUString( CMD_OPEN_REMOTE ) );
         }
     }
 }
@@ -331,6 +346,11 @@ void SAL_CALL RecentFilesMenuController::itemSelected( const css::awt::MenuEvent
                 "vnd.org.libreoffice.recentdocs:ClearRecentFileList",
                 ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >() );
         }
+        else if ( aCommand == CMD_OPEN_REMOTE )
+        {
+            Sequence< PropertyValue > aArgsList( 0 );
+            dispatchCommand( CMD_OPEN_REMOTE, aArgsList );
+        }
         else
             executeEntry( rEvent.MenuId-1 );
     }


More information about the Libreoffice-commits mailing list