[Libreoffice-commits] .: 5 commits - filter/source sw/source
Cédric Bosdonnat
cbosdo at kemper.freedesktop.org
Mon Nov 21 05:28:21 PST 2011
filter/source/xslt/import/wordml/wordml2ooo_draw.xsl | 1
sw/source/core/tox/tox.cxx | 4 +
sw/source/core/unocore/unotext.cxx | 3 -
sw/source/ui/docvw/HeaderFooterWin.cxx | 6 +-
sw/source/ui/inc/olmenu.hxx | 1
sw/source/ui/lingu/olmenu.cxx | 45 +++++++++++++++++++
sw/source/ui/lingu/olmenu.hrc | 2
sw/source/ui/lingu/olmenu.src | 5 +-
8 files changed, 62 insertions(+), 5 deletions(-)
New commits:
commit 6af8887b41a8438d29b4743f238be7330516ecbc
Author: Cédric Bosdonnat <cedric.bosdonnat.ooo at free.fr>
Date: Mon Nov 21 13:49:06 2011 +0100
d#648250: added missing include in wordml2ooo_draw.xsl
diff --git a/filter/source/xslt/import/wordml/wordml2ooo_draw.xsl b/filter/source/xslt/import/wordml/wordml2ooo_draw.xsl
index 448923f..e36d7cd 100644
--- a/filter/source/xslt/import/wordml/wordml2ooo_draw.xsl
+++ b/filter/source/xslt/import/wordml/wordml2ooo_draw.xsl
@@ -27,6 +27,7 @@
-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml" xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:aml="http://schemas.microsoft.com/aml/2001/core" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:dat
astyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:ole="http://libreoffice.org/2011/xslt/ole" exclude-result-prefixes="w wx aml o dt v">
<xsl:include href="wordml2ooo_custom_draw.xsl"/>
+ <xsl:include href="wordml2ooo_path.xsl"/>
<xsl:key name="imagedata" match="w:binData" use="@w:name"/>
<xsl:key name="shapetype" match="v:shapetype" use="concat('#', @id)"/>
commit 9562b31e594eba4e6abf7879575b77a691ac1f88
Author: Cédric Bosdonnat <cedric.bosdonnat.ooo at free.fr>
Date: Mon Nov 21 12:05:22 2011 +0100
sw, added a message to a thrown uno::RuntimeException
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index 2886b36..c9d02d5 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -2501,7 +2501,8 @@ throw (uno::RuntimeException)
}
if(!aRef.is())
{
- throw uno::RuntimeException();
+ throw uno::RuntimeException( rtl::OUString::createFromAscii( "End of content node doesn't have the proper start node" ),
+ uno::Reference< uno::XInterface >( *this ) );
}
return aRef;
}
commit a1efc7fdcd80484977bc289d1d27b7b6d33757ff
Author: Thomas Collerton <tom.coll91 at gmail.com>
Date: Fri Nov 18 12:17:13 2011 +0100
Improved Header/Footer UI framerate
diff --git a/sw/source/ui/docvw/HeaderFooterWin.cxx b/sw/source/ui/docvw/HeaderFooterWin.cxx
index 1db769a..076ce17 100644
--- a/sw/source/ui/docvw/HeaderFooterWin.cxx
+++ b/sw/source/ui/docvw/HeaderFooterWin.cxx
@@ -191,7 +191,7 @@ SwHeaderFooterWin::SwHeaderFooterWin( SwEditWin* pEditWin, const SwPageFrm* pPag
m_pPopupMenu->SetItemText( FN_HEADERFOOTER_DELETE, aRewriter.Apply( aText ) );
SetPopupMenu( m_pPopupMenu );
- m_aFadeTimer.SetTimeout( 500 );
+ m_aFadeTimer.SetTimeout( 50 );
m_aFadeTimer.SetTimeoutHdl( LINK( this, SwHeaderFooterWin, FadeHandler ) );
}
@@ -501,9 +501,9 @@ void SwHeaderFooterWin::Select( )
IMPL_LINK( SwHeaderFooterWin, FadeHandler, Timer *, EMPTYARG )
{
if ( m_bIsAppearing && m_nFadeRate > 0 )
- m_nFadeRate -= 10;
+ m_nFadeRate -= 25;
else if ( !m_bIsAppearing && m_nFadeRate < 100 )
- m_nFadeRate += 10;
+ m_nFadeRate += 25;
if ( m_nFadeRate != 100 && !IsVisible() )
{
commit 2cc144286d81236e8677a551a458172ca9546c29
Author: Cédric Bosdonnat <cedric.bosdonnat at free.fr>
Date: Mon Nov 21 11:48:16 2011 +0100
sw, Add hyperlinks by default in Table of Contents
diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx
index 57102e8..62e95ec 100644
--- a/sw/source/core/tox/tox.cxx
+++ b/sw/source/core/tox/tox.cxx
@@ -325,6 +325,7 @@ SwForm::SwForm( TOXTypes eTyp ) // #i21237#
SwFormTokens aTokens;
if (TOX_CONTENT == eType)
{
+ aTokens.push_back(SwFormToken(TOKEN_LINK_START));
aTokens.push_back(SwFormToken(TOKEN_ENTRY_NO));
aTokens.push_back(SwFormToken(TOKEN_ENTRY_TEXT));
}
@@ -344,6 +345,9 @@ SwForm::SwForm( TOXTypes eTyp ) // #i21237#
aTokens.push_back(SwFormToken(TOKEN_PAGE_NUMS));
}
+ if (TOX_CONTENT == eType)
+ aTokens.push_back(SwFormToken(TOKEN_LINK_END));
+
SetTemplate( 0, SW_RESSTR( nPoolId++ ));
if(TOX_INDEX == eType)
commit 68f1b7dac7e77f68050f73c8692b8180f6e7cc65
Author: Cédric Bosdonnat <cedric.bosdonnat at free.fr>
Date: Fri Nov 18 16:35:31 2011 +0100
sw: added explanations entry to grammar checking popup menu
diff --git a/sw/source/ui/inc/olmenu.hxx b/sw/source/ui/inc/olmenu.hxx
index bc2c7a1..d0d45b7 100644
--- a/sw/source/ui/inc/olmenu.hxx
+++ b/sw/source/ui/inc/olmenu.hxx
@@ -52,6 +52,7 @@ class SwSpellPopup : public PopupMenu
::com::sun::star::linguistic2::XSpellAlternatives > xSpellAlt;
::com::sun::star::uno::Sequence< rtl::OUString > aSuggestions;
+ rtl::OUString sExplanationLink;
LanguageType nCheckedLanguage;
LanguageType nGuessLangWord;
diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx
index 0bb8f59..7133237 100644
--- a/sw/source/ui/lingu/olmenu.cxx
+++ b/sw/source/ui/lingu/olmenu.cxx
@@ -59,7 +59,9 @@
#include <svl/svstdarr.hxx>
#endif
+#include <comphelper/anytostring.hxx>
#include <comphelper/processfactory.hxx>
+#include <cppuhelper/exc_hlp.hxx>
#include <editeng/acorrcfg.hxx>
#include <editeng/svxacorr.hxx>
#include <editeng/langitem.hxx>
@@ -102,6 +104,8 @@
#include <com/sun/star/linguistic2/XLanguageGuessing.hpp>
#include <com/sun/star/linguistic2/XSpellChecker1.hpp>
#include <com/sun/star/uno/Any.hxx>
+#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
+#include <com/sun/star/system/XSystemShellExecute.hpp>
using namespace ::com::sun::star;
@@ -571,6 +575,7 @@ SwSpellPopup::SwSpellPopup(
PopupMenu( SW_RES(MN_SPELL_POPUP) ),
pSh( pWrtSh ),
aSuggestions( rSuggestions ),
+sExplanationLink( ),
bGrammarResults( true ),
aInfo16( SW_RES(IMG_INFO_16) )
{
@@ -582,6 +587,26 @@ aInfo16( SW_RES(IMG_INFO_16) )
InsertItem( MN_SHORT_COMMENT, aMessageText, MIB_NOSELECT, nPos++ );
SetItemImage( MN_SHORT_COMMENT, aInfo16 );
+ // Add an item to show detailled infos if the FullCommentURL property is defined
+ beans::PropertyValues aProperties = rResult.aErrors[ nErrorInResult ].aProperties;
+ {
+ sal_Int32 i = 0;
+ while ( !sExplanationLink.isEmpty() && i < aProperties.getLength() )
+ {
+ if ( aProperties[i].Name.equalsAscii( "FullCommentURL" ) )
+ {
+ uno::Any aValue = aProperties[i].Value;
+ aValue >>= sExplanationLink;
+ }
+ ++i;
+ }
+ }
+
+ if ( !sExplanationLink.isEmpty( ) )
+ {
+ InsertItem( MN_EXPLANATION_LINK, String( SW_RES( STR_EXPLANATION_LINK ) ), MIB_TEXT | MIB_HELP, nPos++ );
+ }
+
SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS);
InsertSeparator( nPos++ );
@@ -818,6 +843,26 @@ void SwSpellPopup::Execute( sal_uInt16 nId )
}
}
}
+ else if ( nId == MN_EXPLANATION_LINK && !sExplanationLink.isEmpty() )
+ {
+ try
+ {
+ uno::Reference< com::sun::star::system::XSystemShellExecute > xSystemShellExecute(
+ ::comphelper::getProcessServiceFactory()->createInstance(
+ DEFINE_CONST_UNICODE("com.sun.star.system.SystemShellExecute") ), uno::UNO_QUERY_THROW );
+ xSystemShellExecute->execute( sExplanationLink, rtl::OUString(),
+ com::sun::star::system::SystemShellExecuteFlags::DEFAULTS );
+ }
+ catch ( uno::Exception& )
+ {
+ uno::Any exc( ::cppu::getCaughtException() );
+ rtl::OUString msg( ::comphelper::anyToString( exc ) );
+ const SolarMutexGuard guard;
+ ErrorBox aErrorBox( NULL, WB_OK, msg );
+ aErrorBox.SetText( rtl::OUString::createFromAscii( "Explanations" ) );
+ aErrorBox.Execute();
+ }
+ }
else
{
// Set language for selection or for paragraph...
diff --git a/sw/source/ui/lingu/olmenu.hrc b/sw/source/ui/lingu/olmenu.hrc
index 887f8a2..1d65bbf 100644
--- a/sw/source/ui/lingu/olmenu.hrc
+++ b/sw/source/ui/lingu/olmenu.hrc
@@ -39,6 +39,7 @@
#define STR_LANGSTATUS_MORE (RC_LINGU_BEGIN + 7)
#define STR_IGNORE_SELECTION (RC_LINGU_BEGIN + 8)
#define STR_RESET_TO_DEFAULT_LANGUAGE (RC_LINGU_BEGIN + 9)
+#define STR_EXPLANATION_LINK (RC_LINGU_BEGIN + 10)
#define IMG_INFO_16 (RC_LINGU_BEGIN + 100)
@@ -52,6 +53,7 @@
#define MN_SET_LANGUAGE_PARAGRAPH 206
#define MN_SET_LANGUAGE_ALL_TEXT 207
#define MN_SHORT_COMMENT 208
+#define MN_EXPLANATION_LINK 209
// id range for dictionaries sub menu
#define MN_DICTIONARIES_START 300
diff --git a/sw/source/ui/lingu/olmenu.src b/sw/source/ui/lingu/olmenu.src
index 0f9b77e..5b2d8b7 100644
--- a/sw/source/ui/lingu/olmenu.src
+++ b/sw/source/ui/lingu/olmenu.src
@@ -127,7 +127,10 @@ String STR_IGNORE_SELECTION
{
Text [ en-US ] = "Ignore" ;
};
-
+String STR_EXPLANATION_LINK
+{
+ Text [ en-US ] = "Explanations..." ;
+};
Image IMG_INFO_16
{
ImageBitmap = Bitmap { File = "info_16.png" ; };
More information about the Libreoffice-commits
mailing list