openoffice-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aronsoyol <aronso...@gmail.com>
Subject Please help me
Date Mon, 02 Mar 2015 01:01:19 GMT
Hi all
I modified source code to support vertical left to right writing mode in
the text box. and it works very well.
Then I want to added a new button to draw it. And create a new slot
SID_DRAW_TEXT_VERTICAL_LR slot to response its MouseButtonDown event

[image: 埋め込み画像 5]
Screen shot : https://www.dropbox.com/s/346my16e4j0juhb/drawbar.jpg?dl=0

What I did with the source code is shown as below
But it do not work
Please help me, Best regards


diff --git a/main/svx/inc/svx/svxids.hrc b/main/svx/inc/svx/svxids.hrc
index da7e318..cdd1a89 100644
--- a/main/svx/inc/svx/svxids.hrc
+++ b/main/svx/inc/svx/svxids.hrc
@@ -1283,9 +1283,9 @@

 #define FN_SVX_SET_NUMBER                              (SID_SVX_START +
1117)
 #define FN_SVX_SET_BULLET                              (SID_SVX_START +
1118)
-
+#define SID_DRAW_TEXT_VERTICAL_LR   (SID_SVX_START + 1119)
 // IMPORTANT NOTE: adjust SID_SVX_FIRSTFREE, when adding new slot id
-#define SID_SVX_FIRSTFREE                               (FN_SVX_SET_BULLET
+ 1)
+#define SID_SVX_FIRSTFREE
(*SID_DRAW_TEXT_VERTICAL_LR
*+ 1)

diff --git a/main/configmgr/qa/unit/data.xcd
b/main/configmgr/qa/unit/data.xcd
index b217d27..eef97d1 100644
--- a/main/configmgr/qa/unit/data.xcd
+++ b/main/configmgr/qa/unit/data.xcd
@@ -2135,6 +2135,14 @@
           <value>1</value>
         </prop>
       </node>
+      <node oor:name=".*uno:VerticalLeftToRightText*" oor:op="replace">
+          <prop oor:name="Label" oor:type="xs:string">
+              <value xml:lang="x-no-translate"></value><value
xml:lang="en-US">Vertical Left To RightText</value>
+          </prop>
+          <prop oor:name="Properties" oor:type="xs:int">
+              <value>1</value>
+          </prop>
+      </node>
       <node oor:name=".uno:VerticalCaption" oor:op="replace">
         <prop oor:name="Label" oor:type="xs:string">
           <value xml:lang="x-no-translate"></value><value
xml:lang="en-US">Vertical Callouts</value>


diff --git
a/main/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
b/main/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
index cb7c1ec..c880c48 100644
---
a/main/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
+++
b/main/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
@@ -5659,6 +5659,14 @@
                     <value>1</value>
                 </prop>
             </node>
+            <node oor:name=".*uno:VerticalLeftToRightText*"
oor:op="replace">
+                <prop oor:name="Label" oor:type="xs:string">
+                    <value xml:lang="en-US">Vertical Left To
RightText</value>
+                </prop>
+                <prop oor:name="Properties" oor:type="xs:int">
+                    <value>1</value>
+                </prop>
+            </node>
             <node oor:name=".uno:ViewDataSourceBrowser" oor:op="replace">
                 <prop oor:name="Label" oor:type="xs:string">
                     <value xml:lang="en-US">~Data Sources</value>

diff --git a/main/svx/sdi/svx.sdi b/main/svx/sdi/svx.sdi
index 09f907e..f34d30b 100644
--- a/main/svx/sdi/svx.sdi
+++ b/main/svx/sdi/svx.sdi
@@ -11510,6 +11510,32 @@ SfxBoolItem VerticalText SID_DRAW_TEXT_VERTICAL
 ]

 //--------------------------------------------------------------------------
*+SfxBoolItem VerticalLeftToRightText SID_DRAW_TEXT_VERTICAL_LR*
+
+[
+       /* flags: */
+       AutoUpdate = TRUE,
+       Cachable = Cachable,
+       FastCall = FALSE,
+       HasCoreId = FALSE,
+       HasDialog = FALSE,
+       ReadOnlyDoc = FALSE,
+       Toggle = FALSE,
+       Container = FALSE,
+       RecordAbsolute = FALSE,
+       RecordPerSet;
+       Synchron;
+
+       Readonly = FALSE,
+
+       /* config: */
+       AccelConfig = TRUE,
+       MenuConfig = TRUE,
+       StatusBarConfig = FALSE,
+       ToolBoxConfig = TRUE,
+       GroupId = GID_DRAWING;
+]
+//--------------------------------------------------------------------------

diff --git a/main/sw/uiconfig/swriter/toolbar/drawbar.xml
b/main/sw/uiconfig/swriter/toolbar/drawbar.xml
index ef317dd..6c87d7d 100644
--- a/main/sw/uiconfig/swriter/toolbar/drawbar.xml
+++ b/main/sw/uiconfig/swriter/toolbar/drawbar.xml
@@ -35,6 +35,7 @@
  <toolbar:toolbaritem xlink:href=".uno:Pie" toolbar:visible="false"/>
  <toolbar:toolbaritem xlink:href=".uno:CircleCut" toolbar:visible="false"/>
  <toolbar:toolbaritem xlink:href=".uno:DrawText"/>
*+ <toolbar:toolbaritem xlink:href=".uno:VerticalLeftToRightText"/>*
  <toolbar:toolbaritem xlink:href=".uno:VerticalText"/>
  <toolbar:toolbaritem xlink:href=".uno:Text_Marquee"
toolbar:visible="false"/>
  <toolbar:toolbaritem xlink:href=".uno:DrawCaption"/>





2015-02-27 16:49 GMT+09:00 Hung Mark <marklh9@gmail.com>:

> https://wiki.openoffice.org/wiki/Extensions_Packager
>
> 2015-02-27 14:59 GMT+08:00 aronsoyol <aronsoyol@gmail.com>:
>
>> Hi all
>> How to insert a new button into the toolbar, and create the corresponding
>> UNO command?
>>
>> Best regards
>> --
>> Aron
>>
>> _______________________________________________
>> LibreOffice mailing list
>> LibreOffice@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/libreoffice
>>
>>
>
>
> --
> Mark Hung
>



-- 
Aron



-- 
Aron

Mime
  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message