[PATCH] fdo#62099 UI: More intuitive text for menu 'Insert - File' C...

2013-04-03 Thread Vishv Brahmbhatt (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/3193

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/93/3193/1

fdo#62099 UI: More intuitive text for menu 'Insert - File'
Change-Id: I80a1aef56b3a8fa0e1939e63dd2607e18757687d
---
M officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
M scripting/workben/bindings/drawmenubar.xml
M sd/inc/app.hrc
M sd/sdi/_drvwsh.sdi
M sd/sdi/sdraw.sdi
M sd/source/ui/view/drviews8.cxx
M sd/source/ui/view/outlnvs2.cxx
M sd/uiconfig/sdraw/menubar/menubar.xml
M sd/uiconfig/sdraw/toolbar/insertbar.xml
9 files changed, 57 insertions(+), 5 deletions(-)



diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
index d52bafc..86d84ea 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
@@ -733,8 +733,14 @@
 /prop
 prop oor:name=Properties oor:type=xs:int
   value1/value
-/prop
+/prop
   /node
+  node oor:name=.uno:ImportFromDrawFile oor:op=replace
+prop oor:name=Label oor:type=xs:string
+
+  value xml:lang=en-US~Drawing File.../value
+/prop
+  /node 
   node oor:name=.uno:ZoomPanning oor:op=replace
 prop oor:name=Label oor:type=xs:string
 
diff --git a/scripting/workben/bindings/drawmenubar.xml 
b/scripting/workben/bindings/drawmenubar.xml
index 4f0d1e9..fa05dbf 100644
--- a/scripting/workben/bindings/drawmenubar.xml
+++ b/scripting/workben/bindings/drawmenubar.xml
@@ -197,7 +197,7 @@
menu:menuitem menu:id=slot:10140 menu:helpid=10140 menu:label=Chart/
menu:menuitem menu:id=slot:5563 menu:helpid=5563 menu:label=Float~ing 
Frame.../
menu:menuseparator/
-   menu:menuitem menu:id=slot:27015 menu:helpid=27015 
menu:label=~File.../
+   menu:menuitem menu:id=slot:27015 menu:helpid=27015 
menu:label=~Drawing File.../
   /menu:menupopup
  /menu:menu
  menu:menu menu:id=slot:22 menu:label=F~ormat
diff --git a/sd/inc/app.hrc b/sd/inc/app.hrc
index 950a930..d68384e 100644
--- a/sd/inc/app.hrc
+++ b/sd/inc/app.hrc
@@ -74,6 +74,7 @@
 #define SID_DIAMODE (SID_SD_START+11)
 #define SID_INSERTPAGE  (SID_SD_START+14)
 #define SID_INSERTFILE  (SID_SD_START+15)
+#define SID_INSERTDRAWFILE  (SID_SD_START+150)
 #define SID_INSERTSYMBOL(SID_SD_START+16)
 #define SID_ZOOM_PANNING(SID_SD_START+17)
 #define SID_PRESENTATION_END(SID_SD_START+18)
diff --git a/sd/sdi/_drvwsh.sdi b/sd/sdi/_drvwsh.sdi
index 98f1539..3155b06 100644
--- a/sd/sdi/_drvwsh.sdi
+++ b/sd/sdi/_drvwsh.sdi
@@ -1334,6 +1334,11 @@
 ExecMethod = FuTemporary ;
 StateMethod = GetMenuState ;
 ]
+SID_INSERTDRAWFILE // ole : no, status : todo
+[
+ExecMethod = FuTemporary ;
+StateMethod = GetMenuState ;
+]
 SID_STYLE_FAMILY2 // ole : no, status : ?
 [
 ExecMethod = FuTemporary ;
diff --git a/sd/sdi/sdraw.sdi b/sd/sdi/sdraw.sdi
index d59d62d..71fad6e 100644
--- a/sd/sdi/sdraw.sdi
+++ b/sd/sdi/sdraw.sdi
@@ -3317,6 +3317,29 @@
 ToolBoxConfig = TRUE,
 GroupId = GID_INSERT;
 ]
+SfxVoidItem ImportFromDrawFile SID_INSERTDRAWFILE
+(SfxStringItem FileName ID_VAL_DUMMY1,SfxStringItem FilterName ID_VAL_DUMMY2)
+[
+/* flags: */
+AutoUpdate = FALSE,
+Cachable = Cachable,
+FastCall = FALSE,
+HasCoreId = FALSE,
+HasDialog = TRUE,
+ReadOnlyDoc = FALSE,
+Toggle = FALSE,
+Container = FALSE,
+RecordAbsolute = FALSE,
+RecordPerSet;
+Synchron;
+
+/* config: */
+AccelConfig = TRUE,
+MenuConfig = TRUE,
+StatusBarConfig = FALSE,
+ToolBoxConfig = TRUE,
+GroupId = GID_INSERT;
+]
 
 //--
 SfxVoidItem InsertAuthorField SID_INSERT_FLD_AUTHOR
diff --git a/sd/source/ui/view/drviews8.cxx b/sd/source/ui/view/drviews8.cxx
index ab297b7..ab6a293 100644
--- a/sd/source/ui/view/drviews8.cxx
+++ b/sd/source/ui/view/drviews8.cxx
@@ -225,6 +225,18 @@
 }
 break;
 
+case SID_INSERTDRAWFILE:  
+{
+Broadcast 
(ViewShellHint(ViewShellHint::HINT_COMPLEX_MODEL_CHANGE_START));
+SetCurrentFunction( FuInsertFile::Create( this, GetActiveWindow(), 
mpDrawView, GetDoc(), rReq ) );
+Broadcast 
(ViewShellHint(ViewShellHint::HINT_COMPLEX_MODEL_CHANGE_END));
+Cancel();
+rReq.Done ();
+
+Invalidate(SID_DRAWTBX_INSERT);
+}
+break;
+
 case SID_SELECT_BACKGROUND:
 case SID_PAGESETUP:  // BASIC ??
 {
diff --git a/sd/source/ui/view/outlnvs2.cxx b/sd/source/ui/view/outlnvs2.cxx
index 5a2061e..6b7511d 100644
--- 

Re: [PATCH] fdo#62099 UI: More intuitive text for menu 'Insert - File' C...

2013-04-03 Thread Regina Henschel

Hi Vishy,

Vishv Brahmbhatt (via Code Review) schrieb:

Hi,

I have submitted a patch for review:

 https://gerrit.libreoffice.org/3193

To pull it, you can do:

 git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/93/3193/1

fdo#62099 UI: More intuitive text for menu 'Insert - File'


the current item 'File...' can not only import 'draw' files but also own 
and foreign presentations, and plain text, html, and rtf-text.


Kind regards
Regina
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice