[Libreoffice-commits] core.git: 5 commits - include/linguistic include/sfx2 include/tools include/vcl linguistic/source sfx2/source svtools/source
Noel Grandin
noel at peralex.com
Fri Jul 24 03:37:29 PDT 2015
include/linguistic/lngprops.hxx | 24 ------------
include/sfx2/frame.hxx | 4 --
include/sfx2/frmdescr.hxx | 24 ++++--------
include/tools/urlobj.hxx | 18 ---------
include/vcl/gdimtf.hxx | 8 ----
linguistic/source/lngopt.cxx | 74 +++++++++++++++++++--------------------
sfx2/source/doc/frmdescr.cxx | 11 ++---
svtools/source/misc/imagemgr.cxx | 4 +-
8 files changed, 52 insertions(+), 115 deletions(-)
New commits:
commit 1aab6c8e3d314d601923dd18e252ab30020d0105
Author: Noel Grandin <noel at peralex.com>
Date: Fri Jul 24 11:32:09 2015 +0200
remove unused define TF_NEWDESKTOP
Change-Id: Ibab48696036d0e7d23c87f11e1e800782dddb366
diff --git a/include/sfx2/frame.hxx b/include/sfx2/frame.hxx
index 5768a3b..a47ad2b 100644
--- a/include/sfx2/frame.hxx
+++ b/include/sfx2/frame.hxx
@@ -19,10 +19,6 @@
#ifndef INCLUDED_SFX2_FRAME_HXX
#define INCLUDED_SFX2_FRAME_HXX
-#ifndef TF_NEWDESKTOP
-#define TF_NEWDESKTOP 1
-#endif
-
#include <sal/config.h>
#include <sfx2/dllapi.h>
#include <sal/types.h>
commit e8c3b599237b915cfdd5df2dedb1b4b4a46f0e47
Author: Noel Grandin <noel at peralex.com>
Date: Fri Jul 24 11:23:55 2015 +0200
in SfxFrameDescriptor, use normal bool
instead of hard to understand bitmasking
Change-Id: I5f694285af87223b8ccaa50031cbb3c09924e1a8
diff --git a/include/sfx2/frmdescr.hxx b/include/sfx2/frmdescr.hxx
index fbc14c7..34db792 100644
--- a/include/sfx2/frmdescr.hxx
+++ b/include/sfx2/frmdescr.hxx
@@ -57,9 +57,6 @@ enum SizeSelector
SIZE_REL
};
-#define BORDER_SET 2
-#define BORDER_YES 1
-#define BORDER_NO 0
#define SPACING_NOT_SET -1L
#define SIZE_NOT_SET -1L
@@ -75,7 +72,8 @@ class SFX2_DLLPUBLIC SfxFrameDescriptor
long nWidth;
ScrollingMode eScroll;
SizeSelector eSizeSelector;
- sal_uInt16 nHasBorder;
+ bool bHasBorder;
+ bool bHasBorderSet;
sal_uInt16 nItemId;
bool bResizeHorizontal;
bool bResizeVertical;
@@ -119,23 +117,19 @@ public:
void SetScrollingMode( ScrollingMode eMode )
{ eScroll = eMode; }
- // FrameBorder
void SetWallpaper( const Wallpaper& rWallpaper );
- bool HasFrameBorder() const;
+ // FrameBorder
+ bool HasFrameBorder() const
+ { return bHasBorder; }
bool IsFrameBorderOn() const
- { return ( nHasBorder & BORDER_YES ) != 0; }
-
+ { return bHasBorder; }
void SetFrameBorder( bool bBorder )
- {
- nHasBorder = bBorder ?
- BORDER_YES | BORDER_SET :
- BORDER_NO | BORDER_SET;
- }
+ { bHasBorder = bBorder; bHasBorderSet = true; }
bool IsFrameBorderSet() const
- { return (nHasBorder & BORDER_SET) != 0; }
+ { return bHasBorderSet; }
void ResetBorder()
- { nHasBorder = 0; }
+ { bHasBorder = false; bHasBorderSet = false; }
// Copy for example for Views
SfxFrameDescriptor* Clone( bool bWithIds = true ) const;
diff --git a/sfx2/source/doc/frmdescr.cxx b/sfx2/source/doc/frmdescr.cxx
index d3a2ba0..8ce26e5 100644
--- a/sfx2/source/doc/frmdescr.cxx
+++ b/sfx2/source/doc/frmdescr.cxx
@@ -45,7 +45,8 @@ SfxFrameDescriptor::SfxFrameDescriptor() :
nWidth( 0L ),
eScroll( ScrollingAuto ),
eSizeSelector( SIZE_ABS ),
- nHasBorder( BORDER_YES ),
+ bHasBorder( true ),
+ bHasBorderSet( false ),
nItemId( 0 ),
bResizeHorizontal( true ),
bResizeVertical( true ),
@@ -109,7 +110,8 @@ SfxFrameDescriptor* SfxFrameDescriptor::Clone( bool bWithIds ) const
pFrame->eScroll = eScroll;
pFrame->bResizeHorizontal = bResizeHorizontal;
pFrame->bResizeVertical = bResizeVertical;
- pFrame->nHasBorder = nHasBorder;
+ pFrame->bHasBorder = bHasBorder;
+ pFrame->bHasBorderSet = bHasBorderSet;
pFrame->bHasUI = bHasUI;
pFrame->SetReadOnly( IsReadOnly() );
pFrame->SetEditable( IsEditable() );
@@ -130,11 +132,6 @@ SfxFrameDescriptor* SfxFrameDescriptor::Clone( bool bWithIds ) const
return pFrame;
}
-bool SfxFrameDescriptor::HasFrameBorder() const
-{
- return (nHasBorder & BORDER_YES) != 0;
-}
-
void SfxFrameDescriptor::SetWallpaper( const Wallpaper& rWallpaper )
{
DELETEZ( pImp->pWallpaper );
commit 93774f29ec42e86b55e89e3f13c011673a55c3ce
Author: Noel Grandin <noel at peralex.com>
Date: Fri Jul 24 11:01:45 2015 +0200
remove unused URL_PREFIX_PRIV constants
Change-Id: I4d49ebec2867e4c53661c20b277bfdbf4fd222a2
diff --git a/include/tools/urlobj.hxx b/include/tools/urlobj.hxx
index 96bc0cd..7778666 100644
--- a/include/tools/urlobj.hxx
+++ b/include/tools/urlobj.hxx
@@ -43,24 +43,6 @@ namespace com { namespace sun { namespace star { namespace util {
#define INET_HID_SCHEME "hid:"
#define URL_PREFIX_PRIV_SOFFICE "private:"
-enum
-{
- URL_PREFIX_PRIV_SOFFICE_LEN
- = RTL_CONSTASCII_LENGTH(URL_PREFIX_PRIV_SOFFICE)
-};
-
-#define URL_PREFIX_PRIV_OBSOLETE URL_PREFIX_PRIV_SOFFICE
-enum
-{
- URL_PREFIX_PRIV_OBSOLETE_LEN
- = RTL_CONSTASCII_LENGTH(URL_PREFIX_PRIV_OBSOLETE)
-};
-
-#define URL_PREFIX_PRIV_EXTERN "staroffice:"
-enum
-{
- URL_PREFIX_PRIV_EXTERN_LEN = RTL_CONSTASCII_LENGTH(URL_PREFIX_PRIV_EXTERN)
-};
// Schemes:
enum class INetProtocol
diff --git a/svtools/source/misc/imagemgr.cxx b/svtools/source/misc/imagemgr.cxx
index 45eae76..bef17b0 100644
--- a/svtools/source/misc/imagemgr.cxx
+++ b/svtools/source/misc/imagemgr.cxx
@@ -358,7 +358,7 @@ static sal_uInt16 GetImageId_Impl( const INetURLObject& rObject, bool bDetectFol
if ( rObject.GetProtocol() == INetProtocol::PrivSoffice )
{
- OUString aURLPath = sURL.copy( URL_PREFIX_PRIV_SOFFICE_LEN );
+ OUString aURLPath = sURL.copy( strlen(URL_PREFIX_PRIV_SOFFICE) );
OUString aType = aURLPath.getToken( 0, '/' );
if ( aType == "factory" )
{
@@ -536,7 +536,7 @@ OUString SvFileInformationManager::GetDescription_Impl( const INetURLObject& rOb
if ( rObject.GetProtocol() == INetProtocol::PrivSoffice )
{
- OUString aURLPath = sURL.copy( URL_PREFIX_PRIV_SOFFICE_LEN );
+ OUString aURLPath = sURL.copy( strlen(URL_PREFIX_PRIV_SOFFICE) );
OUString aType = aURLPath.getToken( 0, '/' );
if ( aType == "factory" )
{
commit c29e194b4c37e0735c3bae8b35902c7401e7964a
Author: Noel Grandin <noel at peralex.com>
Date: Fri Jul 24 10:33:47 2015 +0200
no need to redeclare these constants with slightly different names
Change-Id: Ic9a1f2f0cef25baaf8b97db4989dc536a5da89f7
diff --git a/include/linguistic/lngprops.hxx b/include/linguistic/lngprops.hxx
index 77d411a..af73f3b 100644
--- a/include/linguistic/lngprops.hxx
+++ b/include/linguistic/lngprops.hxx
@@ -26,30 +26,6 @@
// (may not include results added by looking up user dictionaries)
#define UPN_MAX_NUMBER_OF_SUGGESTIONS "MaxNumberOfSuggestions"
-// WIDs for property names
-//!! Don't change values! They are used as the property handles in
-//!! the service description
-#define WID_IS_GERMAN_PRE_REFORM UPH_IS_GERMAN_PRE_REFORM /*! deprecated !*/
-#define WID_IS_USE_DICTIONARY_LIST UPH_IS_USE_DICTIONARY_LIST
-#define WID_IS_IGNORE_CONTROL_CHARACTERS UPH_IS_IGNORE_CONTROL_CHARACTERS
-#define WID_IS_SPELL_UPPER_CASE UPH_IS_SPELL_UPPER_CASE
-#define WID_IS_SPELL_WITH_DIGITS UPH_IS_SPELL_WITH_DIGITS
-#define WID_IS_SPELL_CAPITALIZATION UPH_IS_SPELL_CAPITALIZATION
-#define WID_HYPH_MIN_LEADING UPH_HYPH_MIN_LEADING
-#define WID_HYPH_MIN_TRAILING UPH_HYPH_MIN_TRAILING
-#define WID_HYPH_MIN_WORD_LENGTH UPH_HYPH_MIN_WORD_LENGTH
-#define WID_DEFAULT_LOCALE UPH_DEFAULT_LOCALE
-#define WID_IS_SPELL_AUTO UPH_IS_SPELL_AUTO
-#define WID_IS_SPELL_HIDE UPH_IS_SPELL_HIDE /*! deprecated !*/
-#define WID_IS_SPELL_IN_ALL_LANGUAGES UPH_IS_SPELL_IN_ALL_LANGUAGES /*! deprecated !*/
-#define WID_IS_SPELL_SPECIAL UPH_IS_SPELL_SPECIAL
-#define WID_IS_HYPH_AUTO UPH_IS_HYPH_AUTO
-#define WID_IS_HYPH_SPECIAL UPH_IS_HYPH_SPECIAL
-#define WID_IS_WRAP_REVERSE UPH_IS_WRAP_REVERSE
-#define WID_DEFAULT_LANGUAGE UPH_DEFAULT_LANGUAGE
-#define WID_DEFAULT_LOCALE_CJK UPH_DEFAULT_LOCALE_CJK
-#define WID_DEFAULT_LOCALE_CTL UPH_DEFAULT_LOCALE_CTL
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/source/lngopt.cxx b/linguistic/source/lngopt.cxx
index 38327b8..d07b4da 100644
--- a/linguistic/source/lngopt.cxx
+++ b/linguistic/source/lngopt.cxx
@@ -98,29 +98,29 @@ struct WID_Name
WID_Name aWID_Name[] =
{
{ 0, 0 },
- { WID_IS_USE_DICTIONARY_LIST, UPN_IS_USE_DICTIONARY_LIST },
- { WID_IS_IGNORE_CONTROL_CHARACTERS, UPN_IS_IGNORE_CONTROL_CHARACTERS },
- { WID_IS_SPELL_UPPER_CASE, UPN_IS_SPELL_UPPER_CASE },
- { WID_IS_SPELL_WITH_DIGITS, UPN_IS_SPELL_WITH_DIGITS },
- { WID_IS_SPELL_CAPITALIZATION, UPN_IS_SPELL_CAPITALIZATION },
- { WID_HYPH_MIN_LEADING, UPN_HYPH_MIN_LEADING },
- { WID_HYPH_MIN_TRAILING, UPN_HYPH_MIN_TRAILING },
- { WID_HYPH_MIN_WORD_LENGTH, UPN_HYPH_MIN_WORD_LENGTH },
- { WID_DEFAULT_LOCALE, UPN_DEFAULT_LOCALE },
- { WID_IS_SPELL_AUTO, UPN_IS_SPELL_AUTO },
+ { UPH_IS_USE_DICTIONARY_LIST, UPN_IS_USE_DICTIONARY_LIST },
+ { UPH_IS_IGNORE_CONTROL_CHARACTERS, UPN_IS_IGNORE_CONTROL_CHARACTERS },
+ { UPH_IS_SPELL_UPPER_CASE, UPN_IS_SPELL_UPPER_CASE },
+ { UPH_IS_SPELL_WITH_DIGITS, UPN_IS_SPELL_WITH_DIGITS },
+ { UPH_IS_SPELL_CAPITALIZATION, UPN_IS_SPELL_CAPITALIZATION },
+ { UPH_HYPH_MIN_LEADING, UPN_HYPH_MIN_LEADING },
+ { UPH_HYPH_MIN_TRAILING, UPN_HYPH_MIN_TRAILING },
+ { UPH_HYPH_MIN_WORD_LENGTH, UPN_HYPH_MIN_WORD_LENGTH },
+ { UPH_DEFAULT_LOCALE, UPN_DEFAULT_LOCALE },
+ { UPH_IS_SPELL_AUTO, UPN_IS_SPELL_AUTO },
{ 0, 0 },
{ 0, 0 },
- { WID_IS_SPELL_SPECIAL, UPN_IS_SPELL_SPECIAL },
- { WID_IS_HYPH_AUTO, UPN_IS_HYPH_AUTO },
- { WID_IS_HYPH_SPECIAL, UPN_IS_HYPH_SPECIAL },
- { WID_IS_WRAP_REVERSE, UPN_IS_WRAP_REVERSE },
+ { UPH_IS_SPELL_SPECIAL, UPN_IS_SPELL_SPECIAL },
+ { UPH_IS_HYPH_AUTO, UPN_IS_HYPH_AUTO },
+ { UPH_IS_HYPH_SPECIAL, UPN_IS_HYPH_SPECIAL },
+ { UPH_IS_WRAP_REVERSE, UPN_IS_WRAP_REVERSE },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
- { WID_DEFAULT_LANGUAGE, UPN_DEFAULT_LANGUAGE },
- { WID_DEFAULT_LOCALE_CJK, UPN_DEFAULT_LOCALE_CJK },
- { WID_DEFAULT_LOCALE_CTL, UPN_DEFAULT_LOCALE_CTL }
+ { UPH_DEFAULT_LANGUAGE, UPN_DEFAULT_LANGUAGE },
+ { UPH_DEFAULT_LOCALE_CJK, UPN_DEFAULT_LOCALE_CJK },
+ { UPH_DEFAULT_LOCALE_CTL, UPN_DEFAULT_LOCALE_CTL }
};
@@ -146,45 +146,45 @@ static const SfxItemPropertyMapEntry* lcl_GetLinguProps()
{
static const SfxItemPropertyMapEntry aLinguProps[] =
{
- { OUString(UPN_DEFAULT_LANGUAGE), WID_DEFAULT_LANGUAGE,
+ { OUString(UPN_DEFAULT_LANGUAGE), UPH_DEFAULT_LANGUAGE,
::cppu::UnoType<sal_Int16>::get(), 0, 0 },
- { OUString(UPN_DEFAULT_LOCALE), WID_DEFAULT_LOCALE,
+ { OUString(UPN_DEFAULT_LOCALE), UPH_DEFAULT_LOCALE,
::cppu::UnoType<Locale>::get(), 0, 0 },
- { OUString(UPN_DEFAULT_LOCALE_CJK), WID_DEFAULT_LOCALE_CJK,
+ { OUString(UPN_DEFAULT_LOCALE_CJK), UPH_DEFAULT_LOCALE_CJK,
::cppu::UnoType<Locale>::get(), 0, 0 },
- { OUString(UPN_DEFAULT_LOCALE_CTL), WID_DEFAULT_LOCALE_CTL,
+ { OUString(UPN_DEFAULT_LOCALE_CTL), UPH_DEFAULT_LOCALE_CTL,
::cppu::UnoType<Locale>::get(), 0, 0 },
- { OUString(UPN_HYPH_MIN_LEADING), WID_HYPH_MIN_LEADING,
+ { OUString(UPN_HYPH_MIN_LEADING), UPH_HYPH_MIN_LEADING,
::cppu::UnoType<sal_Int16>::get(), 0, 0 },
- { OUString(UPN_HYPH_MIN_TRAILING), WID_HYPH_MIN_TRAILING,
+ { OUString(UPN_HYPH_MIN_TRAILING), UPH_HYPH_MIN_TRAILING,
::cppu::UnoType<sal_Int16>::get(), 0, 0 },
- { OUString(UPN_HYPH_MIN_WORD_LENGTH), WID_HYPH_MIN_WORD_LENGTH,
+ { OUString(UPN_HYPH_MIN_WORD_LENGTH), UPH_HYPH_MIN_WORD_LENGTH,
::cppu::UnoType<sal_Int16>::get(), 0, 0 },
- { OUString(UPN_IS_GERMAN_PRE_REFORM), WID_IS_GERMAN_PRE_REFORM, /*! deprecated !*/
+ { OUString(UPN_IS_GERMAN_PRE_REFORM), UPH_IS_GERMAN_PRE_REFORM, /*! deprecated !*/
cppu::UnoType<bool>::get(), 0, 0 },
- { OUString(UPN_IS_HYPH_AUTO), WID_IS_HYPH_AUTO,
+ { OUString(UPN_IS_HYPH_AUTO), UPH_IS_HYPH_AUTO,
cppu::UnoType<bool>::get(), 0, 0 },
- { OUString(UPN_IS_HYPH_SPECIAL), WID_IS_HYPH_SPECIAL,
+ { OUString(UPN_IS_HYPH_SPECIAL), UPH_IS_HYPH_SPECIAL,
cppu::UnoType<bool>::get(), 0, 0 },
- { OUString(UPN_IS_IGNORE_CONTROL_CHARACTERS), WID_IS_IGNORE_CONTROL_CHARACTERS,
+ { OUString(UPN_IS_IGNORE_CONTROL_CHARACTERS), UPH_IS_IGNORE_CONTROL_CHARACTERS,
cppu::UnoType<bool>::get(), 0, 0 },
- { OUString(UPN_IS_SPELL_AUTO), WID_IS_SPELL_AUTO,
+ { OUString(UPN_IS_SPELL_AUTO), UPH_IS_SPELL_AUTO,
cppu::UnoType<bool>::get(), 0, 0 },
- { OUString(UPN_IS_SPELL_CAPITALIZATION), WID_IS_SPELL_CAPITALIZATION,
+ { OUString(UPN_IS_SPELL_CAPITALIZATION), UPH_IS_SPELL_CAPITALIZATION,
cppu::UnoType<bool>::get(), 0, 0 },
- { OUString(UPN_IS_SPELL_HIDE), WID_IS_SPELL_HIDE, /*! deprecated !*/
+ { OUString(UPN_IS_SPELL_HIDE), UPH_IS_SPELL_HIDE, /*! deprecated !*/
cppu::UnoType<bool>::get(), 0, 0 },
- { OUString(UPN_IS_SPELL_IN_ALL_LANGUAGES), WID_IS_SPELL_IN_ALL_LANGUAGES, /*! deprecated !*/
+ { OUString(UPN_IS_SPELL_IN_ALL_LANGUAGES), UPH_IS_SPELL_IN_ALL_LANGUAGES, /*! deprecated !*/
cppu::UnoType<bool>::get(), 0, 0 },
- { OUString(UPN_IS_SPELL_SPECIAL), WID_IS_SPELL_SPECIAL,
+ { OUString(UPN_IS_SPELL_SPECIAL), UPH_IS_SPELL_SPECIAL,
cppu::UnoType<bool>::get(), 0, 0 },
- { OUString(UPN_IS_SPELL_UPPER_CASE), WID_IS_SPELL_UPPER_CASE,
+ { OUString(UPN_IS_SPELL_UPPER_CASE), UPH_IS_SPELL_UPPER_CASE,
cppu::UnoType<bool>::get(), 0, 0 },
- { OUString(UPN_IS_SPELL_WITH_DIGITS), WID_IS_SPELL_WITH_DIGITS,
+ { OUString(UPN_IS_SPELL_WITH_DIGITS), UPH_IS_SPELL_WITH_DIGITS,
cppu::UnoType<bool>::get(), 0, 0 },
- { OUString(UPN_IS_USE_DICTIONARY_LIST), WID_IS_USE_DICTIONARY_LIST,
+ { OUString(UPN_IS_USE_DICTIONARY_LIST), UPH_IS_USE_DICTIONARY_LIST,
cppu::UnoType<bool>::get(), 0, 0 },
- { OUString(UPN_IS_WRAP_REVERSE), WID_IS_WRAP_REVERSE,
+ { OUString(UPN_IS_WRAP_REVERSE), UPH_IS_WRAP_REVERSE,
cppu::UnoType<bool>::get(), 0, 0 },
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
commit 22bd00fa7f6b90964e5eca03c314cdfa7ac2be12
Author: Noel Grandin <noel at peralex.com>
Date: Fri Jul 24 09:55:22 2015 +0200
remove unused #defines METAFILE_END and METAFILE_LABEL_NOTFOUND
Change-Id: I57ef70345ffd4cce10499df9e2567c28074709d8
diff --git a/include/vcl/gdimtf.hxx b/include/vcl/gdimtf.hxx
index 1dca8a9..4a50b65 100644
--- a/include/vcl/gdimtf.hxx
+++ b/include/vcl/gdimtf.hxx
@@ -45,14 +45,6 @@ class Gradient;
#define GDI_METAFILE_END ((size_t)0xFFFFFFFF)
#define GDI_METAFILE_LABEL_NOTFOUND ((size_t)0xFFFFFFFF)
-#ifndef METAFILE_END
-#define METAFILE_END GDI_METAFILE_END
-#endif
-
-#ifndef METAFILE_LABEL_NOTFOUND
-#define METAFILE_LABEL_NOTFOUND GDI_METAFILE_LABEL_NOTFOUND
-#endif
-
enum MtfConversion
{
MTF_CONVERSION_NONE = 0,
More information about the Libreoffice-commits
mailing list