[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - 14 commits - desktop/qa desktop/source include/sot include/svx sc/sdi sc/source sd/source sfx2/source sot/source svtools/source sw/qa sw/source
Jan Holesovsky
kendy at collabora.com
Sun Jun 12 15:09:44 UTC 2016
desktop/qa/data/paste.jpg |binary
desktop/qa/data/sheets.ods |binary
desktop/qa/desktop_lib/test_desktop_lib.cxx | 95 ++++++++++++++++++++++++-
desktop/source/lib/init.cxx | 3
include/sot/formats.hxx | 3
include/svx/svdmodel.hxx | 2
sc/sdi/scalc.sdi | 4 -
sc/source/core/data/document.cxx | 9 ++
sc/source/ui/view/tabvwshf.cxx | 77 ++++++++++++++------
sc/source/ui/view/viewdata.cxx | 14 ++-
sc/source/ui/view/viewfun2.cxx | 6 +
sd/source/ui/view/Outliner.cxx | 5 +
sd/source/ui/view/drviews4.cxx | 3
sd/source/ui/view/drviewsa.cxx | 3
sfx2/source/control/unoctitm.cxx | 3
sot/source/base/exchange.cxx | 1
sot/source/base/formats.cxx | 42 +++++++++++
svtools/source/misc/transfer.cxx | 25 ++++++
sw/qa/extras/tiledrendering/tiledrendering.cxx | 34 ++++++++
sw/source/core/crsr/viscrs.cxx | 3
sw/source/uibase/uiview/viewsrch.cxx | 9 ++
21 files changed, 305 insertions(+), 36 deletions(-)
New commits:
commit e6411ed8df4a173ea657a1aa17d6c587440698e4
Author: Jan Holesovsky <kendy at collabora.com>
Date: Thu Jan 21 00:42:59 2016 +0100
sc lok: Implement unit test for .uno:{Insert,Name,Remove} for sheets.
And fix indexing when at that - the inserting is 1-based, so let's be
consistent in the .uno:Name and .uno:Remove too.
Change-Id: Ib854e81551ae0a39d3ba7c68512e81ea227e9eb1
(cherry picked from commit c42b529e8508d355e8d87b5b90f76f3b32ba36d5)
diff --git a/desktop/qa/data/sheets.ods b/desktop/qa/data/sheets.ods
new file mode 100644
index 0000000..42226b2
Binary files /dev/null and b/desktop/qa/data/sheets.ods differ
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index fc73a90..bda2256 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -80,6 +80,7 @@ public:
void testCellCursor();
void testCommandResult();
void testWriterComments();
+ void testSheetOperations();
CPPUNIT_TEST_SUITE(DesktopLOKTest);
CPPUNIT_TEST(testGetStyles);
@@ -98,6 +99,7 @@ public:
CPPUNIT_TEST(testCellCursor);
CPPUNIT_TEST(testCommandResult);
CPPUNIT_TEST(testWriterComments);
+ CPPUNIT_TEST(testSheetOperations);
CPPUNIT_TEST_SUITE_END();
uno::Reference<lang::XComponent> mxComponent;
@@ -601,6 +603,38 @@ void DesktopLOKTest::testWriterComments()
comphelper::LibreOfficeKit::setActive(false);
}
+void DesktopLOKTest::testSheetOperations()
+{
+ comphelper::LibreOfficeKit::setActive(true);
+ LibLODocument_Impl* pDocument = loadDoc("sheets.ods");
+
+ // insert the last sheet
+ pDocument->pClass->postUnoCommand(pDocument, ".uno:Insert",
+ "{ \"Name\": { \"type\": \"string\", \"value\": \"LastSheet\" }, \"Index\": { \"type\": \"long\", \"value\": 0 } }", false);
+
+ // insert the first sheet
+ pDocument->pClass->postUnoCommand(pDocument, ".uno:Insert",
+ "{ \"Name\": { \"type\": \"string\", \"value\": \"FirstSheet\" }, \"Index\": { \"type\": \"long\", \"value\": 1 } }", false);
+
+ // rename the \"Sheet1\" (2nd now) to \"Renamed\"
+ pDocument->pClass->postUnoCommand(pDocument, ".uno:Name",
+ "{ \"Name\": { \"type\": \"string\", \"value\": \"Renamed\" }, \"Index\": { \"type\": \"long\", \"value\": 2 } }", false);
+
+ // delete the \"Sheet2\" (3rd)
+ pDocument->pClass->postUnoCommand(pDocument, ".uno:Remove",
+ "{ \"Index\": { \"type\": \"long\", \"value\": 3 } }", false);
+
+ CPPUNIT_ASSERT_EQUAL(pDocument->pClass->getParts(pDocument), 6);
+
+ std::vector<OString> pExpected = { "FirstSheet", "Renamed", "Sheet3", "Sheet4", "Sheet5", "LastSheet" };
+ for (int i = 0; i < 6; ++i)
+ {
+ CPPUNIT_ASSERT_EQUAL(pExpected[i], OString(pDocument->pClass->getPartName(pDocument, i)));
+ }
+
+ comphelper::LibreOfficeKit::setActive(false);
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(DesktopLOKTest);
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index 461b629..cba480b 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -333,8 +333,14 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
OUString aName;
if( pReqArgs->HasItem( FN_PARAM_1, &pItem ) )
+ {
nTabNr = static_cast<const SfxUInt16Item*>(pItem)->GetValue();
+ // inserting is 1-based, let's be consistent
+ if (nTabNr > 0)
+ --nTabNr;
+ }
+
if( pReqArgs->HasItem( nSlot, &pItem ) )
aName = static_cast<const SfxStringItem*>(pItem)->GetValue();
@@ -571,12 +577,18 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
bool bHasIndex = (pReqArgs != nullptr);
// allow removing via the Index/FID_DELETE_TABLE parameter
- SCTAB nIndexTab = nCurrentTab;
+ SCTAB nTabNr = nCurrentTab;
if (bHasIndex)
{
const SfxPoolItem* pItem;
if (pReqArgs->HasItem(FID_DELETE_TABLE, &pItem))
- nIndexTab = static_cast<const SfxUInt16Item*>(pItem)->GetValue();
+ {
+ nTabNr = static_cast<const SfxUInt16Item*>(pItem)->GetValue();
+
+ // inserting is 1-based, let's be consistent
+ if (nTabNr > 0)
+ --nTabNr;
+ }
}
bool bDoIt = bHasIndex;
@@ -598,8 +610,8 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
if (bHasIndex)
{
// sheet no. provided by the parameter
- TheTabs.push_back(nIndexTab);
- if (nNewTab > nIndexTab && nNewTab > 0)
+ TheTabs.push_back(nTabNr);
+ if (nNewTab > nTabNr && nNewTab > 0)
--nNewTab;
}
else
commit d8a7e6de54de9edd3e4d5f006301198642369c17
Author: Jan Holesovsky <kendy at collabora.com>
Date: Thu Jan 21 00:02:16 2016 +0100
sc lok: Fix .uno:Remove (removing sheets) to accept a parameter.
.sdi annouces that, but it was never implemented...
Change-Id: I7abfbdc88f055eeb993617a5a51371af0f825d34
(cherry picked from commit cccbc20a9a44350dc48b9280d47b58e4e2a4dc31)
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 00bb3e6..dc2aeb3 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -738,6 +738,9 @@ bool ScDocument::DeleteTab( SCTAB nTab )
// sheet names of references are not valid until sheet is deleted
pChartListenerCollection->UpdateScheduledSeriesRanges();
+ if (comphelper::LibreOfficeKit::isActive() && GetDrawLayer())
+ GetDrawLayer()->libreOfficeKitCallback(LOK_CALLBACK_DOCUMENT_SIZE_CHANGED, "");
+
bValid = true;
}
}
@@ -825,6 +828,9 @@ bool ScDocument::DeleteTabs( SCTAB nTab, SCTAB nSheets )
// sheet names of references are not valid until sheet is deleted
pChartListenerCollection->UpdateScheduledSeriesRanges();
+ if (comphelper::LibreOfficeKit::isActive() && GetDrawLayer())
+ GetDrawLayer()->libreOfficeKitCallback(LOK_CALLBACK_DOCUMENT_SIZE_CHANGED, "");
+
bValid = true;
}
}
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index 4371353..461b629 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -568,37 +568,60 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
case FID_DELETE_TABLE:
{
- // unnecessary parameter -> method depends on table
+ bool bHasIndex = (pReqArgs != nullptr);
- bool bDoIt = rReq.IsAPI();
- if( !bDoIt )
+ // allow removing via the Index/FID_DELETE_TABLE parameter
+ SCTAB nIndexTab = nCurrentTab;
+ if (bHasIndex)
{
- // source isn't basic -> ask again
+ const SfxPoolItem* pItem;
+ if (pReqArgs->HasItem(FID_DELETE_TABLE, &pItem))
+ nIndexTab = static_cast<const SfxUInt16Item*>(pItem)->GetValue();
+ }
- bDoIt = ( RET_YES ==
- ScopedVclPtr<QueryBox>::Create( GetDialogParent(),
- WinBits( WB_YES_NO | WB_DEF_YES ),
- ScGlobal::GetRscString(STR_QUERY_DELTAB)
- )->Execute() );
+ bool bDoIt = bHasIndex;
+ if (!bDoIt)
+ {
+ // no parameter given, ask for confirmation
+ bDoIt = ( RET_YES ==
+ ScopedVclPtr<QueryBox>::Create( GetDialogParent(),
+ WinBits( WB_YES_NO | WB_DEF_YES ),
+ ScGlobal::GetRscString(STR_QUERY_DELTAB)
+ )->Execute() );
}
- if( bDoIt )
+
+ if (bDoIt)
{
- SCTAB nNewTab = nCurrentTab;
- SCTAB nFirstTab=0;
- bool bTabFlag=false;
- ScMarkData& rMark = rViewData.GetMarkData();
+ SCTAB nNewTab = nCurrentTab;
std::vector<SCTAB> TheTabs;
- for(SCTAB i=0;i<nTabCount;i++)
+
+ if (bHasIndex)
{
- if(rMark.GetTableSelect(i) &&!pDoc->IsTabProtected(i))
+ // sheet no. provided by the parameter
+ TheTabs.push_back(nIndexTab);
+ if (nNewTab > nIndexTab && nNewTab > 0)
+ --nNewTab;
+ }
+ else
+ {
+ SCTAB nFirstTab = 0;
+ bool bTabFlag = false;
+ ScMarkData& rMark = rViewData.GetMarkData();
+ for (SCTAB i = 0; i < nTabCount; i++)
{
- TheTabs.push_back(i);
- bTabFlag=true;
- if(nNewTab==i) nNewTab++;
+ if (rMark.GetTableSelect(i) && !pDoc->IsTabProtected(i))
+ {
+ TheTabs.push_back(i);
+ bTabFlag = true;
+ if (nNewTab == i)
+ nNewTab++;
+ }
+ if (!bTabFlag)
+ nFirstTab = i;
}
- if(!bTabFlag) nFirstTab=i;
+ if (nNewTab >= nTabCount)
+ nNewTab = nFirstTab;
}
- if(nNewTab>=nTabCount) nNewTab=nFirstTab;
rViewData.SetTabNo(nNewTab);
DeleteTables(TheTabs);
commit bb4200760c8e59814dae87791989f1b230a06795
Author: Jan Holesovsky <kendy at collabora.com>
Date: Wed Jan 20 22:12:33 2016 +0100
sc lok: Fix .uno:Name (renaming sheets) to really accept parameters.
The code handles them, but they were unusable, because .sdi did not announce
them.
Change-Id: I35bd3009d092eb48a36aee2ffed3964dc61946e2
(cherry picked from commit 59a93573d677c85402b78bf748c7267554cf3ca2)
diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index dd91da2..75f0233 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -4912,7 +4912,7 @@ SfxVoidItem Move FID_TAB_MOVE
SfxStringItem Name FID_TAB_RENAME
-
+(SfxStringItem Name FID_TAB_RENAME,SfxUInt16Item Index FN_PARAM_1)
[
/* flags: */
AutoUpdate = FALSE,
@@ -4927,8 +4927,6 @@ SfxStringItem Name FID_TAB_RENAME
RecordPerSet;
Synchron;
- Readonly = FALSE,
-
/* config: */
AccelConfig = TRUE,
MenuConfig = TRUE,
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index dae9bd4..00bb3e6 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -866,6 +866,9 @@ bool ScDocument::RenameTab( SCTAB nTab, const OUString& rName, bool /* bUpdateRe
for (; it != maTabs.end(); ++it)
if ( *it && (*it)->IsStreamValid())
(*it)->SetStreamValid( false );
+
+ if (comphelper::LibreOfficeKit::isActive() && GetDrawLayer())
+ GetDrawLayer()->libreOfficeKitCallback(LOK_CALLBACK_DOCUMENT_SIZE_CHANGED, "");
}
}
}
commit d47df29c7b5721eb6d7965e33c261f1a8789c57e
Author: Jan Holesovsky <kendy at collabora.com>
Date: Wed Jan 20 22:12:19 2016 +0100
sc: Fix build.
Change-Id: I496015f119b1e102528ac5ec5d27e896de25e56c
(cherry picked from commit 03d10e1ab2a7a97c00edbc07c1fe7c0fc937154b)
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 7aa224e..3bed51a 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -59,6 +59,7 @@
#include <gridwin.hxx>
#include <rtl/ustrbuf.hxx>
#include <boost/checked_delete.hpp>
+#include <comphelper/lok.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/string.hxx>
commit 3f608230bbb8bc99782d8c1060d78d773c02296c
Author: Henry Castro <hcastro at collabora.com>
Date: Tue Jan 19 15:11:57 2016 -0400
sc lokit: the visible row/column must be 0, when loading a document
Change-Id: Ie980e0bb0726dd8bc4215d5b23ac6e1d2c9e2719
Reviewed-on: https://gerrit.libreoffice.org/21611
Reviewed-by: Henry Castro <hcastro at collabora.com>
Tested-by: Henry Castro <hcastro at collabora.com>
(cherry picked from commit 029ce852c2f67e06d60e0ce50fff936c8e2ce9f4)
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 31f28c1..7aa224e 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -171,6 +171,7 @@ void ScViewDataTable::ReadUserDataSequence(const uno::Sequence <beans::PropertyV
sal_Int32 nTempPosHTw(0);
bool bHasVSplitInTwips = false;
bool bHasHSplitInTwips = false;
+ bool bIsTiledRendering = comphelper::LibreOfficeKit::isActive();
for (sal_Int32 i = 0; i < nCount; i++)
{
OUString sName(aSettings[i].Name);
@@ -222,22 +223,26 @@ void ScViewDataTable::ReadUserDataSequence(const uno::Sequence <beans::PropertyV
else if (sName == SC_POSITIONLEFT)
{
aSettings[i].Value >>= nTemp32;
- nPosX[SC_SPLIT_LEFT] = SanitizeCol( static_cast<SCCOL>(nTemp32));
+ nPosX[SC_SPLIT_LEFT] = bIsTiledRendering ? 0 :
+ SanitizeCol( static_cast<SCCOL>(nTemp32));
}
else if (sName == SC_POSITIONRIGHT)
{
aSettings[i].Value >>= nTemp32;
- nPosX[SC_SPLIT_RIGHT] = SanitizeCol( static_cast<SCCOL>(nTemp32));
+ nPosX[SC_SPLIT_RIGHT] = bIsTiledRendering ? 0 :
+ SanitizeCol( static_cast<SCCOL>(nTemp32));
}
else if (sName == SC_POSITIONTOP)
{
aSettings[i].Value >>= nTemp32;
- nPosY[SC_SPLIT_TOP] = SanitizeRow( static_cast<SCROW>(nTemp32));
+ nPosY[SC_SPLIT_TOP] = bIsTiledRendering ? 0 :
+ SanitizeRow( static_cast<SCROW>(nTemp32));
}
else if (sName == SC_POSITIONBOTTOM)
{
aSettings[i].Value >>= nTemp32;
- nPosY[SC_SPLIT_BOTTOM] = SanitizeRow( static_cast<SCROW>(nTemp32));
+ nPosY[SC_SPLIT_BOTTOM] = bIsTiledRendering ? 0 :
+ SanitizeRow( static_cast<SCROW>(nTemp32));
}
else if (sName == SC_ZOOMTYPE)
{
commit 91d7b3d6db9ce6a5b3e7151faba7bbb8a99ebdfa
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Tue Jan 19 15:18:52 2016 +0100
LOK: include ModifiedStatus in CALLBACK_STATE_CHANGED
Change-Id: Ic44a9266a67bfad8b0490a8acb4a419af99ea42c
(cherry picked from commit abbfbb4d35d6fa9edbb8f331a9d9503183eb0356)
(cherry picked from commit 3bdc59bcde10bb4cc676bf7ed13bab2738ad41dc)
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 05d49b0..397448c 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -710,7 +710,8 @@ static void doc_iniUnoCommands ()
OUString(".uno:SuperScript"),
OUString(".uno:Strikeout"),
OUString(".uno:StyleApply"),
- OUString(".uno:Underline")
+ OUString(".uno:Underline"),
+ OUString(".uno:ModifiedStatus")
};
util::URL aCommandURL;
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index c092067..130f0d1 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -1076,7 +1076,8 @@ void SfxDispatchController_Impl::InterceptLOKStateChangeEvent(const SfxObjectShe
aEvent.FeatureURL.Path == "SubScript" ||
aEvent.FeatureURL.Path == "SuperScript" ||
aEvent.FeatureURL.Path == "Strikeout" ||
- aEvent.FeatureURL.Path == "Underline")
+ aEvent.FeatureURL.Path == "Underline" ||
+ aEvent.FeatureURL.Path == "ModifiedStatus")
{
bool bTemp = false;
aEvent.State >>= bTemp;
commit dbddd9191dc1a82dfdd59bc9d6087f30f7728e25
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Tue Jan 19 14:29:33 2016 +0100
CppunitTest_desktop_lib: add jpeg paste testcase
Fails without commit 27c6b8586d5d2cd1fa5425b4969d915a0b739475 (svtools:
implement clipboard import of JPEG files, 2016-01-19).
(cherry picked from commit 802564e036db1ee3df8b19593b7f9f1be0deec54)
Change-Id: Ic4e3b036b3a6a1c294bf15ef0b206cf1e458fc4e
diff --git a/desktop/qa/data/paste.jpg b/desktop/qa/data/paste.jpg
new file mode 100644
index 0000000..ca9183e
Binary files /dev/null and b/desktop/qa/data/paste.jpg differ
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index f069595..fc73a90 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -15,6 +15,7 @@
#include <com/sun/star/awt/XReschedule.hpp>
#include <com/sun/star/awt/Toolkit.hpp>
#include <basebmp/bitmapdevice.hxx>
+#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
#include <boost/property_tree/json_parser.hpp>
#include <comphelper/processfactory.hxx>
#include <sfx2/objsh.hxx>
@@ -74,6 +75,7 @@ public:
void testSaveAs();
void testSaveAsCalc();
void testPasteWriter();
+ void testPasteWriterJPEG();
void testRowColumnHeaders();
void testCellCursor();
void testCommandResult();
@@ -91,6 +93,7 @@ public:
CPPUNIT_TEST(testSaveAs);
CPPUNIT_TEST(testSaveAsCalc);
CPPUNIT_TEST(testPasteWriter);
+ CPPUNIT_TEST(testPasteWriterJPEG);
CPPUNIT_TEST(testRowColumnHeaders);
CPPUNIT_TEST(testCellCursor);
CPPUNIT_TEST(testCommandResult);
@@ -410,6 +413,27 @@ void DesktopLOKTest::testPasteWriter()
comphelper::LibreOfficeKit::setActive(false);
}
+void DesktopLOKTest::testPasteWriterJPEG()
+{
+ comphelper::LibreOfficeKit::setActive();
+ LibLODocument_Impl* pDocument = loadDoc("blank_text.odt");
+ OString aText("hello");
+
+ OUString aFileURL;
+ createFileURL(OUString::createFromAscii("paste.jpg"), aFileURL);
+ std::ifstream aImageStream(aFileURL.toUtf8().copy(strlen("file://")).getStr());
+ std::vector<char> aImageContents((std::istreambuf_iterator<char>(aImageStream)), std::istreambuf_iterator<char>());
+
+ CPPUNIT_ASSERT(pDocument->pClass->paste(pDocument, "image/jpeg", aImageContents.data(), aImageContents.size()));
+
+ uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage();
+ // This was 0, JPEG was not handled as a format for clipboard paste.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), xDrawPage->getCount());
+
+ comphelper::LibreOfficeKit::setActive(false);
+}
+
void DesktopLOKTest::testRowColumnHeaders()
{
/*
commit 7bdd6c08bd595bbae0189b0593400e759a227339
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Tue Jan 19 12:47:45 2016 +0100
svtools: implement clipboard import of JPEG files
With this, lok::Document::paste("image/jpeg", "...") as invoked by
gtktiledviewer results in a Writer image just like the previously
already working PNG variant.
Change-Id: I9e7b94043519db4ccf3c9ad32474a15275896dd4
(cherry picked from commit 27c6b8586d5d2cd1fa5425b4969d915a0b739475)
diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx
index 2cee3ba..3ef3b2b 100644
--- a/svtools/source/misc/transfer.cxx
+++ b/svtools/source/misc/transfer.cxx
@@ -60,6 +60,7 @@
#include <vcl/dibtools.hxx>
#include <vcl/pngread.hxx>
#include <vcl/pngwrite.hxx>
+#include <vcl/graphicfilter.hxx>
#include <memory>
// - Namespaces -
@@ -1629,11 +1630,19 @@ bool TransferableDataHelper::GetBitmapEx( const DataFlavor& rFlavor, BitmapEx& r
DataFlavor aSubstFlavor;
bool bRet(GetSotStorageStream(rFlavor, xStm));
bool bSuppressPNG(false); // #122982# If PNG stream not accessed, but BMP one, suppress trying to load PNG
+ bool bSuppressJPEG(false);
if(!bRet && HasFormat(SotClipboardFormatId::PNG) && SotExchange::GetFormatDataFlavor(SotClipboardFormatId::PNG, aSubstFlavor))
{
// when no direct success, try if PNG is available
bRet = GetSotStorageStream(aSubstFlavor, xStm);
+ bSuppressJPEG = bRet;
+ }
+
+ if(!bRet && HasFormat(SotClipboardFormatId::JPEG) && SotExchange::GetFormatDataFlavor(SotClipboardFormatId::JPEG, aSubstFlavor))
+ {
+ bRet = GetSotStorageStream(aSubstFlavor, xStm);
+ bSuppressPNG = bRet;
}
if(!bRet && HasFormat(SotClipboardFormatId::BMP) && SotExchange::GetFormatDataFlavor(SotClipboardFormatId::BMP, aSubstFlavor))
@@ -1641,6 +1650,7 @@ bool TransferableDataHelper::GetBitmapEx( const DataFlavor& rFlavor, BitmapEx& r
// when no direct success, try if BMP is available
bRet = GetSotStorageStream(aSubstFlavor, xStm);
bSuppressPNG = bRet;
+ bSuppressJPEG = bRet;
}
if(bRet)
@@ -1652,6 +1662,14 @@ bool TransferableDataHelper::GetBitmapEx( const DataFlavor& rFlavor, BitmapEx& r
rBmpEx = aPNGReader.Read();
}
+ else if(!bSuppressJPEG && rFlavor.MimeType.equalsIgnoreAsciiCase("image/jpeg"))
+ {
+ // it's a JPEG, import to BitmapEx
+ GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
+ Graphic aGraphic;
+ if (rFilter.ImportGraphic(aGraphic, "", *xStm) == GRFILTER_OK)
+ rBmpEx = aGraphic.GetBitmapEx();
+ }
if(rBmpEx.IsEmpty())
{
@@ -1801,6 +1819,13 @@ bool TransferableDataHelper::GetGraphic( const css::datatransfer::DataFlavor& rF
if( ( bRet = GetBitmapEx( aFlavor, aBmpEx ) ) )
rGraphic = aBmpEx;
}
+ else if (SotExchange::GetFormatDataFlavor(SotClipboardFormatId::JPEG, aFlavor) && TransferableDataHelper::IsEqual(aFlavor, rFlavor))
+ {
+ BitmapEx aBitmapEx;
+
+ if ((bRet = GetBitmapEx(aFlavor, aBitmapEx)))
+ rGraphic = aBitmapEx;
+ }
else if(SotExchange::GetFormatDataFlavor( SotClipboardFormatId::BITMAP, aFlavor ) &&
TransferableDataHelper::IsEqual( aFlavor, rFlavor ) )
{
commit 2972db2420ab2a26275be9c1fc8bc757d9bba9bd
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Tue Jan 19 12:31:03 2016 +0100
sot: accept JPEG as a clipboard format where we accept PNG already
Change-Id: I64602d31e8aa873e2280f86eaf618dd6007acaf1
(cherry picked from commit f731ecfd7bd3c703455e07447e9bb593e7b6e059)
diff --git a/include/sot/formats.hxx b/include/sot/formats.hxx
index fa3c768..04094b0 100644
--- a/include/sot/formats.hxx
+++ b/include/sot/formats.hxx
@@ -171,8 +171,9 @@ enum class SotClipboardFormatId : sal_uLong
PNG = 141,
STARWRITERGLOB_8_TEMPLATE = 142,
MATHML = 143,
+ JPEG = 144,
// the point at which we start allocating "runtime" format IDs
- USER_END = MATHML
+ USER_END = JPEG
};
/** Make it easier to iterate over format IDs */
diff --git a/sot/source/base/exchange.cxx b/sot/source/base/exchange.cxx
index 13ca02f..c27336d 100644
--- a/sot/source/base/exchange.cxx
+++ b/sot/source/base/exchange.cxx
@@ -202,6 +202,7 @@ namespace
/*141 SotClipboardFormatId::PNG*/ { "image/png", "PNG Bitmap", &cppu::UnoType<Sequence<sal_Int8>>::get() },
/*142 SotClipboardFormatId::STARWRITERGLOB_8_TEMPLATE*/ { MIMETYPE_OASIS_OPENDOCUMENT_TEXT_GLOBAL_TEMPLATE_ASCII, "Writer/Global 8 Template", &cppu::UnoType<Sequence<sal_Int8>>::get() },
/*143 SotClipboardFormatId::MATHML*/ { "application/mathml+xml", "MathML", &::cppu::UnoType<const Sequence< sal_Int8 >>::get() },
+ /*144 SotClipboardFormatId::JPEG*/ { "image/jpeg", "JPEG Bitmap", &cppu::UnoType<Sequence<sal_Int8>>::get() },
};
return &aInstance[0];
}
diff --git a/sot/source/base/formats.cxx b/sot/source/base/formats.cxx
index a22d3c7..3b3fec3 100644
--- a/sot/source/base/formats.cxx
+++ b/sot/source/base/formats.cxx
@@ -151,6 +151,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_TEXTFRAME_Def[] = \
{ SotClipboardFormatId::GDIMETAFILE, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::DRAWING, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::PNG, EXCHG_IN_ACTION_COPY, 0 }, \
+ { SotClipboardFormatId::JPEG, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::BITMAP, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::SVXB, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::HTML, EXCHG_IN_ACTION_COPY, 0 }, \
@@ -192,6 +193,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_TEXTFRAME_Move[] = \
{ SotClipboardFormatId::STRING, EXCHG_OUT_ACTION_INSERT_STRING| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
+ { SotClipboardFormatId::JPEG, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::EMBED_SOURCE_OLE, EXCHG_OUT_ACTION_INSERT_OLE, 0 }, \
{ SotClipboardFormatId::EMBEDDED_OBJ_OLE, EXCHG_OUT_ACTION_INSERT_OLE, 0 }, \
@@ -255,6 +257,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_TEXTFRAME_WEB_Def[] = \
{ \
{ SotClipboardFormatId::GDIMETAFILE, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::PNG, EXCHG_IN_ACTION_COPY, 0 }, \
+ { SotClipboardFormatId::JPEG, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::BITMAP, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::SVXB, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::HTML, EXCHG_IN_ACTION_COPY, 0 }, \
@@ -287,6 +290,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_TEXTFRAME_WEB_Move[] = \
{ SotClipboardFormatId::STRING, EXCHG_OUT_ACTION_INSERT_STRING| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
+ { SotClipboardFormatId::JPEG, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::LINK, EXCHG_OUT_ACTION_INSERT_DDE, 0 }, \
{ SotClipboardFormatId::SVIM, EXCHG_OUT_ACTION_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
@@ -336,6 +340,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_GRAPHOBJ_Def[] = \
{ SotClipboardFormatId::GDIMETAFILE, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::DRAWING, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::PNG, EXCHG_IN_ACTION_COPY, 0 }, \
+ { SotClipboardFormatId::JPEG, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::BITMAP, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::SVXB, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::HTML, EXCHG_IN_ACTION_COPY, 0 }, \
@@ -355,6 +360,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_GRAPHOBJ_Move[] = \
{ SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_REPLACE_SVXB| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_REPLACE_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_REPLACE_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
+ { SotClipboardFormatId::JPEG, EXCHG_OUT_ACTION_REPLACE_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_REPLACE_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::SOLK, 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::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
@@ -369,6 +375,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_GRAPHOBJ_Copy[] = \
{ SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_INSERT_SVXB| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
+ { SotClipboardFormatId::JPEG, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::SOLK, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
@@ -383,6 +390,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_GRAPHOBJ_Link[] = \
{ SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_GET_ATTRIBUTES| EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_GET_ATTRIBUTES| EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
+ { SotClipboardFormatId::JPEG, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::SOLK, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
@@ -398,6 +406,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_LNKD_GRAPHOBJ_Def[] = \
{ SotClipboardFormatId::GDIMETAFILE, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::DRAWING, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::PNG, EXCHG_IN_ACTION_COPY, 0 }, \
+ { SotClipboardFormatId::JPEG, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::BITMAP, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::SVXB, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::HTML, EXCHG_IN_ACTION_COPY, 0 }, \
@@ -417,6 +426,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_LNKD_GRAPHOBJ_Move[] =\
{ SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_REPLACE_SVXB| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_REPLACE_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_REPLACE_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
+ { SotClipboardFormatId::JPEG, EXCHG_OUT_ACTION_REPLACE_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_REPLACE_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::SOLK, 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::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
@@ -431,6 +441,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_LNKD_GRAPHOBJ_Copy[] =\
{ SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_INSERT_SVXB| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
+ { SotClipboardFormatId::JPEG, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::SOLK, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
@@ -445,6 +456,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_LNKD_GRAPHOBJ_Link[] =\
{ SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_GET_ATTRIBUTES| EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_GET_ATTRIBUTES| EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
+ { SotClipboardFormatId::JPEG, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::SOLK, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
@@ -460,6 +472,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_GRAPH_W_IMAP_Def[] = \
{ SotClipboardFormatId::GDIMETAFILE, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::DRAWING, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::PNG, EXCHG_IN_ACTION_COPY, 0 }, \
+ { SotClipboardFormatId::JPEG, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::BITMAP, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::SVXB, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::HTML, EXCHG_IN_ACTION_COPY, 0 }, \
@@ -480,6 +493,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_GRAPH_W_IMAP_Move[] = \
{ SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_REPLACE_SVXB| EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_REPLACE_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_REPLACE_BITMAP| EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
+ { SotClipboardFormatId::JPEG, EXCHG_OUT_ACTION_REPLACE_BITMAP| EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_REPLACE_BITMAP| EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::SOLK, 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::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
@@ -494,6 +508,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_GRAPH_W_IMAP_Copy[] = \
{ SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_INSERT_SVXB| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
+ { SotClipboardFormatId::JPEG, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::SOLK, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
@@ -508,6 +523,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_GRAPH_W_IMAP_Link[] = \
{ SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_GET_ATTRIBUTES| EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_GET_ATTRIBUTES| EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
+ { SotClipboardFormatId::JPEG, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::SOLK, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
@@ -523,6 +539,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_LNKD_GRAPH_W_IMAP_Def[] =\
{ SotClipboardFormatId::GDIMETAFILE, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::DRAWING, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::PNG, EXCHG_IN_ACTION_COPY, 0 }, \
+ { SotClipboardFormatId::JPEG, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::BITMAP, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::SVXB, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::HTML, EXCHG_IN_ACTION_COPY, 0 }, \
@@ -543,6 +560,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_LNKD_GRAPH_W_IMAP_Move[] =\
{ SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_REPLACE_SVXB| EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_REPLACE_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_REPLACE_BITMAP| EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
+ { SotClipboardFormatId::JPEG, EXCHG_OUT_ACTION_REPLACE_BITMAP| EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_REPLACE_BITMAP| EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::SOLK, 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::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
@@ -557,6 +575,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_LNKD_GRAPH_W_IMAP_Copy[] =\
{ SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_INSERT_SVXB| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
+ { SotClipboardFormatId::JPEG, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::SOLK, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
@@ -571,6 +590,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_LNKD_GRAPH_W_IMAP_Link[] =\
{ SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_GET_ATTRIBUTES| EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_GET_ATTRIBUTES| EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
+ { SotClipboardFormatId::JPEG, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::SOLK, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
@@ -606,6 +626,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_DRAWOBJ_Def[] = \
{ SotClipboardFormatId::GDIMETAFILE, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::DRAWING, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::PNG, EXCHG_IN_ACTION_COPY, 0 }, \
+ { SotClipboardFormatId::JPEG, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::BITMAP, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::SVXB, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::HTML, EXCHG_IN_ACTION_COPY, 0 }, \
@@ -625,6 +646,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_DRAWOBJ_Copy[] = \
{ SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_REPLACE_SVXB| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_REPLACE_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_REPLACE_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
+ { SotClipboardFormatId::JPEG, EXCHG_OUT_ACTION_REPLACE_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_REPLACE_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::SOLK, 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::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
@@ -639,6 +661,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_DRAWOBJ_Move[] = \
{ SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_INSERT_SVXB| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
+ { SotClipboardFormatId::JPEG, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::SOLK, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
@@ -653,6 +676,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_DRAWOBJ_Link[] = \
{ SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_GET_ATTRIBUTES| EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_GET_ATTRIBUTES| EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
+ { SotClipboardFormatId::JPEG, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::SOLK, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
@@ -669,6 +693,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_URLBUTTON_Def[] = \
{ SotClipboardFormatId::GDIMETAFILE, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::DRAWING, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::PNG, EXCHG_IN_ACTION_COPY, 0 }, \
+ { SotClipboardFormatId::JPEG, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::BITMAP, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::SVXB, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::SIMPLE_FILE, EXCHG_IN_ACTION_COPY, 0 }, \
@@ -691,6 +716,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_URLBUTTON_Copy[] = \
{ SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_INSERT_SVXB | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
{ SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
{ SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
+ { SotClipboardFormatId::JPEG, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
{ SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
{ SotClipboardFormatId::SOLK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
@@ -730,6 +756,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_GROUPOBJ_Def[] = \
{ SotClipboardFormatId::GDIMETAFILE, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::DRAWING, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::PNG, EXCHG_IN_ACTION_COPY, 0 }, \
+ { SotClipboardFormatId::JPEG, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::BITMAP, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::SVXB, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::HTML, EXCHG_IN_ACTION_COPY, 0 }, \
@@ -749,6 +776,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_GROUPOBJ_Move[] = \
{ SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_REPLACE_SVXB| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_REPLACE_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_REPLACE_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
+ { SotClipboardFormatId::JPEG, EXCHG_OUT_ACTION_REPLACE_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_REPLACE_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::SOLK, 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::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
@@ -763,6 +791,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_GROUPOBJ_Copy[] = \
{ SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_INSERT_SVXB| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
+ { SotClipboardFormatId::JPEG, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::SOLK, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
@@ -777,6 +806,7 @@ static SotAction_Impl const aEXCHG_DEST_DOC_GROUPOBJ_Link[] = \
{ SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_GET_ATTRIBUTES| EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_GET_ATTRIBUTES| EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
+ { SotClipboardFormatId::JPEG, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::SOLK, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
@@ -806,6 +836,7 @@ static SotAction_Impl const aEXCHG_DEST_SWDOC_FREE_AREA_Def[] = \
{ SotClipboardFormatId::SVXB, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::GDIMETAFILE, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::PNG, EXCHG_IN_ACTION_COPY, 0 }, \
+ { SotClipboardFormatId::JPEG, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::BITMAP, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::SONLK, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::SOLK, EXCHG_IN_ACTION_COPY, 0 }, \
@@ -834,6 +865,7 @@ static SotAction_Impl const aEXCHG_DEST_SWDOC_FREE_AREA_Move[] = \
{ SotClipboardFormatId::STRING, EXCHG_OUT_ACTION_INSERT_STRING, 0 }, \
{ SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
+ { SotClipboardFormatId::JPEG, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::EMBED_SOURCE_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
{ SotClipboardFormatId::EMBEDDED_OBJ_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
@@ -857,6 +889,7 @@ static SotAction_Impl const aEXCHG_DEST_SWDOC_FREE_AREA_Copy[] = \
{ SotClipboardFormatId::EMBED_SOURCE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
{ SotClipboardFormatId::EMBEDDED_OBJ, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
{ SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
+ { SotClipboardFormatId::JPEG, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::HTML, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::HTML_NO_COMMENT, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
@@ -913,6 +946,7 @@ static SotAction_Impl const aEXCHG_DEST_SWDOC_FREE_AREA_WEB_Def[] = \
{ SotClipboardFormatId::SVXB, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::GDIMETAFILE, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::PNG, EXCHG_IN_ACTION_COPY, 0 }, \
+ { SotClipboardFormatId::JPEG, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::BITMAP, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::SONLK, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::LINK, EXCHG_IN_ACTION_MOVE, 0 }, \
@@ -931,6 +965,7 @@ static SotAction_Impl const aEXCHG_DEST_SWDOC_FREE_AREA_WEB_Move[] = \
{ SotClipboardFormatId::STRING, EXCHG_OUT_ACTION_INSERT_STRING, 0 }, \
{ SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
+ { SotClipboardFormatId::JPEG, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::LINK, EXCHG_OUT_ACTION_INSERT_DDE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
{ SotClipboardFormatId::SVIM, EXCHG_OUT_ACTION_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
@@ -954,6 +989,7 @@ static SotAction_Impl const aEXCHG_DEST_SWDOC_FREE_AREA_WEB_Copy[] = \
{ SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
+ { SotClipboardFormatId::JPEG, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::LINK, EXCHG_OUT_ACTION_INSERT_DDE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
{ SotClipboardFormatId::SVIM, EXCHG_OUT_ACTION_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
@@ -990,6 +1026,7 @@ static SotAction_Impl const aEXCHG_DEST_SCDOC_FREE_AREA_Def[] = \
{ SotClipboardFormatId::SVXB, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::GDIMETAFILE, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::PNG, EXCHG_IN_ACTION_COPY, 0 }, \
+ { SotClipboardFormatId::JPEG, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::BITMAP, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::SD_OLE, EXCHG_IN_ACTION_MOVE, 0 }, \
{ SotClipboardFormatId::EMBED_SOURCE, EXCHG_IN_ACTION_MOVE, 0 }, \
@@ -1016,6 +1053,7 @@ static SotAction_Impl const aEXCHG_DEST_SCDOC_FREE_AREA_Move[] = \
{ SotClipboardFormatId::STRING, EXCHG_OUT_ACTION_INSERT_STRING | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
{ SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
+ { SotClipboardFormatId::JPEG, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::EMBED_SOURCE_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
{ SotClipboardFormatId::EMBEDDED_OBJ_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
@@ -1037,6 +1075,7 @@ static SotAction_Impl const aEXCHG_DEST_SCDOC_FREE_AREA_Copy[] = \
{ SotClipboardFormatId::BIFF__5,EXCHG_IN_ACTION_COPY | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
{ SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
+ { SotClipboardFormatId::JPEG, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::HTML, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::HTML_NO_COMMENT, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
@@ -1085,6 +1124,7 @@ static SotAction_Impl const aEXCHG_DEST_SDDOC_FREE_AREA_Def[] = \
{ SotClipboardFormatId::SVXB, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::GDIMETAFILE, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::PNG, EXCHG_IN_ACTION_COPY, 0 }, \
+ { SotClipboardFormatId::JPEG, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::BITMAP, EXCHG_IN_ACTION_COPY, 0 }, \
{ SotClipboardFormatId::SD_OLE, EXCHG_IN_ACTION_MOVE, 0 }, \
{ SotClipboardFormatId::EMBED_SOURCE, EXCHG_IN_ACTION_MOVE, 0 }, \
@@ -1109,6 +1149,7 @@ static SotAction_Impl const aEXCHG_DEST_SDDOC_FREE_AREA_Move[] = \
{ SotClipboardFormatId::STRING, EXCHG_OUT_ACTION_INSERT_STRING | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
{ SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
+ { SotClipboardFormatId::JPEG, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::EMBED_SOURCE_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
{ SotClipboardFormatId::EMBEDDED_OBJ_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
@@ -1127,6 +1168,7 @@ static SotAction_Impl const aEXCHG_DEST_SDDOC_FREE_AREA_Copy[] = \
{ SotClipboardFormatId::EMBEDDED_OBJ, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \
{ SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
+ { SotClipboardFormatId::JPEG, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::HTML, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
{ SotClipboardFormatId::HTML_NO_COMMENT, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\
commit ed40138d2674075f74459c229adc1481a7e24596
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Fri Jan 15 10:06:33 2016 +0100
sc tiled rendering: it's pointless to send selection changes during search all
Change-Id: I787cd1760bca0bf7fbc3132579b569882ec25ae2
(cherry picked from commit 61161254ab880f02a7a26822d45ff96ec7ca76c3)
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 987ac1b..f069595 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -36,7 +36,9 @@ using namespace desktop;
class DesktopLOKTest : public UnoApiTest
{
public:
- DesktopLOKTest() : UnoApiTest("/desktop/qa/data/")
+ DesktopLOKTest() : UnoApiTest("/desktop/qa/data/"),
+ m_nSelectionBeforeSearchResult(0),
+ m_nSelectionAfterSearchResult(0)
{
}
@@ -67,6 +69,7 @@ public:
void testGetFilterTypes();
void testGetPartPageRectangles();
void testSearchCalc();
+ void testSearchAllNotificationsCalc();
void testPaintTile();
void testSaveAs();
void testSaveAsCalc();
@@ -83,6 +86,7 @@ public:
CPPUNIT_TEST(testGetFilterTypes);
CPPUNIT_TEST(testGetPartPageRectangles);
CPPUNIT_TEST(testSearchCalc);
+ CPPUNIT_TEST(testSearchAllNotificationsCalc);
CPPUNIT_TEST(testPaintTile);
CPPUNIT_TEST(testSaveAs);
CPPUNIT_TEST(testSaveAsCalc);
@@ -97,6 +101,8 @@ public:
OString m_aTextSelection;
std::vector<OString> m_aSearchResultSelection;
std::vector<int> m_aSearchResultPart;
+ int m_nSelectionBeforeSearchResult;
+ int m_nSelectionAfterSearchResult;
// for testCommandResult
osl::Condition m_aCommandResultCondition;
@@ -149,6 +155,10 @@ void DesktopLOKTest::callbackImpl(int nType, const char* pPayload)
case LOK_CALLBACK_TEXT_SELECTION:
{
m_aTextSelection = pPayload;
+ if (m_aSearchResultSelection.empty())
+ ++m_nSelectionBeforeSearchResult;
+ else
+ ++m_nSelectionAfterSearchResult;
}
break;
case LOK_CALLBACK_SEARCH_RESULT_SELECTION:
@@ -311,6 +321,31 @@ void DesktopLOKTest::testSearchCalc()
comphelper::LibreOfficeKit::setActive(false);
}
+void DesktopLOKTest::testSearchAllNotificationsCalc()
+{
+ LibLibreOffice_Impl aOffice;
+ comphelper::LibreOfficeKit::setActive();
+ LibLODocument_Impl* pDocument = loadDoc("search.ods");
+ pDocument->pClass->initializeForRendering(pDocument, nullptr);
+ pDocument->pClass->registerCallback(pDocument, &DesktopLOKTest::callback, this);
+
+ uno::Sequence<beans::PropertyValue> aPropertyValues(comphelper::InitPropertySequence(
+ {
+ {"SearchItem.SearchString", uno::makeAny(OUString("foo"))},
+ {"SearchItem.Backward", uno::makeAny(false)},
+ {"SearchItem.Command", uno::makeAny(static_cast<sal_uInt16>(SvxSearchCmd::FIND_ALL))},
+ }));
+ comphelper::dispatchCommand(".uno:ExecuteSearch", aPropertyValues);
+ Scheduler::ProcessEventsToIdle();
+
+ // This was 1, make sure that we get no notifications about selection changes during search.
+ CPPUNIT_ASSERT_EQUAL(0, m_nSelectionBeforeSearchResult);
+ // But we do get the selection afterwards.
+ CPPUNIT_ASSERT(m_nSelectionAfterSearchResult > 0);
+
+ comphelper::LibreOfficeKit::setActive(false);
+}
+
void DesktopLOKTest::testPaintTile()
{
LibLODocument_Impl* pDocument = loadDoc("blank_text.odt");
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 843d4ce..63ac05a 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -1822,7 +1822,10 @@ bool ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem,
}
}
+ // Avoid LOK selection notifications before we have all the results.
+ rDoc.GetDrawLayer()->setTiledSearching(true);
MarkDataChanged();
+ rDoc.GetDrawLayer()->setTiledSearching(false);
if ( bFound )
{
@@ -1874,6 +1877,9 @@ bool ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem,
boost::property_tree::write_json(aStream, aTree);
OString aPayload = aStream.str().c_str();
rDoc.GetDrawLayer()->libreOfficeKitCallback(LOK_CALLBACK_SEARCH_RESULT_SELECTION, aPayload.getStr());
+
+ // Trigger LOK_CALLBACK_TEXT_SELECTION now.
+ MarkDataChanged();
}
}
commit fb9e521b4c5e5124bc1b6f11cd197bfbc3cb0927
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Fri Jan 15 08:24:09 2016 +0100
sw tiled rendering: it's pointless to send selection changes during search all
Change-Id: Iad3436c74d0ff95c84b5da870124b1e335241ca2
(cherry picked from commit 07054b050eb24442be92c1733aee27fe0a80ef69)
diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index a975fff..197ca6a 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -47,6 +47,7 @@ public:
void testSearchTextFrameWrapAround();
void testDocumentSizeChanged();
void testSearchAll();
+ void testSearchAllNotifications();
CPPUNIT_TEST_SUITE(SwTiledRenderingTest);
CPPUNIT_TEST(testRegisterCallback);
@@ -62,6 +63,7 @@ public:
CPPUNIT_TEST(testSearchTextFrameWrapAround);
CPPUNIT_TEST(testDocumentSizeChanged);
CPPUNIT_TEST(testSearchAll);
+ CPPUNIT_TEST(testSearchAllNotifications);
CPPUNIT_TEST_SUITE_END();
private:
@@ -74,10 +76,14 @@ private:
bool m_bFound;
std::vector<OString> m_aSearchResultSelection;
std::vector<int> m_aSearchResultPart;
+ int m_nSelectionBeforeSearchResult;
+ int m_nSelectionAfterSearchResult;
};
SwTiledRenderingTest::SwTiledRenderingTest()
- : m_bFound(true)
+ : m_bFound(true),
+ m_nSelectionBeforeSearchResult(0),
+ m_nSelectionAfterSearchResult(0)
{
}
@@ -126,6 +132,10 @@ void SwTiledRenderingTest::callbackImpl(int nType, const char* pPayload)
case LOK_CALLBACK_TEXT_SELECTION:
{
m_aTextSelection = pPayload;
+ if (m_aSearchResultSelection.empty())
+ ++m_nSelectionBeforeSearchResult;
+ else
+ ++m_nSelectionAfterSearchResult;
}
break;
case LOK_CALLBACK_SEARCH_NOT_FOUND:
@@ -455,6 +465,28 @@ void SwTiledRenderingTest::testSearchAll()
comphelper::LibreOfficeKit::setActive(false);
}
+void SwTiledRenderingTest::testSearchAllNotifications()
+{
+ comphelper::LibreOfficeKit::setActive();
+ SwXTextDocument* pXTextDocument = createDoc("search.odt");
+ pXTextDocument->registerCallback(&SwTiledRenderingTest::callback, this);
+ uno::Sequence<beans::PropertyValue> aPropertyValues(comphelper::InitPropertySequence(
+ {
+ {"SearchItem.SearchString", uno::makeAny(OUString("shape"))},
+ {"SearchItem.Backward", uno::makeAny(false)},
+ {"SearchItem.Command", uno::makeAny(static_cast<sal_uInt16>(SvxSearchCmd::FIND_ALL))},
+ }));
+ comphelper::dispatchCommand(".uno:ExecuteSearch", aPropertyValues);
+ Scheduler::ProcessEventsToIdle();
+
+ // This was 5, make sure that we get no notifications about selection changes during search.
+ CPPUNIT_ASSERT_EQUAL(0, m_nSelectionBeforeSearchResult);
+ // But we do get the selection afterwards.
+ CPPUNIT_ASSERT(m_nSelectionAfterSearchResult > 0);
+
+ comphelper::LibreOfficeKit::setActive(false);
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SwTiledRenderingTest);
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index 044083b..28f540d 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -364,7 +364,8 @@ void SwSelPaintRects::Show(std::vector<OString>* pSelectionRectangles)
// being edited.
if (comphelper::LibreOfficeKit::isActive() && !pView->GetTextEditObject())
{
- if (!empty())
+ // If pSelectionRectangles is set, we're just collecting the text selections -> don't emit start/end.
+ if (!empty() && !pSelectionRectangles)
{
// The selection may be a complex polygon, emit the logical
// start/end cursor rectangle of the selection as separate
diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx
index 815fbba..8918ff1 100644
--- a/sw/source/uibase/uiview/viewsrch.cxx
+++ b/sw/source/uibase/uiview/viewsrch.cxx
@@ -65,6 +65,8 @@
#include <view.hrc>
#include <SwRewriter.hxx>
#include <comcore.hrc>
+#include <IDocumentDrawModelAccess.hxx>
+#include <drawdoc.hxx>
#include "PostItMgr.hxx"
@@ -267,7 +269,14 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage)
break;
case SvxSearchCmd::FIND_ALL:
{
+ // Disable LOK selection notifications during search.
+ SwDrawModel* pModel = m_pWrtShell->getIDocumentDrawModelAccess().GetDrawModel();
+ if (pModel)
+ pModel->setTiledSearching(true);
bool bRet = SearchAll();
+ if (pModel)
+ pModel->setTiledSearching(false);
+
if( !bRet )
{
#if HAVE_FEATURE_DESKTOP
commit b5ac1bca8d8f4df224e75ca78d050617c33dffcd
Author: Jan Holesovsky <kendy at collabora.com>
Date: Thu Jan 14 23:29:23 2016 +0100
sd lok: More places where we need to force the transparent color for bg.
(cherry picked from commit ebbef33046b2f0b2a68a4f3b798e0cdf05b51c8a)
Change-Id: Ic6e0ed45b118b27a86f8657671ae877ce494c5d4
diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx
index a252176..93e698e 100644
--- a/sd/source/ui/view/drviews4.cxx
+++ b/sd/source/ui/view/drviews4.cxx
@@ -20,6 +20,7 @@
#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
#include "DrawViewShell.hxx"
+#include <comphelper/lok.hxx>
#include <vcl/msgbox.hxx>
#include <svl/urlbmk.hxx>
#include <svx/svdpagv.hxx>
@@ -345,6 +346,8 @@ void DrawViewShell::MouseMove(const MouseEvent& rMEvt, ::sd::Window* pWin)
Color aFillColor;
aFillColor = Color( aColorConfig.GetColorValue( svtools::APPBACKGROUND ).nColor );
+ if (comphelper::LibreOfficeKit::isActive())
+ aFillColor = COL_TRANSPARENT;
mpDrawView->SetApplicationBackgroundColor(aFillColor);
}
diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx
index fd7de69..7545856 100644
--- a/sd/source/ui/view/drviewsa.cxx
+++ b/sd/source/ui/view/drviewsa.cxx
@@ -20,6 +20,7 @@
#include "DrawViewShell.hxx"
#include <com/sun/star/scanner/ScannerManager.hpp>
#include <cppuhelper/implbase.hxx>
+#include <comphelper/lok.hxx>
#include <comphelper/processfactory.hxx>
#include <editeng/sizeitem.hxx>
#include <svx/svdlayer.hxx>
@@ -208,6 +209,8 @@ void DrawViewShell::Construct(DrawDocShell* pDocSh, PageKind eInitialPageKind)
svtools::ColorConfig aColorConfig;
mnAppBackgroundColor = Color( aColorConfig.GetColorValue( svtools::APPBACKGROUND ).nColor );
+ if (comphelper::LibreOfficeKit::isActive())
+ mnAppBackgroundColor = COL_TRANSPARENT;
mpFrameView->Connect();
commit 254b2281121b7d2d69609397dae97f2329ca41e0
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Thu Jan 14 17:26:00 2016 +0100
sd: use ScopeGuard in Outliner::SearchAndReplaceAll()
So the flag will be reset on early return as well.
(cherry picked from commit 6372080cd396a7e8608806a35a1be68d288b8fda)
Change-Id: Ib086ec4a02dda291a0291a8ac40660c16de0fbf6
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index d9b08e3..dd0d797 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -74,6 +74,7 @@
#include <editeng/editerr.hxx>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
#include <comphelper/string.hxx>
+#include <comphelper/scopeguard.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -616,7 +617,10 @@ bool Outliner::SearchAndReplaceAll()
}
else if( nullptr != dynamic_cast< const DrawViewShell *>( pViewShell.get() ))
{
+ // Disable selection change notifications during search all.
pViewShell->GetDoc()->setTiledSearching(true);
+ comphelper::ScopeGuard aGuard([pViewShell]() { pViewShell->GetDoc()->setTiledSearching(false); });
+
// Go to beginning/end of document.
maObjectIterator = ::sd::outliner::OutlinerContainer(this).begin();
// Switch to the first object which contains the search string.
@@ -666,7 +670,6 @@ bool Outliner::SearchAndReplaceAll()
OString aPayload = aStream.str().c_str();
pViewShell->GetDoc()->libreOfficeKitCallback(LOK_CALLBACK_SEARCH_RESULT_SELECTION, aPayload.getStr());
}
- pViewShell->GetDoc()->setTiledSearching(false);
}
RestoreStartPosition ();
commit 692209192b4eefd4dd8a52b4474b1cb5405eae72
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Thu Jan 14 14:48:44 2016 +0100
svx: loplugin:override
Change-Id: I532525fa12af2a0afbc1277b9a918c4d563f3b4f
(cherry picked from commit d8551a79d2dcdad3bad5c437427b25b5131534ae)
(cherry picked from commit 4505998dd9271ab0ca55ffe38642a5fa5a316320)
diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx
index 635e59d..20b057a 100644
--- a/include/svx/svdmodel.hxx
+++ b/include/svx/svdmodel.hxx
@@ -353,7 +353,7 @@ public:
/// Set if we are doing tiled searching.
void setTiledSearching(bool bTiledSearching);
/// Are we doing tiled searching?
- bool isTiledSearching() const;
+ bool isTiledSearching() const override;
// If a new MapMode is set on the RefDevice (or similar)
void RefDeviceChanged(); // not yet implemented
// default font height in logical units
More information about the Libreoffice-commits
mailing list