[Libreoffice-commits] core.git: 3 commits - officecfg/registry sd/source
Ivan Timofeev
timofeev.i.s at gmail.com
Sun Sep 1 09:28:17 PDT 2013
officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu | 16 --
sd/source/ui/dlg/tpaction.cxx | 56 +++++-----
sd/source/ui/inc/tpaction.hxx | 6 -
3 files changed, 31 insertions(+), 47 deletions(-)
New commits:
commit a3411f532c40b4326d5ee2e1d2fe23fea457e0a6
Author: Ivan Timofeev <timofeev.i.s at gmail.com>
Date: Sun Sep 1 16:38:29 2013 +0400
String->OUString
Change-Id: I4d822fdb3dfb1e07d2c0e0352809f9d51bf9dfc4
diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx
index 53e5b1a..225d01c 100644
--- a/sd/source/ui/dlg/tpaction.cxx
+++ b/sd/source/ui/dlg/tpaction.cxx
@@ -71,7 +71,7 @@ using namespace ::com::sun::star;
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
-#define DOCUMENT_TOKEN (sal_Unicode('#'))
+#define DOCUMENT_TOKEN '#'
/**
* Constructor of the Tab dialog: appends the pages to the dialog
@@ -91,8 +91,8 @@ SdActionDlg::SdActionDlg (
SetTabPage( pNewPage );
- String aStr( pNewPage->GetText() );
- if( aStr.Len() )
+ OUString aStr( pNewPage->GetText() );
+ if( !aStr.isEmpty() )
SetText( aStr );
}
@@ -238,7 +238,7 @@ void SdTPAction::Construct()
embed::VerbDescriptor aVerb = aVerbs[i];
if( aVerb.VerbAttributes & embed::VerbAttributes::MS_VERBATTR_ONCONTAINERMENU )
{
- String aTmp( aVerb.VerbName );
+ OUString aTmp( aVerb.VerbName );
aVerbVector.push_back( aVerb.VerbID );
aLbOLEAction.InsertEntry( MnemonicGenerator::EraseAllMnemonicChars( aTmp ) );
}
@@ -287,14 +287,14 @@ sal_Bool SdTPAction::FillItemSet( SfxItemSet& rAttrs )
else
rAttrs.InvalidateItem( ATTR_ACTION );
- String aFileName = GetEditText( sal_True );
- if( aFileName.Len() == 0 )
+ OUString aFileName = GetEditText( sal_True );
+ if( aFileName.isEmpty() )
rAttrs.InvalidateItem( ATTR_ACTION_FILENAME );
else
{
if( mpDoc && mpDoc->GetDocSh() && mpDoc->GetDocSh()->GetMedium() )
{
- String aBaseURL = mpDoc->GetDocSh()->GetMedium()->GetBaseURL();
+ OUString aBaseURL = mpDoc->GetDocSh()->GetMedium()->GetBaseURL();
if( eCA == presentation::ClickAction_SOUND ||
eCA == presentation::ClickAction_DOCUMENT ||
eCA == presentation::ClickAction_PROGRAM )
@@ -319,7 +319,7 @@ sal_Bool SdTPAction::FillItemSet( SfxItemSet& rAttrs )
void SdTPAction::Reset( const SfxItemSet& rAttrs )
{
presentation::ClickAction eCA = presentation::ClickAction_NONE;
- String aFileName;
+ OUString aFileName;
// aLbAction
if( rAttrs.GetItemState( ATTR_ACTION ) != SFX_ITEM_DONTCARE )
@@ -350,7 +350,7 @@ void SdTPAction::Reset( const SfxItemSet& rAttrs )
case presentation::ClickAction_DOCUMENT:
{
if( comphelper::string::getTokenCount(aFileName, DOCUMENT_TOKEN) == 2 )
- aLbTreeDocument.SelectEntry( aFileName.GetToken( 1, DOCUMENT_TOKEN ) );
+ aLbTreeDocument.SelectEntry( aFileName.getToken( 1, DOCUMENT_TOKEN ) );
}
break;
@@ -418,13 +418,13 @@ void SdTPAction::OpenFileDialog()
}
else
{
- String aFile( GetEditText() );
+ OUString aFile( GetEditText() );
if (bSound)
{
SdOpenSoundFileDialog aFileDialog;
- if( !aFile.Len() )
+ if( aFile.isEmpty() )
aFile = SvtPathOptions().GetGraphicPath();
aFileDialog.SetPath( aFile );
@@ -455,7 +455,7 @@ void SdTPAction::OpenFileDialog()
sfx2::FileDialogHelper aFileDialog(
ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION, 0);
- if (bDocument && !aFile.Len())
+ if (bDocument && aFile.isEmpty())
aFile = SvtPathOptions().GetWorkPath();
aFileDialog.SetDisplayDirectory( aFile );
@@ -465,7 +465,7 @@ void SdTPAction::OpenFileDialog()
// filter makes the (Windows system) open file dialog follow
// links on the desktop to directories.
aFileDialog.AddFilter (
- String (SfxResId (STR_SFX_FILTERNAME_ALL)),
+ SFX2_RESSTR(STR_SFX_FILTERNAME_ALL),
OUString("*.*"));
@@ -678,7 +678,7 @@ IMPL_LINK_NOARG(SdTPAction, SelectTreeHdl)
IMPL_LINK_NOARG(SdTPAction, CheckFileHdl)
{
- String aFile( GetEditText() );
+ OUString aFile( GetEditText() );
if( aFile != aLastFile )
{
@@ -749,17 +749,17 @@ void SdTPAction::SetActualClickAction( presentation::ClickAction eCA )
//------------------------------------------------------------------------
-void SdTPAction::SetEditText( String const & rStr )
+void SdTPAction::SetEditText( OUString const & rStr )
{
presentation::ClickAction eCA = GetActualClickAction();
- String aText(rStr);
+ OUString aText(rStr);
// possibly convert URI back to system path
switch( eCA )
{
case presentation::ClickAction_DOCUMENT:
if( comphelper::string::getTokenCount(rStr, DOCUMENT_TOKEN) == 2 )
- aText = rStr.GetToken( 0, DOCUMENT_TOKEN );
+ aText = rStr.getToken( 0, DOCUMENT_TOKEN );
// fallthrough inteded
case presentation::ClickAction_SOUND:
@@ -768,9 +768,9 @@ void SdTPAction::SetEditText( String const & rStr )
INetURLObject aURL( aText );
// try to convert to system path
- String aTmpStr(aURL.getFSysPath(INetURLObject::FSYS_DETECT));
+ OUString aTmpStr(aURL.getFSysPath(INetURLObject::FSYS_DETECT));
- if( aTmpStr.Len() )
+ if( !aTmpStr.isEmpty() )
aText = aTmpStr; // was a system path
}
break;
@@ -786,7 +786,7 @@ void SdTPAction::SetEditText( String const & rStr )
break;
case presentation::ClickAction_VERB:
{
- ::std::vector< long >::iterator aFound( ::std::find( aVerbVector.begin(), aVerbVector.end(), rStr.ToInt32() ) );
+ ::std::vector< long >::iterator aFound( ::std::find( aVerbVector.begin(), aVerbVector.end(), rStr.toInt32() ) );
if( aFound != aVerbVector.end() )
aLbOLEAction.SelectEntryPos( static_cast< short >( aFound - aVerbVector.begin() ) );
}
@@ -812,9 +812,9 @@ void SdTPAction::SetEditText( String const & rStr )
//------------------------------------------------------------------------
-String SdTPAction::GetEditText( sal_Bool bFullDocDestination )
+OUString SdTPAction::GetEditText( sal_Bool bFullDocDestination )
{
- String aStr;
+ OUString aStr;
presentation::ClickAction eCA = GetActualClickAction();
switch( eCA )
@@ -851,11 +851,11 @@ String SdTPAction::GetEditText( sal_Bool bFullDocDestination )
// validate file URI
INetURLObject aURL( aStr );
- String aBaseURL;
+ OUString aBaseURL;
if( mpDoc && mpDoc->GetDocSh() && mpDoc->GetDocSh()->GetMedium() )
aBaseURL = mpDoc->GetDocSh()->GetMedium()->GetBaseURL();
- if( aStr.Len() && aURL.GetProtocol() == INET_PROT_NOT_VALID )
+ if( !aStr.isEmpty() && aURL.GetProtocol() == INET_PROT_NOT_VALID )
aURL = INetURLObject( ::URIHelper::SmartRel2Abs( INetURLObject(aBaseURL), aStr, URIHelper::GetMaybeFileHdl(), true, false ) );
// get adjusted file name
@@ -866,11 +866,11 @@ String SdTPAction::GetEditText( sal_Bool bFullDocDestination )
aLbTreeDocument.Control::IsVisible() &&
aLbTreeDocument.GetSelectionCount() > 0 )
{
- String aTmpStr( aLbTreeDocument.GetSelectEntry() );
- if( aTmpStr.Len() )
+ OUString aTmpStr( aLbTreeDocument.GetSelectEntry() );
+ if( !aTmpStr.isEmpty() )
{
- aStr.Append( DOCUMENT_TOKEN );
- aStr.Append( aTmpStr );
+ aStr += OUString(DOCUMENT_TOKEN);
+ aStr += aTmpStr;
}
}
diff --git a/sd/source/ui/inc/tpaction.hxx b/sd/source/ui/inc/tpaction.hxx
index cc16796..b5c6da6 100644
--- a/sd/source/ui/inc/tpaction.hxx
+++ b/sd/source/ui/inc/tpaction.hxx
@@ -81,7 +81,7 @@ private:
sal_Bool bTreeUpdated;
std::vector<com::sun::star::presentation::ClickAction> maCurrentActions;
- String aLastFile;
+ OUString aLastFile;
::std::vector< long > aVerbVector;
//------------------------------------
@@ -96,8 +96,8 @@ private:
::com::sun::star::presentation::ClickAction GetActualClickAction();
void SetActualClickAction( ::com::sun::star::presentation::ClickAction eCA );
void SetActualAnimationEffect( ::com::sun::star::presentation::AnimationEffect eAE );
- void SetEditText( String const & rStr );
- String GetEditText( sal_Bool bURL = sal_False );
+ void SetEditText( OUString const & rStr );
+ OUString GetEditText( sal_Bool bURL = sal_False );
sal_uInt16 GetClickActionSdResId( ::com::sun::star::presentation::ClickAction eCA );
sal_uInt16 GetAnimationEffectSdResId( ::com::sun::star::presentation::AnimationEffect eAE );
commit 65c85266ce1f8b12a33dfaa8efff365854f17dd5
Author: Ivan Timofeev <timofeev.i.s at gmail.com>
Date: Sun Sep 1 17:48:32 2013 +0400
fdo#67584: remove .uno:FlipVertical from WriterCommands.xcu
mismerge in c991fb49aa174f300be0b978d89bc63e01e0aa2b
Change-Id: I7d890495bac0fa1a458a86c8625158c94cdba717
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
index 76ff150..85399bb 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
@@ -720,14 +720,6 @@
<value xml:lang="en-US">Outline to ~Clipboard</value>
</prop>
</node>
- <node oor:name=".uno:FlipVertical" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Flip Horizontally</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
<node oor:name=".uno:RotateLeft" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Rotate 90° ~Left</value>
commit 7391f17b10d934382428fe1e7f9cb5ff68f45b76
Author: Ivan Timofeev <timofeev.i.s at gmail.com>
Date: Sun Sep 1 16:16:11 2013 +0400
Revert "fdo#67584 - Incorrect Flip Labels"
This reverts commit d9ead65397ea4b6d4bcc66cf304653bb71e14c9c.
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
index 6f69a20..76ff150 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
@@ -722,15 +722,7 @@
</node>
<node oor:name=".uno:FlipVertical" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Flip Vertically</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:FlipHorizontal" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Flip Horizontal</value>
+ <value xml:lang="en-US">Flip Horizontally</value>
</prop>
<prop oor:name="Properties" oor:type="xs:int">
<value>1</value>
More information about the Libreoffice-commits
mailing list