[Libreoffice-commits] core.git: comphelper/source include/comphelper sd/source svx/source

2014-07-03 Thread Stephan Bergmann
 comphelper/source/misc/accessibleselectionhelper.cxx  |8 
 comphelper/source/misc/accimplaccess.cxx  |2 +-
 include/comphelper/accessibleselectionhelper.hxx  |2 +-
 include/comphelper/accimplaccess.hxx  |2 +-
 sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx |2 +-
 sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx |2 +-
 sd/source/ui/inc/AccessibleDocumentViewBase.hxx   |2 +-
 sd/source/ui/inc/AccessibleDrawDocumentView.hxx   |2 +-
 svx/source/accessibility/charmapacc.cxx   |2 +-
 svx/source/inc/charmapacc.hxx |2 +-
 10 files changed, 13 insertions(+), 13 deletions(-)

New commits:
commit 2134c9653ef1744cb6b422644673ed086f4f663d
Author: Stephan Bergmann sberg...@redhat.com
Date:   Thu Jul 3 11:51:01 2014 +0200

comphelper: sal_Bool - bool

Change-Id: I7d7ae1f5ddff0cf7d11a407b190256f37a71d48a

diff --git a/comphelper/source/misc/accessibleselectionhelper.cxx 
b/comphelper/source/misc/accessibleselectionhelper.cxx
index 35c6622..814faa1 100644
--- a/comphelper/source/misc/accessibleselectionhelper.cxx
+++ b/comphelper/source/misc/accessibleselectionhelper.cxx
@@ -42,7 +42,7 @@ namespace comphelper
 
 void SAL_CALL OCommonAccessibleSelection::selectAccessibleChild( sal_Int32 
nChildIndex ) throw (IndexOutOfBoundsException, RuntimeException)
 {
-implSelect( nChildIndex, sal_True );
+implSelect( nChildIndex, true );
 }
 
 
@@ -54,13 +54,13 @@ namespace comphelper
 
 void SAL_CALL OCommonAccessibleSelection::clearAccessibleSelection(  ) 
throw (RuntimeException)
 {
-implSelect( ACCESSIBLE_SELECTION_CHILD_ALL, sal_False );
+implSelect( ACCESSIBLE_SELECTION_CHILD_ALL, false );
 }
 
 
 void SAL_CALL OCommonAccessibleSelection::selectAllAccessibleChildren(  ) 
throw (RuntimeException)
 {
-implSelect( ACCESSIBLE_SELECTION_CHILD_ALL, sal_True );
+implSelect( ACCESSIBLE_SELECTION_CHILD_ALL, true );
 }
 
 
@@ -102,7 +102,7 @@ namespace comphelper
 
 void SAL_CALL OCommonAccessibleSelection::deselectAccessibleChild( 
sal_Int32 nSelectedChildIndex ) throw (IndexOutOfBoundsException, 
RuntimeException)
 {
-implSelect( nSelectedChildIndex, sal_False );
+implSelect( nSelectedChildIndex, false );
 }
 
 
diff --git a/comphelper/source/misc/accimplaccess.cxx 
b/comphelper/source/misc/accimplaccess.cxx
index 6cf5637..96f255d 100644
--- a/comphelper/source/misc/accimplaccess.cxx
+++ b/comphelper/source/misc/accimplaccess.cxx
@@ -84,7 +84,7 @@ namespace comphelper
 }
 
 
-void OAccessibleImplementationAccess::setStateBit( const sal_Int16 
_nState, const sal_Bool _bSet )
+void OAccessibleImplementationAccess::setStateBit( const sal_Int16 
_nState, const bool _bSet )
 {
 OSL_ENSURE( _nState = 0  static_cast sal_uInt16 (_nState)  
sizeof( sal_Int64 ) * 8, OAccessibleImplementationAccess::setStateBit: no more 
bits (shutting down the universe now)! );
 
diff --git a/include/comphelper/accessibleselectionhelper.hxx 
b/include/comphelper/accessibleselectionhelper.hxx
index dbc4c20..4bb64a9 100644
--- a/include/comphelper/accessibleselectionhelper.hxx
+++ b/include/comphelper/accessibleselectionhelper.hxx
@@ -62,7 +62,7 @@ namespace comphelper
 
 // select the specified child = watch for special ChildIndexes 
(ACCESSIBLE_SELECTION_CHILD_xxx)
 virtual void
-implSelect( sal_Int32 nAccessibleChildIndex, sal_Bool bSelect )
+implSelect( sal_Int32 nAccessibleChildIndex, bool bSelect )
 throw (css::lang::IndexOutOfBoundsException, 
css::uno::RuntimeException, std::exception) = 0;
 
 protected:
diff --git a/include/comphelper/accimplaccess.hxx 
b/include/comphelper/accimplaccess.hxx
index f416e14..2c6f159 100644
--- a/include/comphelper/accimplaccess.hxx
+++ b/include/comphelper/accimplaccess.hxx
@@ -85,7 +85,7 @@ namespace comphelper
 const ::com::sun::star::uno::Reference 
::com::sun::star::accessibility::XAccessible  _rxAccParent );
 
 /// sets or resets a bit of the foreign controlled states
-void setStateBit( const sal_Int16 _nState, const sal_Bool _bSet );
+void setStateBit( const sal_Int16 _nState, const bool _bSet );
 
 protected:
 OAccessibleImplementationAccess( );
diff --git a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx 
b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
index d5a7211..333c165 100644
--- a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
+++ b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
@@ -729,7 +729,7 @@ bool
 
 // return nothing in default case
 void
-AccessibleDocumentViewBase::implSelect( sal_Int32, sal_Bool )
+AccessibleDocumentViewBase::implSelect( sal_Int32, bool )
 throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
 {
 }

[Libreoffice-commits] core.git: comphelper/source include/comphelper sd/source

2013-09-13 Thread Vishv Brahmbhatt
 comphelper/source/misc/expandmacro.cxx   |   24 +++-
 include/comphelper/expandmacro.hxx   |   23 +--
 sd/source/core/CustomAnimationPreset.cxx |   14 ++
 sd/source/core/TransitionPreset.cxx  |   14 ++
 sd/source/core/drawdoc.cxx   |6 ++
 5 files changed, 10 insertions(+), 71 deletions(-)

New commits:
commit 6fc6494aa9fea0b47fbf048998d7bd412ef478b1
Author: Vishv Brahmbhatt vishvbrahmbhat...@gmail.com
Date:   Wed Sep 11 00:44:36 2013 +0530

Using macro expansion function for the remaining config entries.

Macro Expansion function is used in 'CustomAnimationPreset.cxx'
 'TransitionPreset.cxx' to avoid code redundancy.Also appropriate
changes are to made to 'getExpandedFilePath' function.

Change-Id: I6b6ae068db3499fe2de2e78a884f9e0737577651
Reviewed-on: https://gerrit.libreoffice.org/5910
Reviewed-by: Thorsten Behrens t...@documentfoundation.org
Tested-by: Thorsten Behrens t...@documentfoundation.org

diff --git a/comphelper/source/misc/expandmacro.cxx 
b/comphelper/source/misc/expandmacro.cxx
index a7eae4b..86eb7c2 100644
--- a/comphelper/source/misc/expandmacro.cxx
+++ b/comphelper/source/misc/expandmacro.cxx
@@ -10,29 +10,17 @@
 #include comphelper/expandmacro.hxx
 
 #include com/sun/star/uno/Reference.hxx
-#include com/sun/star/uno/XComponentContext.hpp
-#include com/sun/star/util/theMacroExpander.hpp
 #include rtl/ustring.hxx
 #include rtl/uri.hxx
-#include osl/file.h
-#include comphelper/processfactory.hxx
+#include rtl/bootstrap.hxx
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
-using ::com::sun::star::lang::XMultiServiceFactory;
 
 namespace comphelper
 {
 rtl::OUString getExpandedFilePath(const rtl::OUString filepath)
 {
-const ReferenceXComponentContext xContext( 
::comphelper::getProcessComponentContext() );
-return getExpandedFilePath(filepath, xContext);
-}
-
-rtl::OUString getExpandedFilePath(const rtl::OUString filepath, const 
ReferenceXComponentContext xContext)
-{
-Reference util::XMacroExpander  xMacroExpander = 
util::theMacroExpander::get( xContext );
-
 rtl::OUString aFilename = filepath;
 
 if( aFilename.startsWith( vnd.sun.star.expand: ) )
@@ -44,16 +32,10 @@ namespace comphelper
 aMacro = rtl::Uri::decode( aMacro, rtl_UriDecodeWithCharset, 
RTL_TEXTENCODING_UTF8 );
 
 // expand macro string
-aFilename = xMacroExpander-expandMacros( aMacro );
-}
+rtl::Bootstrap::expandMacros( aMacro);
 
-if( aFilename.startsWith( file:// ) )
-{
-rtl::OUString aSysPath;
-if( osl_getSystemPathFromFileURL( aFilename.pData, aSysPath.pData 
) == osl_File_E_None )
-aFilename = aSysPath;
+aFilename = aMacro;
 }
-
 return aFilename;
 }
 }
diff --git a/include/comphelper/expandmacro.hxx 
b/include/comphelper/expandmacro.hxx
index efd2552..d699a1a 100644
--- a/include/comphelper/expandmacro.hxx
+++ b/include/comphelper/expandmacro.hxx
@@ -29,29 +29,8 @@ namespace comphelper
 
  @param path to operate on. Both system file path and file URIs are 
accepted.
 
- @return macro-expanded system file path.
+ @return macro-expanded file URI.
 */
 COMPHELPER_DLLPUBLIC rtl::OUString getExpandedFilePath(const 
rtl::OUString filepath);
-
-/**
- A helper function to get expanded version of macro for filepaths.
-
- If the given path is prefixed by vnd.sun.star.expand:, this
- function substitutes contained macro references. It then always
- returns a system file path, if necessary converting file
- URIs. Example:
- vnd.sun.star.expand:$BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR gets
- converted to e.g. /usr/lib64/libreoffice/share.
-
- Use this version if you have a local reference of a component
- context at hand, saves us the extra lookup.
-
- @param path to operate on. Both system file path and file URIs are 
accepted.
- @param xContext refers to the component context of the process.
-
- @return macro-expanded system file path.
-*/
-COMPHELPER_DLLPUBLIC rtl::OUString getExpandedFilePath(const 
rtl::OUString filepath,
-   const 
::com::sun::star::uno::Referencecss::uno::XComponentContext xContext);
 }
 #endif
diff --git a/sd/source/core/CustomAnimationPreset.cxx 
b/sd/source/core/CustomAnimationPreset.cxx
index b03359b..9883027 100644
--- a/sd/source/core/CustomAnimationPreset.cxx
+++ b/sd/source/core/CustomAnimationPreset.cxx
@@ -33,6 +33,7 @@
 #include comphelper/string.hxx
 #include unotools/pathoptions.hxx
 #include tools/stream.hxx
+#include comphelper/expandmacro.hxx
 
 #include tools/debug.hxx
 #include rtl/uri.hxx
@@ -291,8 +292,6 @@ Reference XAnimationNode  implImportEffects( const 
Reference XMultiServiceFac
 return