diff options
author | Gulsah Kose <gulsah.1004@gmail.com> | 2016-01-03 19:49:54 +0200 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2016-01-05 21:39:21 +0000 |
commit | 1949cc74b929e13799686b22b450ded8dbf4c064 (patch) | |
tree | abc7d4c463f7f7264d6ec42a03f60981090a9206 | |
parent | d929e3a6b478b0bc02aa90ba326aab79353a7799 (diff) |
tdf#90187 Added uno command for track changes bar.
v2: Solved dimmed button problem and changed controller class
for listen trackchangesbar button.
Change-Id: I5a921ad9bb6c8e53d3043e86492d0923a998f3d2
Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/21064
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Tested-by: Maxim Monastirsky <momonasmon@gmail.com>
-rw-r--r-- | officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu | 8 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbxdrctl.cxx | 13 | ||||
-rw-r--r-- | sw/inc/cmdid.h | 1 | ||||
-rw-r--r-- | sw/sdi/_viewsh.sdi | 5 | ||||
-rw-r--r-- | sw/sdi/swriter.sdi | 24 | ||||
-rw-r--r-- | sw/source/uibase/app/swmodule.cxx | 1 | ||||
-rw-r--r-- | sw/uiconfig/swriter/toolbar/standardbar.xml | 1 |
7 files changed, 50 insertions, 3 deletions
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu index fff1246c53c7..7910f0bf9882 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu @@ -232,6 +232,14 @@ <value>1</value> </prop> </node> + <node oor:name=".uno:TrackChangesBar" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">Show Track Changes Bar</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> <node oor:name=".uno:ShowTrackedChanges" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">~Show Changes</value> diff --git a/svx/source/tbxctrls/tbxdrctl.cxx b/svx/source/tbxctrls/tbxdrctl.cxx index 0c40f0a404f7..a7de72434894 100644 --- a/svx/source/tbxctrls/tbxdrctl.cxx +++ b/svx/source/tbxctrls/tbxdrctl.cxx @@ -55,10 +55,17 @@ void SAL_CALL SvxTbxCtlDraw::initialize( const css::uno::Sequence< css::uno::Any * "private:resource/toolbar/toolbar" in draw and impress. Control is added for this * difference. */ - if ( m_sModuleName == "com.sun.star.presentation.PresentationDocument" || m_sModuleName == "com.sun.star.drawing.DrawingDocument" ) - m_sToolboxName="private:resource/toolbar/toolbar"; + if( m_aCommandURL==".uno:TrackChangesBar") + { + m_sToolboxName="private:resource/toolbar/changes"; + } else - m_sToolboxName="private:resource/toolbar/drawbar"; + { + if ( m_sModuleName == "com.sun.star.presentation.PresentationDocument" || m_sModuleName == "com.sun.star.drawing.DrawingDocument" ) + m_sToolboxName="private:resource/toolbar/toolbar"; + else + m_sToolboxName="private:resource/toolbar/drawbar"; + } } diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h index cd0ce77edbf0..acb112b13669 100644 --- a/sw/inc/cmdid.h +++ b/sw/inc/cmdid.h @@ -701,6 +701,7 @@ #define FN_SELECTION_MODE_DEFAULT (FN_SELECTION + 90) /* use default selection mode - not block mode */ #define FN_SELECTION_MODE_BLOCK (FN_SELECTION + 91) /* switch on block selection */ #define SID_JUMP_TO_SPECIFIC_PAGE (FN_SELECTION + 92) +#define SID_TRACK_CHANGES_BAR (FN_SELECTION + 93) /* shows/hides track changes bar */ // QUERY-Block #define FN_TXTATR_INET (FN_QUERY +29) /* INet-Attribut */ diff --git a/sw/sdi/_viewsh.sdi b/sw/sdi/_viewsh.sdi index 78deb1fd17ab..58573f4b1930 100644 --- a/sw/sdi/_viewsh.sdi +++ b/sw/sdi/_viewsh.sdi @@ -803,6 +803,11 @@ interface BaseTextEditView StateMethod = StateViewOptions ; DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR"; ] + SID_TRACK_CHANGES_BAR + [ + ExecMethod = ExecViewOptions ; + StateMethod = StateViewOptions ; + ] } interface GlobalContents diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi index a80d38caa026..f43ed50ef1f8 100644 --- a/sw/sdi/swriter.sdi +++ b/sw/sdi/swriter.sdi @@ -91,6 +91,30 @@ SfxBoolItem TrackChanges FN_REDLINE_ON GroupId = GID_EDIT; ] +SfxAllEnumItem TrackChangesBar SID_TRACK_CHANGES_BAR + +[ + /* flags: */ + AutoUpdate = TRUE, + Cachable = Cachable, + FastCall = FALSE, + HasCoreId = FALSE, + HasDialog = FALSE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = FALSE, + Synchron; + + Readonly = FALSE, + + /* config: */ + AccelConfig = FALSE, + MenuConfig = FALSE, + StatusBarConfig = FALSE, + ToolBoxConfig = TRUE, + GroupId = GID_EDIT; +] + SfxVoidItem AddAllUnknownWords FN_ADD_UNKNOWN () [ diff --git a/sw/source/uibase/app/swmodule.cxx b/sw/source/uibase/app/swmodule.cxx index 2e868648ecd2..0f3af657eddf 100644 --- a/sw/source/uibase/app/swmodule.cxx +++ b/sw/source/uibase/app/swmodule.cxx @@ -286,6 +286,7 @@ void SwDLL::RegisterControls() SwModule* pMod = SW_MOD(); SvxTbxCtlDraw::RegisterControl(SID_INSERT_DRAW, pMod ); + SvxTbxCtlDraw::RegisterControl(SID_TRACK_CHANGES_BAR, pMod ); SwTbxAnchor::RegisterControl(FN_TOOL_ANCHOR, pMod ); SwTbxFieldCtrl::RegisterControl(FN_INSERT_FIELD_CTRL, pMod ); SwTbxAutoTextCtrl::RegisterControl(FN_GLOSSARY_DLG, pMod ); diff --git a/sw/uiconfig/swriter/toolbar/standardbar.xml b/sw/uiconfig/swriter/toolbar/standardbar.xml index b917956080b4..2b69d33659a0 100644 --- a/sw/uiconfig/swriter/toolbar/standardbar.xml +++ b/sw/uiconfig/swriter/toolbar/standardbar.xml @@ -69,6 +69,7 @@ <toolbar:toolbaritem xlink:href=".uno:InsertAnnotation" toolbar:helpid="20329"/> <toolbar:toolbaritem xlink:href=".uno:ShowTrackedChanges" toolbar:visible="false"/> <toolbar:toolbaritem xlink:href=".uno:TrackChanges"/> + <toolbar:toolbaritem xlink:href=".uno:TrackChangesBar"/> <toolbar:toolbarseparator/> <toolbar:toolbaritem xlink:href=".uno:Line" toolbar:helpid="10102"/> <toolbar:toolbaritem xlink:href=".uno:BasicShapes" toolbar:helpid="11002"/> |