[Libreoffice-commits] core.git: sot/source
Noel Grandin
noel at peralex.com
Thu Aug 6 05:07:16 PDT 2015
sot/source/base/exchange.cxx | 24 ++++++--------------
sot/source/base/formats.cxx | 50 +++++++++++++++++++++----------------------
2 files changed, 33 insertions(+), 41 deletions(-)
New commits:
commit 922f631da18935887c3de6e2ba47ebba8d5aea02
Author: Noel Grandin <noel at peralex.com>
Date: Thu Aug 6 14:06:40 2015 +0200
remove some unnecessary casts and local vars
Change-Id: I6070421b2275b7fdd698fdc87cc349fc87846513
diff --git a/sot/source/base/exchange.cxx b/sot/source/base/exchange.cxx
index 24604dd..92c8bf37 100644
--- a/sot/source/base/exchange.cxx
+++ b/sot/source/base/exchange.cxx
@@ -230,16 +230,14 @@ SotClipboardFormatId SotExchange::RegisterFormatName( const OUString& rName )
{
const DataFlavorRepresentation *pFormatArray_Impl = FormatArray_Impl::get();
// teste zuerst die Standard - Name
- SotClipboardFormatId nMax = SotClipboardFormatId::FILE_LIST;
- for( SotClipboardFormatId i = SotClipboardFormatId::STRING; i <= nMax; ++i )
+ for( SotClipboardFormatId i = SotClipboardFormatId::STRING; i <= SotClipboardFormatId::FILE_LIST; ++i )
if( rName.equalsAscii( pFormatArray_Impl[ static_cast<int>(i) ].pName ) )
return i;
// BM: the chart format 105 ("StarChartDocument 5.0") was written
// only into 5.1 chart documents - in 5.0 and 5.2 it was 42 ("StarChart 5.0")
// The registry only contains the entry for the 42 format id.
- nMax = SotClipboardFormatId::USER_END;
- for( SotClipboardFormatId i = SotClipboardFormatId::RTF; i <= nMax; ++i )
+ for( SotClipboardFormatId i = SotClipboardFormatId::RTF; i <= SotClipboardFormatId::USER_END; ++i )
if( rName.equalsAscii( pFormatArray_Impl[ static_cast<int>(i) ].pName ) )
return ( (i == SotClipboardFormatId::STARCHARTDOCUMENT_50)
? SotClipboardFormatId::STARCHART_50
@@ -268,13 +266,11 @@ SotClipboardFormatId SotExchange::RegisterFormatMimeType( const OUString& rMimeT
{
const DataFlavorRepresentation *pFormatArray_Impl = FormatArray_Impl::get();
// teste zuerst die Standard - Name
- SotClipboardFormatId nMax = SotClipboardFormatId::FILE_LIST;
- for( SotClipboardFormatId i = SotClipboardFormatId::STRING; i <= nMax; ++i )
+ for( SotClipboardFormatId i = SotClipboardFormatId::STRING; i <= SotClipboardFormatId::FILE_LIST; ++i )
if( rMimeType.equalsAscii( pFormatArray_Impl[ static_cast<int>(i) ].pMimeType ) )
return i;
- nMax = SotClipboardFormatId::USER_END;
- for( SotClipboardFormatId i = SotClipboardFormatId::RTF; i <= nMax; ++i )
+ for( SotClipboardFormatId i = SotClipboardFormatId::RTF; i <= SotClipboardFormatId::USER_END; ++i )
if( rMimeType.equalsAscii( pFormatArray_Impl[ static_cast<int>(i) ].pMimeType ) )
return i;
@@ -394,16 +390,14 @@ OUString SotExchange::GetFormatMimeType( SotClipboardFormatId nFormat )
SotClipboardFormatId SotExchange::GetFormatIdFromMimeType( const OUString& rMimeType )
{
const DataFlavorRepresentation *pFormatArray_Impl = FormatArray_Impl::get();
- SotClipboardFormatId nMax = SotClipboardFormatId::FILE_LIST;
- for( SotClipboardFormatId i = SotClipboardFormatId::STRING; i <= nMax; ++i )
+ for( SotClipboardFormatId i = SotClipboardFormatId::STRING; i <= SotClipboardFormatId::FILE_LIST; ++i )
if( rMimeType.equalsAscii( pFormatArray_Impl[ static_cast<int>(i) ].pMimeType ) )
return i;
// BM: the chart format 105 ("StarChartDocument 5.0") was written
// only into 5.1 chart documents - in 5.0 and 5.2 it was 42 ("StarChart 5.0")
// The registry only contains the entry for the 42 format id.
- nMax = SotClipboardFormatId::USER_END;
- for( SotClipboardFormatId i = SotClipboardFormatId::RTF; i <= nMax; ++i )
+ for( SotClipboardFormatId i = SotClipboardFormatId::RTF; i <= SotClipboardFormatId::USER_END; ++i )
if( rMimeType.equalsAscii( pFormatArray_Impl[ static_cast<int>(i) ].pMimeType ) )
return ( (i == SotClipboardFormatId::STARCHARTDOCUMENT_50)
? SotClipboardFormatId::STARCHART_50
@@ -433,17 +427,15 @@ SotClipboardFormatId SotExchange::GetFormat( const DataFlavor& rFlavor )
// teste zuerst die Standard - Name
const OUString& rMimeType = rFlavor.MimeType;
- SotClipboardFormatId nMax = SotClipboardFormatId::FILE_LIST;
const DataFlavorRepresentation *pFormatArray_Impl = FormatArray_Impl::get();
- for( SotClipboardFormatId i = SotClipboardFormatId::STRING; i <= nMax; ++i )
+ for( SotClipboardFormatId i = SotClipboardFormatId::STRING; i <= SotClipboardFormatId::FILE_LIST; ++i )
if( rMimeType.equalsAscii( pFormatArray_Impl[ static_cast<int>(i) ].pMimeType ) )
return static_cast<SotClipboardFormatId>(i);
// BM: the chart format 105 ("StarChartDocument 5.0") was written
// only into 5.1 chart documents - in 5.0 and 5.2 it was 42 ("StarChart 5.0")
// The registry only contains the entry for the 42 format id.
- nMax = SotClipboardFormatId::USER_END;
- for( SotClipboardFormatId i = SotClipboardFormatId::RTF; i <= nMax; ++i )
+ for( SotClipboardFormatId i = SotClipboardFormatId::RTF; i <= SotClipboardFormatId::USER_END; ++i )
if( rMimeType.equalsAscii( pFormatArray_Impl[ static_cast<int>(i) ].pMimeType ) )
return ( (i == SotClipboardFormatId::STARCHARTDOCUMENT_50)
? static_cast<SotClipboardFormatId>(SotClipboardFormatId::STARCHART_50)
diff --git a/sot/source/base/formats.cxx b/sot/source/base/formats.cxx
index e0d7bc2..1230dc6 100644
--- a/sot/source/base/formats.cxx
+++ b/sot/source/base/formats.cxx
@@ -126,12 +126,12 @@ static SotAction_Impl const aEXCHG_DEST_CHARTDOC_OLEOBJ_Def[] = \
{ SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_IN_ACTION_LINK, 0 }, \
{ SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_IN_ACTION_LINK, FILEGRPDSC_ONLY_URL }, \
{ SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_IN_ACTION_LINK, 0 }, \
- { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \
+ { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \
}; \
static SotAction_Impl const aEXCHG_DEST_CHARTDOC_OLEOBJ_Move[] = \
{ \
{ SotClipboardFormatId::SVIM, EXCHG_OUT_ACTION_INSERT_IMAGEMAP, 0 }, \
- { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \
+ { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \
}; \
static SotAction_Impl const aEXCHG_DEST_CHARTDOC_OLEOBJ_Link[] = \
{ \
@@ -143,7 +143,7 @@ static SotAction_Impl const aEXCHG_DEST_CHARTDOC_OLEOBJ_Link[] = \
{ SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_INTERACTIVE, FILEGRPDSC_ONLY_URL },\
{ SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_INTERACTIVE, 0 },\
{ SotClipboardFormatId::SVIM, EXCHG_OUT_ACTION_INSERT_IMAGEMAP, 0 }, \
- { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \
+ { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \
};
#define EXCHG_DEST_DOC_TEXTFRAME_ARRAY \
@@ -362,7 +362,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_GRAPHOBJ_Move[] = \
{ SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\
{ SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::SIMPLE_FILE, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
- { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \
+ { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \
}; \
static SotAction_Impl const aEXCHG_DEST_DOC_GRAPHOBJ_Copy[] = \
{ \
@@ -376,7 +376,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_GRAPHOBJ_Copy[] = \
{ SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\
{ SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::SIMPLE_FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
- { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \
+ { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \
}; \
static SotAction_Impl const aEXCHG_DEST_DOC_GRAPHOBJ_Link[] = \
{ \
@@ -390,7 +390,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_GRAPHOBJ_Link[] = \
{ SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\
{ SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::SIMPLE_FILE, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
- { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \
+ { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \
};
#define EXCHG_DEST_DOC_LNKD_GRAPHOBJ_ARRAY \
@@ -410,7 +410,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_LNKD_GRAPHOBJ_Def[] = \
{ SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_IN_ACTION_COPY, FILEGRPDSC_ONLY_URL }, \
{ SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::SIMPLE_FILE, EXCHG_IN_ACTION_COPY, 0 }, \
- { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \
+ { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \
}; \
static SotAction_Impl const aEXCHG_DEST_DOC_LNKD_GRAPHOBJ_Move[] =\
{ \
@@ -424,7 +424,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_LNKD_GRAPHOBJ_Move[] =\
{ SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\
{ SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::SIMPLE_FILE, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
- { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \
+ { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \
}; \
static SotAction_Impl const aEXCHG_DEST_DOC_LNKD_GRAPHOBJ_Copy[] =\
{ \
@@ -438,7 +438,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_LNKD_GRAPHOBJ_Copy[] =\
{ SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\
{ SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::SIMPLE_FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
- { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \
+ { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \
}; \
static SotAction_Impl const aEXCHG_DEST_DOC_LNKD_GRAPHOBJ_Link[] =\
{ \
@@ -452,7 +452,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_LNKD_GRAPHOBJ_Link[] =\
{ SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\
{ SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::SIMPLE_FILE, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
- { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \
+ { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \
};
#define EXCHG_DEST_DOC_GRAPH_W_IMAP_ARRAY \
@@ -473,7 +473,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_GRAPH_W_IMAP_Def[] = \
{ SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_IN_ACTION_COPY, FILEGRPDSC_ONLY_URL }, \
{ SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::SIMPLE_FILE, EXCHG_IN_ACTION_COPY, 0 }, \
- { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \
+ { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \
}; \
static SotAction_Impl const aEXCHG_DEST_DOC_GRAPH_W_IMAP_Move[] = \
{ \
@@ -487,7 +487,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_GRAPH_W_IMAP_Move[] = \
{ SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\
{ SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::SIMPLE_FILE, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
- { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \
+ { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \
}; \
static SotAction_Impl const aEXCHG_DEST_DOC_GRAPH_W_IMAP_Copy[] = \
{ \
@@ -501,7 +501,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_GRAPH_W_IMAP_Copy[] = \
{ SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\
{ SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::SIMPLE_FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
- { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \
+ { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \
}; \
static SotAction_Impl const aEXCHG_DEST_DOC_GRAPH_W_IMAP_Link[] = \
{ \
@@ -515,7 +515,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_GRAPH_W_IMAP_Link[] = \
{ SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\
{ SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::SIMPLE_FILE, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
- { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \
+ { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \
};
#define EXCHG_DEST_DOC_LNKD_GRAPH_W_IMAP_ARRAY \
@@ -536,7 +536,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_LNKD_GRAPH_W_IMAP_Def[] =\
{ SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_IN_ACTION_COPY, FILEGRPDSC_ONLY_URL }, \
{ SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::SIMPLE_FILE, EXCHG_IN_ACTION_COPY, 0 }, \
- { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \
+ { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \
}; \
static SotAction_Impl const aEXCHG_DEST_DOC_LNKD_GRAPH_W_IMAP_Move[] =\
{ \
@@ -550,7 +550,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_LNKD_GRAPH_W_IMAP_Move[] =\
{ SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\
{ SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::SIMPLE_FILE, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
- { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \
+ { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \
}; \
static SotAction_Impl const aEXCHG_DEST_DOC_LNKD_GRAPH_W_IMAP_Copy[] =\
{ \
@@ -564,7 +564,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_LNKD_GRAPH_W_IMAP_Copy[] =\
{ SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\
{ SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::SIMPLE_FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
- { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \
+ { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \
}; \
static SotAction_Impl const aEXCHG_DEST_DOC_LNKD_GRAPH_W_IMAP_Link[] =\
{ \
@@ -578,7 +578,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_LNKD_GRAPH_W_IMAP_Link[] =\
{ SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\
{ SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::SIMPLE_FILE, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
- { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \
+ { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \
};
@@ -589,7 +589,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_IMAPREGION_Def[] = \
{ SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_IN_ACTION_COPY, FILEGRPDSC_ONLY_URL }, \
{ SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::SIMPLE_FILE, EXCHG_IN_ACTION_COPY, 0 }, \
- { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \
+ { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \
}; \
static SotAction_Impl const aEXCHG_DEST_DOC_IMAPREGION_Copy[] = \
{ \
@@ -597,7 +597,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_IMAPREGION_Copy[] = \
{ SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\
{ SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::SIMPLE_FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
- { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \
+ { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \
};
@@ -618,7 +618,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_DRAWOBJ_Def[] = \
{ SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_IN_ACTION_COPY, FILEGRPDSC_ONLY_URL }, \
{ SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_IN_ACTION_COPY, 0 }, \
- { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \
+ { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \
}; \
static SotAction_Impl const aEXCHG_DEST_DOC_DRAWOBJ_Copy[] = \
{ \
@@ -632,7 +632,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_DRAWOBJ_Copy[] = \
{ SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\
{ SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::SIMPLE_FILE, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
- { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \
+ { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \
}; \
static SotAction_Impl const aEXCHG_DEST_DOC_DRAWOBJ_Move[] = \
{ \
@@ -1287,7 +1287,7 @@ static SotDestinationEntry_Impl const aDestinationArray[] = \
aEXCHG_DEST_SWDOC_FREE_AREA_WEB_Link \
}, \
{ \
- static_cast<SotExchangeDest>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0, 0, 0 \
+ static_cast<SotExchangeDest>(0xffff), 0, 0, 0, 0 \
} \
};
@@ -1473,14 +1473,14 @@ sal_uInt16 SotExchange::GetExchangeAction( const DataFlavorExVector& rDataFlavor
//Todo: Binaere Suche einbauen
const SotDestinationEntry_Impl* pEntry = aDestinationArray;
- while( static_cast<SotExchangeDest>(static_cast<SotClipboardFormatId>(0xffff)) != pEntry->nDestination )
+ while( static_cast<SotExchangeDest>(0xffff) != pEntry->nDestination )
{
if( pEntry->nDestination == nDestination )
break;
++pEntry;
}
- if( static_cast<SotExchangeDest>(static_cast<SotClipboardFormatId>(0xffff)) == pEntry->nDestination )
+ if( static_cast<SotExchangeDest>(0xffff) == pEntry->nDestination )
{
return EXCHG_INOUT_ACTION_NONE;
}
More information about the Libreoffice-commits
mailing list