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>
This commit is contained in:
Gulsah Kose
2016-01-03 19:49:54 +02:00
committed by Maxim Monastirsky
parent d929e3a6b4
commit 1949cc74b9
7 changed files with 50 additions and 3 deletions

View File

@@ -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>

View File

@@ -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";
}
}

View File

@@ -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 */

View File

@@ -803,6 +803,11 @@ interface BaseTextEditView
StateMethod = StateViewOptions ;
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
SID_TRACK_CHANGES_BAR
[
ExecMethod = ExecViewOptions ;
StateMethod = StateViewOptions ;
]
}
interface GlobalContents

View File

@@ -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
()
[

View File

@@ -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 );

View File

@@ -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"/>