[Libreoffice-commits] .: Branch 'feature/mspub' - 41 commits - extensions/source filter/inc filter/qa filter/source filter/type-detection-debug.diff framework/source icon-themes/galaxy rsc/source solenv/gbuild svtools/source svx/inc svx/source sw/inc sw/Library_sw.mk sw/sdi sw/source sw/uiconfig testtools/source vcl/source
Fridrich Strba
fridrich at kemper.freedesktop.org
Fri May 25 03:39:39 PDT 2012
extensions/source/plugin/unx/npnapi.cxx | 3
extensions/source/plugin/unx/npwrap.cxx | 6
filter/inc/filter/msfilter/msdffimp.hxx | 2
filter/qa/complex/filter/detection/typeDetection/preselectedType.csv | 1
filter/source/msfilter/msdffimp.cxx | 14
filter/source/msfilter/svdfppt.cxx | 4
filter/type-detection-debug.diff | 135 ---------
framework/source/uielement/langselectionstatusbarcontroller.cxx | 17 -
icon-themes/galaxy/svx/res/selection_10x22.png |binary
rsc/source/tools/rsctools.cxx | 24 -
solenv/gbuild/UnoApiTarget.mk | 2
svtools/source/contnr/templwin.cxx | 4
svtools/source/contnr/templwin.hxx | 3
svx/inc/svx/dialogs.hrc | 6
svx/inc/svx/selctrl.hxx | 26 -
svx/source/stbctrls/selctrl.cxx | 141 ++++++----
svx/source/stbctrls/stbctrls.h | 5
svx/source/stbctrls/stbctrls.src | 55 ++-
sw/Library_sw.mk | 1
sw/inc/cmdid.h | 1
sw/sdi/_viewsh.sdi | 5
sw/sdi/swriter.sdi | 25 +
sw/sdi/viewsh.sdi | 23 -
sw/source/core/bastyp/swcache.cxx | 4
sw/source/filter/rtf/swparrtf.hxx | 6
sw/source/ui/app/app.src | 10
sw/source/ui/app/swmodule.cxx | 2
sw/source/ui/inc/app.hrc | 6
sw/source/ui/inc/wordcountctrl.hxx | 32 ++
sw/source/ui/lingu/olmenu.cxx | 7
sw/source/ui/uiview/view2.cxx | 32 ++
sw/source/ui/utlui/wordcountctrl.cxx | 26 +
sw/uiconfig/sglobal/statusbar/statusbar.xml | 2
sw/uiconfig/sweb/statusbar/statusbar.xml | 2
sw/uiconfig/swform/statusbar/statusbar.xml | 2
sw/uiconfig/swreport/statusbar/statusbar.xml | 2
sw/uiconfig/swriter/statusbar/statusbar.xml | 3
sw/uiconfig/swxform/statusbar/statusbar.xml | 2
testtools/source/bridgetest/bridgetest.cxx | 4
vcl/source/window/menu.cxx | 2
40 files changed, 357 insertions(+), 290 deletions(-)
New commits:
commit 843559546350a700f9a3b0407bddcb5b8e30b2a9
Author: Jan Holesovsky <kendy at suse.cz>
Date: Fri May 25 12:18:13 2012 +0200
language status bar control: Don't set radio buttons for some entries.
There are entries in the popup menu that are not supposed to be radio buttons,
like More... ;-)
Change-Id: Ic7986a668522901a244d35eda7e9cfbe0133f37e
diff --git a/framework/source/uielement/langselectionstatusbarcontroller.cxx b/framework/source/uielement/langselectionstatusbarcontroller.cxx
index 902b2bd..5e67beb 100644
--- a/framework/source/uielement/langselectionstatusbarcontroller.cxx
+++ b/framework/source/uielement/langselectionstatusbarcontroller.cxx
@@ -224,8 +224,11 @@ throw (::com::sun::star::uno::RuntimeException)
}
}
xPopupMenu->insertItem( MID_LANG_SEL_NONE, String( FwkResId( STR_LANGSTATUS_NONE )), css::awt::MenuItemStyle::RADIOCHECK, MID_LANG_SEL_NONE );
- xPopupMenu->insertItem( MID_LANG_SEL_RESET, String( FwkResId( STR_RESET_TO_DEFAULT_LANGUAGE )), css::awt::MenuItemStyle::RADIOCHECK, MID_LANG_SEL_RESET );
- xPopupMenu->insertItem( MID_LANG_SEL_MORE, String( FwkResId( STR_LANGSTATUS_MORE )), css::awt::MenuItemStyle::RADIOCHECK, MID_LANG_SEL_MORE );
+ if ( aLanguageTable.GetString( LANGUAGE_NONE ) == m_aCurLang )
+ xPopupMenu->checkItem( MID_LANG_SEL_NONE, sal_True );
+
+ xPopupMenu->insertItem( MID_LANG_SEL_RESET, String( FwkResId( STR_RESET_TO_DEFAULT_LANGUAGE )), 0, MID_LANG_SEL_RESET );
+ xPopupMenu->insertItem( MID_LANG_SEL_MORE, String( FwkResId( STR_LANGSTATUS_MORE )), 0, MID_LANG_SEL_MORE );
// add entries to submenu ('set language for paragraph')
nItemId = static_cast< sal_Int16 >(MID_LANG_PARA_1);
@@ -238,18 +241,18 @@ throw (::com::sun::star::uno::RuntimeException)
{
DBG_ASSERT( MID_LANG_PARA_1 <= nItemId && nItemId <= MID_LANG_PARA_9,
"nItemId outside of expected range!" );
- subPopupMenu->insertItem( nItemId, rStr, css::awt::MenuItemStyle::RADIOCHECK, nItemId );
+ subPopupMenu->insertItem( nItemId, rStr, 0, nItemId );
aLangMap[nItemId] = rStr;
++nItemId;
}
}
- subPopupMenu->insertItem( MID_LANG_PARA_NONE, String( FwkResId( STR_LANGSTATUS_NONE )), css::awt::MenuItemStyle::RADIOCHECK, MID_LANG_PARA_NONE );
- subPopupMenu->insertItem( MID_LANG_PARA_RESET, String( FwkResId( STR_RESET_TO_DEFAULT_LANGUAGE )), css::awt::MenuItemStyle::RADIOCHECK, MID_LANG_PARA_RESET );
- subPopupMenu->insertItem( MID_LANG_PARA_MORE, String( FwkResId( STR_LANGSTATUS_MORE )), css::awt::MenuItemStyle::RADIOCHECK, MID_LANG_PARA_MORE );
+ subPopupMenu->insertItem( MID_LANG_PARA_NONE, String( FwkResId( STR_LANGSTATUS_NONE )), 0, MID_LANG_PARA_NONE );
+ subPopupMenu->insertItem( MID_LANG_PARA_RESET, String( FwkResId( STR_RESET_TO_DEFAULT_LANGUAGE )), 0, MID_LANG_PARA_RESET );
+ subPopupMenu->insertItem( MID_LANG_PARA_MORE, String( FwkResId( STR_LANGSTATUS_MORE )), 0, MID_LANG_PARA_MORE );
// add last two entries to main menu
xPopupMenu->insertSeparator( MID_LANG_PARA_SEPERATOR );
- xPopupMenu->insertItem( MID_LANG_PARA_STRING, String( FwkResId( STR_SET_LANGUAGE_FOR_PARAGRAPH )), css::awt::MenuItemStyle::RADIOCHECK, MID_LANG_PARA_STRING );
+ xPopupMenu->insertItem( MID_LANG_PARA_STRING, String( FwkResId( STR_SET_LANGUAGE_FOR_PARAGRAPH )), 0, MID_LANG_PARA_STRING );
xPopupMenu->setPopupMenu( MID_LANG_PARA_STRING, subPopupMenu );
diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx
index 1d53314..171a797 100644
--- a/sw/source/ui/lingu/olmenu.cxx
+++ b/sw/source/ui/lingu/olmenu.cxx
@@ -314,8 +314,11 @@ void SwSpellPopup::fillLangPopupMenu(
}
pPopupMenu->InsertItem( nLangItemIdStart + MN_NONE_OFFSET, String(SW_RES( STR_LANGSTATUS_NONE )), MIB_RADIOCHECK );
- pPopupMenu->InsertItem( nLangItemIdStart + MN_RESET_OFFSET, String(SW_RES( STR_RESET_TO_DEFAULT_LANGUAGE )), MIB_RADIOCHECK );
- pPopupMenu->InsertItem( nLangItemIdStart + MN_MORE_OFFSET, String(SW_RES( STR_LANGSTATUS_MORE )), MIB_RADIOCHECK );
+ if ( aLanguageTable.GetString( LANGUAGE_NONE ) == aCurLang )
+ pPopupMenu->CheckItem( nLangItemIdStart + MN_NONE_OFFSET, sal_True );
+
+ pPopupMenu->InsertItem( nLangItemIdStart + MN_RESET_OFFSET, String(SW_RES( STR_RESET_TO_DEFAULT_LANGUAGE )), 0 );
+ pPopupMenu->InsertItem( nLangItemIdStart + MN_MORE_OFFSET, String(SW_RES( STR_LANGSTATUS_MORE )), 0 );
}
commit 4d6c1fb6d4688c4d949ea46f99c37141306527a6
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri May 25 10:27:30 2012 +0200
Removed documentation from type rdbs
Before gbuild'ification, solenv/inc/target.mk carefully produced two variants of
each type rdb, a plain one from calling idlc w/o -C and a *_doc variant from
calling idlc w/ -C ("generate complete type information, including
documentation"). After gbuild'ification, solenv/gbuild/UnoApiTarget.mk
unconditionally only produced "complete" type rdbs from calling idlc w/ -C.
It is unclear to me whether the old *_doc variants had actually been used for
anything (what got packaged into installation sets apparently were the plain,
slim variants; and autodoc apparently does not need the *_doc variants, either,
as it produces UNOIDL documentation directly from .idl files). It is also
unclear to me whether the gbuild switch to effectively package complete, fat
rdbs was deliberate or not. (The only client-visible change I see is that low-
level C/C++ typereg_reader_getDocumentation could now report something. The
reflective UNO services at com.sun.star.reflection would not offer access to the
documenation anyway, however.)
The benefit of no longer including documentation in the packaged type rdbs is
size; the URE types.rdb shrinks from 1.2 MiB to 819 KiB, and offapi.rdb shrinks
from 11 MiB to 6.5 MiB.
Change-Id: Ib278f74fc3b22169e00a09d778807f8cf58520c4
diff --git a/solenv/gbuild/UnoApiTarget.mk b/solenv/gbuild/UnoApiTarget.mk
index 42584ce..206bbb9 100644
--- a/solenv/gbuild/UnoApiTarget.mk
+++ b/solenv/gbuild/UnoApiTarget.mk
@@ -58,7 +58,7 @@ define gb_UnoApiPartTarget__command
RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),500,\
$(INCLUDE) \
-M $(basename $(call gb_UnoApiPartTarget_get_dep_target,$(dir $(2)))) \
- -O $(call gb_UnoApiPartTarget_get_target,$(dir $(2))) -verbose -C \
+ -O $(call gb_UnoApiPartTarget_get_target,$(dir $(2))) -verbose \
$(sort $(patsubst $(call gb_UnoApiPartTarget_get_target,%.urd),$(SRCDIR)/%.idl,$(3)))) && \
$(gb_UnoApiPartTarget_IDLCCOMMAND) @$${RESPONSEFILE} > /dev/null && \
rm -f $${RESPONSEFILE} && \
commit a4c74fe3348acee80093b206e7cce5aef558fcbf
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri May 25 09:25:19 2012 +0100
convert mpFidcls to a vector
Change-Id: I41d24c8d14a781e4100813ebce136d563f8c36b8
diff --git a/filter/inc/filter/msfilter/msdffimp.hxx b/filter/inc/filter/msfilter/msdffimp.hxx
index 3366a9c..ad2e55a 100644
--- a/filter/inc/filter/msfilter/msdffimp.hxx
+++ b/filter/inc/filter/msfilter/msdffimp.hxx
@@ -478,7 +478,7 @@ typedef std::map<sal_uInt32, sal_uInt32> OffsetMap;
sal_uInt32 mnCurMaxShapeId; // we need this information to
sal_uInt32 mnDrawingsSaved; // access the right drawing
sal_uInt32 mnIdClusters; // while only knowing the shapeid
- FIDCL* mpFidcls;
+ std::vector<FIDCL> maFidcls;
OffsetMap maDgOffsetTable; // array of fileoffsets
friend class DffPropertyReader;
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index c4a6bca..4c10530 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -3316,13 +3316,13 @@ void SvxMSDffManager::SetModel(SdrModel* pModel, long nApplicationScale)
sal_Bool SvxMSDffManager::SeekToShape( SvStream& rSt, void* /* pClientData */, sal_uInt32 nId ) const
{
sal_Bool bRet = sal_False;
- if ( mpFidcls )
+ if ( !maFidcls.empty() )
{
sal_uInt32 nMerk = rSt.Tell();
sal_uInt32 nShapeId, nSec = ( nId >> 10 ) - 1;
if ( nSec < mnIdClusters )
{
- OffsetMap::const_iterator it = maDgOffsetTable.find( mpFidcls[ nSec ].dgid );
+ OffsetMap::const_iterator it = maDgOffsetTable.find( maFidcls[ nSec ].dgid );
if ( it != maDgOffsetTable.end() )
{
sal_IntPtr nOfs = it->second;
@@ -5747,7 +5747,6 @@ SvxMSDffManager::SvxMSDffManager(SvStream& rStCtrl_,
nGroupShapeFlags(0), //ensure initialization here, as some corrupted
//files may yield to this being unitialized
maBaseURL( rBaseURL ),
- mpFidcls( NULL ),
rStCtrl( rStCtrl_ ),
pStData( pStData_ ),
pStData2( pStData2_ ),
@@ -5792,7 +5791,6 @@ SvxMSDffManager::SvxMSDffManager( SvStream& rStCtrl_, const String& rBaseURL )
nBLIPCount( USHRT_MAX ), // mit Error initialisieren, da wir erst pruefen,
nShapeCount( USHRT_MAX ), // ob Kontroll-Stream korrekte Daten enthaellt
maBaseURL( rBaseURL ),
- mpFidcls( NULL ),
rStCtrl( rStCtrl_ ),
pStData( 0 ),
pStData2( 0 ),
@@ -5810,7 +5808,6 @@ SvxMSDffManager::~SvxMSDffManager()
delete pShapeInfos;
delete pShapeOrders;
delete pFormModel;
- delete[] mpFidcls;
}
void SvxMSDffManager::InitSvxMSDffManager( sal_uInt32 nOffsDgg_, SvStream* pStData_, sal_uInt32 nOleConvFlags )
@@ -5884,17 +5881,11 @@ void SvxMSDffManager::GetFidclData( sal_uInt32 nOffsDggL )
"escher", "FIDCL list longer than remaining bytes, ppt or parser is wrong");
mnIdClusters = std::min(nMaxEntriesPossible, static_cast<sal_Size>(mnIdClusters));
- sal_Size nMaxEntriesAllocatable = SAL_MAX_UINT32 / sizeof(FIDCL);
- SAL_WARN_IF(nMaxEntriesAllocatable < mnIdClusters,
- "escher", "FIDCL list longer than can be allocated");
- mnIdClusters = std::min(nMaxEntriesAllocatable, static_cast<sal_Size>(mnIdClusters));
-
- mpFidcls = new FIDCL[ mnIdClusters ];
- memset(mpFidcls, 0, mnIdClusters * sizeof(FIDCL));
+ maFidcls.resize(mnIdClusters);
for (sal_uInt32 i = 0; i < mnIdClusters; ++i)
{
- rStCtrl >> mpFidcls[ i ].dgid
- >> mpFidcls[ i ].cspidCur;
+ rStCtrl >> maFidcls[ i ].dgid
+ >> maFidcls[ i ].cspidCur;
}
}
}
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 8e24fcf..dfe4400 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -1250,8 +1250,8 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
if ( rPersistEntry.nDrawingDgId != 0xffffffff )
{
sal_uInt32 nSec = ( rObjData.nShapeId >> 10 ) - 1;
- if ( mpFidcls && ( nSec < mnIdClusters ) )
- mpFidcls[ nSec ].dgid = rPersistEntry.nDrawingDgId; // insert the correct drawing id;
+ if ( !maFidcls.empty() && ( nSec < mnIdClusters ) )
+ maFidcls[ nSec ].dgid = rPersistEntry.nDrawingDgId; // insert the correct drawing id;
}
}
if ( GetPropertyValue( DFF_Prop_fNoFillHitTest ) & 0x10 )
commit 893d52d4eb6c1d32bc27906d67415289733bc1b9
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu May 24 17:18:46 2012 +0100
WaE: return value of fwrite unchecked
Change-Id: I83ecc3ef45eb411741db4b4ff20982bff1709d99
diff --git a/extensions/source/plugin/unx/npnapi.cxx b/extensions/source/plugin/unx/npnapi.cxx
index 3e41dd5..8a9ce45 100644
--- a/extensions/source/plugin/unx/npnapi.cxx
+++ b/extensions/source/plugin/unx/npnapi.cxx
@@ -871,7 +871,8 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
break;
case eNPP_Shutdown:
{
- write( wakeup_fd[1], "xxxx", 4 );
+ bool bSuccess = (4 == write(wakeup_fd[1], "xxxx", 4));
+ SAL_WARN_IF( !bSuccess, "extensions", "short write");
}
break;
default:
diff --git a/extensions/source/plugin/unx/npwrap.cxx b/extensions/source/plugin/unx/npwrap.cxx
index f6d00a2..514c92a 100644
--- a/extensions/source/plugin/unx/npwrap.cxx
+++ b/extensions/source/plugin/unx/npwrap.cxx
@@ -65,7 +65,8 @@ static long GlobalConnectionLostHdl( void* /*pInst*/, void* /*pArg*/ )
{
medDebug( 1, "pluginapp exiting due to connection lost\n" );
- write( wakeup_fd[1], "xxxx", 4 );
+ bool bSuccess = (4 == write(wakeup_fd[1], "xxxx", 4 ));
+ SAL_WARN_IF( !bSuccess, "extensions", "short write");
return 0;
}
@@ -111,7 +112,8 @@ extern "C"
IMPL_LINK( PluginConnector, NewMessageHdl, Mediator*, /*pMediator*/ )
{
medDebug( 1, "new message handler\n" );
- write( wakeup_fd[1], "cccc", 4 );
+ bool bSuccess = (4 == write(wakeup_fd[1], "cccc", 4));
+ SAL_WARN_IF( !bSuccess, "extensions", "short write");
return 0;
}
commit 40bde192b50482a990816d7c4ba24fc0d495144c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu May 24 16:37:17 2012 +0100
WaE: nPos potentially uninitialized with gcc 4.7.0
Change-Id: Ie02cf6154b7536a46cd3753c526f7c390e57a40e
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 04619eb..3f695bd 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -3563,7 +3563,7 @@ void PopupMenu::SelectEntry( sal_uInt16 nId )
{
if( nId != ITEMPOS_INVALID )
{
- size_t nPos;
+ size_t nPos = 0;
MenuItemData* pData = GetItemList()->GetData( nId, nPos );
if ( pData->pSubMenu )
ImplGetFloatingWindow()->ChangeHighlightItem( nPos, sal_True );
commit 6edf5b39343b16b4faed03e52accb55b0d0d3bee
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu May 24 16:36:54 2012 +0100
WaE: return value of fwrite unchecked
Change-Id: Ib3713290a7dcd4bbbb58232d144e35694653a4a5
diff --git a/rsc/source/tools/rsctools.cxx b/rsc/source/tools/rsctools.cxx
index 70ef441..bda03a4 100644
--- a/rsc/source/tools/rsctools.cxx
+++ b/rsc/source/tools/rsctools.cxx
@@ -145,20 +145,20 @@ sal_Bool Append(FILE * fDest, const rtl::OString &rTmpFile)
fclose( fSource );
return sal_False;
}
- else
- {
- char szBuf[ MAX_BUF ];
- int nItems;
- do //appemd
- {
- nItems = fread( szBuf, sizeof( char ), MAX_BUF, fSource );
- fwrite( szBuf, sizeof( char ), nItems, fDest );
- } while( MAX_BUF == nItems );
+ bool bSuccess = true;
+ char szBuf[ MAX_BUF ];
+ size_t nItems;
- fclose( fSource );
- };
- return sal_True;
+ do //appemd
+ {
+ nItems = fread( szBuf, 1, MAX_BUF, fSource );
+ bSuccess = (nItems == fwrite(szBuf, 1, nItems, fDest));
+ SAL_WARN_IF(!bSuccess, "rsc", "short write");
+ } while (MAX_BUF == nItems && bSuccess);
+
+ fclose( fSource );
+ return bSuccess;
}
sal_Bool Append(const rtl::OString &rOutputSrs, const rtl::OString &rTmpFile)
commit c8737c4b25cb5d9e23c37f1d7072941971b4d479
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu May 24 16:36:32 2012 +0100
WaE: pesky aliasing warning with gcc 4.7.0
Change-Id: I78675ba624cf657a246f7d1211bf5075189ac873
diff --git a/testtools/source/bridgetest/bridgetest.cxx b/testtools/source/bridgetest/bridgetest.cxx
index f6d63bb..940be00 100644
--- a/testtools/source/bridgetest/bridgetest.cxx
+++ b/testtools/source/bridgetest/bridgetest.cxx
@@ -1066,8 +1066,10 @@ uno_Sequence* cloneSequence(const uno_Sequence* val, const Type& type)
Type _tElem(pTdElem->pWeakRef);
for (int i = 0; i < val->nElements; i++)
{
+ sal_Int8 *pValBuf = (sal_Int8 *)(&val->elements + i * pTdElem->nSize);
+
uno_Sequence* seq = cloneSequence(
- *(uno_Sequence**) (&val->elements + i * pTdElem->nSize),
+ *(uno_Sequence**) (pValBuf),
_tElem);
*((uno_Sequence**) pBufCur) = seq;
pBufCur += pTdElem->nSize;
commit afe6d1c9026b52ced40ec7ec2975902dc65e3994
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu May 24 14:15:56 2012 +0100
check some bounds conditions
Change-Id: Iab2f715b37d9fae816723b84ee1116fd4aff9537
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 5b6c86c..c4a6bca 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -5884,6 +5884,11 @@ void SvxMSDffManager::GetFidclData( sal_uInt32 nOffsDggL )
"escher", "FIDCL list longer than remaining bytes, ppt or parser is wrong");
mnIdClusters = std::min(nMaxEntriesPossible, static_cast<sal_Size>(mnIdClusters));
+ sal_Size nMaxEntriesAllocatable = SAL_MAX_UINT32 / sizeof(FIDCL);
+ SAL_WARN_IF(nMaxEntriesAllocatable < mnIdClusters,
+ "escher", "FIDCL list longer than can be allocated");
+ mnIdClusters = std::min(nMaxEntriesAllocatable, static_cast<sal_Size>(mnIdClusters));
+
mpFidcls = new FIDCL[ mnIdClusters ];
memset(mpFidcls, 0, mnIdClusters * sizeof(FIDCL));
for (sal_uInt32 i = 0; i < mnIdClusters; ++i)
commit 9450686c76c7409632a43992724d2cffc5772cde
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu May 24 13:37:19 2012 +0100
tidy SvtDocInfoTable_Impl
Change-Id: Ic354fc145c75eb24aa010627467fae007cfbf024
diff --git a/svtools/source/contnr/templwin.cxx b/svtools/source/contnr/templwin.cxx
index 98cf194..aed37c9 100644
--- a/svtools/source/contnr/templwin.cxx
+++ b/svtools/source/contnr/templwin.cxx
@@ -600,8 +600,8 @@ rtl::OUString SvtDocInfoTable_Impl::GetString( long nId ) const
if ( RESARRAY_INDEX_NOTFOUND != nPos )
return ResStringArray::GetString( nPos );
- else
- return aEmptyString;
+
+ return rtl::OUString();
}
// class SvtFrameWindow_Impl ---------------------------------------------
diff --git a/svtools/source/contnr/templwin.hxx b/svtools/source/contnr/templwin.hxx
index d945cf7..f2dbf42 100644
--- a/svtools/source/contnr/templwin.hxx
+++ b/svtools/source/contnr/templwin.hxx
@@ -167,9 +167,6 @@ public:
class SvtDocInfoTable_Impl : public ResStringArray
{
-private:
- String aEmptyString;
-
public:
SvtDocInfoTable_Impl();
commit 656f4ed61975927178f453f3fbb34cc9e09579cc
Author: Jan Holesovsky <kendy at suse.cz>
Date: Fri May 25 10:02:26 2012 +0200
status bar: Get rid of STD/BLK/..., and introduce a menu for that instead.
Nobody know what these acronyms stay for; so instead use an icon, and a menu
that contains the full descrption. Tooltip now says what is active.
Change-Id: I21a67c5456c96081797c1cb88d2a980d161a1c0c
diff --git a/icon-themes/galaxy/svx/res/selection_10x22.png b/icon-themes/galaxy/svx/res/selection_10x22.png
new file mode 100644
index 0000000..6eb4edc
Binary files /dev/null and b/icon-themes/galaxy/svx/res/selection_10x22.png differ
diff --git a/svx/inc/svx/dialogs.hrc b/svx/inc/svx/dialogs.hrc
index 1790e81..0c56983 100644
--- a/svx/inc/svx/dialogs.hrc
+++ b/svx/inc/svx/dialogs.hrc
@@ -411,9 +411,8 @@
#define RID_SVXSTR_OVERWRITE_TEXT (RID_SVX_START + 212)
// Strings for the selection mode
-#define RID_SVXSTR_SELMODE_STD (RID_SVX_START + 213)
-#define RID_SVXSTR_SELMODE_ER (RID_SVX_START + 214)
-#define RID_SVXSTR_SELMODE_ERG (RID_SVX_START + 215)
+#define RID_SVXMENU_SELECTION (RID_SVX_START + 213)
+#define RID_SVXBMP_SELECTION (RID_SVX_START + 215)
#define RID_SVXSTR_XMLSEC_SIG_OK (RID_SVX_START + 222)
#define RID_SVXSTR_XMLSEC_SIG_OK_NO_VERIFY (RID_SVX_START + 223)
@@ -1050,7 +1049,6 @@
#define RID_SVXSTR_UNDO_APPLY_EXTRUSION_SURFACE (RID_SVX_START + 1133)
#define RID_SVXSTR_UNDO_APPLY_EXTRUSION_COLOR (RID_SVX_START + 1134)
-#define RID_SVXSTR_SELMODE_BLK (RID_SVX_START + 1167)
#define RID_SVXSTR_STYLEFAMILY_TABLEDESIGN (RID_SVX_START + 1168)
// if you add here, remember to adjust RID_SVXSTR_NEXTFREE
diff --git a/svx/inc/svx/selctrl.hxx b/svx/inc/svx/selctrl.hxx
index 42b30db..4a26bd9 100644
--- a/svx/inc/svx/selctrl.hxx
+++ b/svx/inc/svx/selctrl.hxx
@@ -28,34 +28,28 @@
#ifndef _SVX_SELCTRL_HXX
#define _SVX_SELCTRL_HXX
-// include ---------------------------------------------------------------
-
+#include <vcl/image.hxx>
#include <sfx2/stbitem.hxx>
-#include "svx/svxdllapi.h"
-
-// class SvxSelModeControl -----------------------------------------------
+#include <svx/svxdllapi.h>
+/// Status bar control that indicates or changes the selection mode (standard / block / etc.)
class SVX_DLLPUBLIC SvxSelectionModeControl : public SfxStatusBarControl
{
public:
- virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
- const SfxPoolItem* pState );
- virtual void Click();
- virtual void Paint( const UserDrawEvent& rEvt );
-
SFX_DECL_STATUSBAR_CONTROL();
SvxSelectionModeControl( sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar& rStb );
-private:
- sal_uInt16 nState;
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
+ const SfxPoolItem* pState );
+ virtual sal_Bool MouseButtonDown( const MouseEvent& rEvt );
+ virtual void Paint( const UserDrawEvent& rEvt );
-#ifdef _SVX_SELCTRL_CXX
- SVX_DLLPRIVATE void DrawItemText_Impl();
-#endif
+private:
+ sal_uInt16 mnState;
+ Image maImage;
};
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/stbctrls/selctrl.cxx b/svx/source/stbctrls/selctrl.cxx
index cb4af8b..eb74fff 100644
--- a/svx/source/stbctrls/selctrl.cxx
+++ b/svx/source/stbctrls/selctrl.cxx
@@ -26,31 +26,70 @@
*
************************************************************************/
-
-// include ---------------------------------------------------------------
#include <tools/shl.hxx>
+#include <vcl/menu.hxx>
#include <vcl/status.hxx>
#include <svl/intitem.hxx>
#include <sfx2/dispatch.hxx>
#include <tools/urlobj.hxx>
-#define _SVX_SELCTRL_CXX
-
-#include "svx/selctrl.hxx"
+#include <svx/selctrl.hxx>
#include <svx/dialmgr.hxx>
-
#include <svx/dialogs.hrc>
+#include "stbctrls.h"
+
SFX_IMPL_STATUSBAR_CONTROL(SvxSelectionModeControl, SfxUInt16Item);
+/// Popup menu to select the selection type
+class SelectionTypePopup : public PopupMenu
+{
+public:
+ SelectionTypePopup( sal_uInt16 nCurrent );
+};
+
+/// Item id's cannot start from 0, so we need to convert
+static sal_uInt16 id_to_state( sal_uInt16 nId )
+{
+ switch ( nId )
+ {
+ default: // fall through
+ case SELECTION_STANDARD: return 0;
+ case SELECTION_EXTENDED: return 1;
+ case SELECTION_ADDED: return 2;
+ case SELECTION_BLOCK: return 3;
+ }
+}
+
+/// Item id's cannot start from 0, so we need to convert
+static sal_uInt16 state_to_id( sal_uInt16 nState )
+{
+ switch ( nState )
+ {
+ default: // fall through
+ case 0: return SELECTION_STANDARD;
+ case 1: return SELECTION_EXTENDED;
+ case 2: return SELECTION_ADDED;
+ case 3: return SELECTION_BLOCK;
+ }
+}
+
+SelectionTypePopup::SelectionTypePopup( sal_uInt16 nCurrent )
+ : PopupMenu( ResId( RID_SVXMENU_SELECTION, DIALOG_MGR() ) )
+{
+ CheckItem( state_to_id( nCurrent ), true );
+}
+
// class SvxSelectionModeControl -----------------------------------------
SvxSelectionModeControl::SvxSelectionModeControl( sal_uInt16 _nSlotId,
sal_uInt16 _nId,
StatusBar& rStb ) :
SfxStatusBarControl( _nSlotId, _nId, rStb ),
- nState( 0 )
+ mnState( 0 ),
+ maImage( SVX_RES( RID_SVXBMP_SELECTION ) )
{
+ GetStatusBar().SetItemText( GetId(), String() );
}
// -----------------------------------------------------------------------
@@ -58,73 +97,63 @@ SvxSelectionModeControl::SvxSelectionModeControl( sal_uInt16 _nSlotId,
void SvxSelectionModeControl::StateChanged( sal_uInt16, SfxItemState eState,
const SfxPoolItem* pState )
{
- if ( SFX_ITEM_AVAILABLE != eState )
- GetStatusBar().SetItemText( GetId(), String() );
- else
+ if ( SFX_ITEM_AVAILABLE == eState )
{
DBG_ASSERT( pState->ISA( SfxUInt16Item ), "invalid item type" );
SfxUInt16Item* pItem = (SfxUInt16Item*)pState;
- nState = pItem->GetValue();
- DrawItemText_Impl();
+ mnState = pItem->GetValue();
+
+ SelectionTypePopup aPop( mnState );
+ GetStatusBar().SetQuickHelpText( GetId(), aPop.GetItemText( state_to_id( mnState ) ) );
}
}
// -----------------------------------------------------------------------
-void SvxSelectionModeControl::Click()
+sal_Bool SvxSelectionModeControl::MouseButtonDown( const MouseEvent& rEvt )
{
- if ( !GetStatusBar().GetItemText( GetId() ).Len() )
- return;
- nState++;
- if ( nState > 3 )
- nState = 0;
-
- ::com::sun::star::uno::Any a;
- SfxUInt16Item aState( GetSlotId(), nState );
- INetURLObject aObj( m_aCommandURL );
-
- ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aArgs( 1 );
- aArgs[0].Name = aObj.GetURLPath();
- aState.QueryValue( a );
- aArgs[0].Value = a;
-
- execute( aArgs );
-}
+ CaptureMouse();
+ SelectionTypePopup aPop( mnState );
+ StatusBar& rStatusbar = GetStatusBar();
-// -----------------------------------------------------------------------
+ if ( aPop.Execute( &rStatusbar, rEvt.GetPosPixel() ) )
+ {
+ sal_uInt16 nNewState = id_to_state( aPop.GetCurItemId() );
+ if ( nNewState != mnState )
+ {
+ mnState = nNewState;
+
+ ::com::sun::star::uno::Any a;
+ SfxUInt16Item aState( GetSlotId(), mnState );
+ INetURLObject aObj( m_aCommandURL );
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aArgs( 1 );
+ aArgs[0].Name = aObj.GetURLPath();
+ aState.QueryValue( a );
+ aArgs[0].Value = a;
+
+ execute( aArgs );
+ }
+ }
+ ReleaseMouse();
-void SvxSelectionModeControl::Paint( const UserDrawEvent& )
-{
- DrawItemText_Impl();
+ return sal_True;
}
// -----------------------------------------------------------------------
-void SvxSelectionModeControl::DrawItemText_Impl()
+void SvxSelectionModeControl::Paint( const UserDrawEvent& rUsrEvt )
{
- String sTxt;
- sal_uInt16 _nId = 0;
+ const Rectangle aControlRect = getControlRect();
+ OutputDevice* pDev = rUsrEvt.GetDevice();
+ Rectangle aRect = rUsrEvt.GetRect();
- switch ( nState )
- {
- case 0:
- _nId = RID_SVXSTR_SELMODE_STD;
- break;
- case 1:
- _nId = RID_SVXSTR_SELMODE_ER;
- break;
- case 2:
- _nId = RID_SVXSTR_SELMODE_ERG;
- break;
- case 3:
- _nId = RID_SVXSTR_SELMODE_BLK;
- break;
- default: OSL_FAIL( "invalid selection mode!" );
- }
+ Size aImgSize( maImage.GetSizePixel() );
+
+ Point aPos( aRect.Left() + ( aControlRect.GetWidth() - aImgSize.Width() ) / 2,
+ aRect.Top() + ( aControlRect.GetHeight() - aImgSize.Height() ) / 2 );
- if ( _nId )
- sTxt = SVX_RESSTR( _nId );
- GetStatusBar().SetItemText( GetId(), sTxt );
+ pDev->DrawImage( aPos, maImage );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/stbctrls/stbctrls.h b/svx/source/stbctrls/stbctrls.h
index 744082e..2877874 100644
--- a/svx/source/stbctrls/stbctrls.h
+++ b/svx/source/stbctrls/stbctrls.h
@@ -52,6 +52,11 @@
#define XMLSEC_CALL 1
+#define SELECTION_STANDARD 1
+#define SELECTION_EXTENDED 2
+#define SELECTION_ADDED 3
+#define SELECTION_BLOCK 4
+
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/stbctrls/stbctrls.src b/svx/source/stbctrls/stbctrls.src
index 0dc0843..e0f198a 100644
--- a/svx/source/stbctrls/stbctrls.src
+++ b/svx/source/stbctrls/stbctrls.src
@@ -43,26 +43,49 @@ String RID_SVXSTR_OVERWRITE_TEXT
Text [ x-comment ] = "To be shown in the status bar when in overwrite mode, please try to make it not longer than the word 'Overwrite'." ;
Text [ en-US ] = "Overwrite" ;
};
-String RID_SVXSTR_SELMODE_STD
-{
- // 'Standard' shortened to a maximum of 3 characters
- Text [ en-US ] = "STD" ;
-};
-String RID_SVXSTR_SELMODE_ER
-{
- // 'Extended' shortened to a maximum of 3 characters
- Text [ en-US ] = "EXT" ;
-};
-String RID_SVXSTR_SELMODE_ERG
+
+// Selection type menu
+Menu RID_SVXMENU_SELECTION
{
- // 'Added' shortened to a maximum of 3 characters
- Text [ en-US ] = "ADD" ;
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = SELECTION_STANDARD ;
+ //HelpId = ;
+ RadioCheck = TRUE ;
+ Text [ en-US ] = "Standard selection" ;
+ };
+ MenuItem
+ {
+ Identifier = SELECTION_EXTENDED ;
+ //HelpId = ;
+ RadioCheck = TRUE ;
+ Text [ en-US ] = "Extending selection" ;
+ };
+ MenuItem
+ {
+ Identifier = SELECTION_ADDED ;
+ //HelpId = ;
+ RadioCheck = TRUE ;
+ Text [ en-US ] = "Adding selection" ;
+ };
+ MenuItem
+ {
+ Identifier = SELECTION_BLOCK ;
+ //HelpId = ;
+ RadioCheck = TRUE ;
+ Text [ en-US ] = "Block selection" ;
+ };
+ };
};
-String RID_SVXSTR_SELMODE_BLK
+Image RID_SVXBMP_SELECTION
{
- // 'Block' shortened to max. 3 chararcters
- Text [ en-US ] = "BLK" ;
+ ImageBitmap = Bitmap
+ {
+ File = "selection_10x22.png" ;
+ };
};
String RID_SVXSTR_XMLSEC_SIG_OK
diff --git a/sw/uiconfig/sglobal/statusbar/statusbar.xml b/sw/uiconfig/sglobal/statusbar/statusbar.xml
index 87b3edd..e6c495f 100644
--- a/sw/uiconfig/sglobal/statusbar/statusbar.xml
+++ b/sw/uiconfig/sglobal/statusbar/statusbar.xml
@@ -5,7 +5,7 @@
<statusbar:statusbaritem xlink:href=".uno:PageStyleName" statusbar:align="left" statusbar:autosize="true" statusbar:width="79" statusbar:helpid="helpid:21182"/>
<statusbar:statusbaritem xlink:href=".uno:LanguageStatus" statusbar:align="center" statusbar:autosize="true" statusbar:width="100" />
<statusbar:statusbaritem xlink:href=".uno:InsertMode" statusbar:align="center" statusbar:width="55" statusbar:helpid="helpid:10221"/>
- <statusbar:statusbaritem xlink:href=".uno:SelectionMode" statusbar:align="center" statusbar:width="30" statusbar:helpid="helpid:21185"/>
+ <statusbar:statusbaritem xlink:href=".uno:SelectionMode" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="9" statusbar:helpid="helpid:21185"/>
<statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="9" statusbar:helpid="helpid:5584"/>
<statusbar:statusbaritem xlink:href=".uno:Signature" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="16" statusbar:helpid="helpid:5699"/>
<statusbar:statusbaritem xlink:href=".uno:Size" statusbar:align="left" statusbar:autosize="true" statusbar:ownerdraw="true" statusbar:width="110" statusbar:helpid="helpid:10224"/>
diff --git a/sw/uiconfig/sweb/statusbar/statusbar.xml b/sw/uiconfig/sweb/statusbar/statusbar.xml
index 3ad48ad..dbdf008 100644
--- a/sw/uiconfig/sweb/statusbar/statusbar.xml
+++ b/sw/uiconfig/sweb/statusbar/statusbar.xml
@@ -5,7 +5,7 @@
<statusbar:statusbaritem xlink:href=".uno:PageStyleName" statusbar:align="left" statusbar:autosize="true" statusbar:width="79" statusbar:helpid="helpid:21182"/>
<statusbar:statusbaritem xlink:href=".uno:LanguageStatus" statusbar:align="center" statusbar:autosize="true" statusbar:width="100" />
<statusbar:statusbaritem xlink:href=".uno:InsertMode" statusbar:align="center" statusbar:width="55" statusbar:helpid="helpid:10221"/>
- <statusbar:statusbaritem xlink:href=".uno:SelectionMode" statusbar:align="center" statusbar:width="30" statusbar:helpid="helpid:21185"/>
+ <statusbar:statusbaritem xlink:href=".uno:SelectionMode" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="9" statusbar:helpid="helpid:21185"/>
<statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="9" statusbar:helpid="helpid:5584"/>
<statusbar:statusbaritem xlink:href=".uno:Signature" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="16" statusbar:helpid="helpid:5699"/>
<statusbar:statusbaritem xlink:href=".uno:Size" statusbar:align="left" statusbar:autosize="true" statusbar:ownerdraw="true" statusbar:width="110" statusbar:helpid="helpid:10224"/>
diff --git a/sw/uiconfig/swform/statusbar/statusbar.xml b/sw/uiconfig/swform/statusbar/statusbar.xml
index 3ad48ad..dbdf008 100644
--- a/sw/uiconfig/swform/statusbar/statusbar.xml
+++ b/sw/uiconfig/swform/statusbar/statusbar.xml
@@ -5,7 +5,7 @@
<statusbar:statusbaritem xlink:href=".uno:PageStyleName" statusbar:align="left" statusbar:autosize="true" statusbar:width="79" statusbar:helpid="helpid:21182"/>
<statusbar:statusbaritem xlink:href=".uno:LanguageStatus" statusbar:align="center" statusbar:autosize="true" statusbar:width="100" />
<statusbar:statusbaritem xlink:href=".uno:InsertMode" statusbar:align="center" statusbar:width="55" statusbar:helpid="helpid:10221"/>
- <statusbar:statusbaritem xlink:href=".uno:SelectionMode" statusbar:align="center" statusbar:width="30" statusbar:helpid="helpid:21185"/>
+ <statusbar:statusbaritem xlink:href=".uno:SelectionMode" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="9" statusbar:helpid="helpid:21185"/>
<statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="9" statusbar:helpid="helpid:5584"/>
<statusbar:statusbaritem xlink:href=".uno:Signature" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="16" statusbar:helpid="helpid:5699"/>
<statusbar:statusbaritem xlink:href=".uno:Size" statusbar:align="left" statusbar:autosize="true" statusbar:ownerdraw="true" statusbar:width="110" statusbar:helpid="helpid:10224"/>
diff --git a/sw/uiconfig/swreport/statusbar/statusbar.xml b/sw/uiconfig/swreport/statusbar/statusbar.xml
index 3ad48ad..dbdf008 100644
--- a/sw/uiconfig/swreport/statusbar/statusbar.xml
+++ b/sw/uiconfig/swreport/statusbar/statusbar.xml
@@ -5,7 +5,7 @@
<statusbar:statusbaritem xlink:href=".uno:PageStyleName" statusbar:align="left" statusbar:autosize="true" statusbar:width="79" statusbar:helpid="helpid:21182"/>
<statusbar:statusbaritem xlink:href=".uno:LanguageStatus" statusbar:align="center" statusbar:autosize="true" statusbar:width="100" />
<statusbar:statusbaritem xlink:href=".uno:InsertMode" statusbar:align="center" statusbar:width="55" statusbar:helpid="helpid:10221"/>
- <statusbar:statusbaritem xlink:href=".uno:SelectionMode" statusbar:align="center" statusbar:width="30" statusbar:helpid="helpid:21185"/>
+ <statusbar:statusbaritem xlink:href=".uno:SelectionMode" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="9" statusbar:helpid="helpid:21185"/>
<statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="9" statusbar:helpid="helpid:5584"/>
<statusbar:statusbaritem xlink:href=".uno:Signature" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="16" statusbar:helpid="helpid:5699"/>
<statusbar:statusbaritem xlink:href=".uno:Size" statusbar:align="left" statusbar:autosize="true" statusbar:ownerdraw="true" statusbar:width="110" statusbar:helpid="helpid:10224"/>
diff --git a/sw/uiconfig/swriter/statusbar/statusbar.xml b/sw/uiconfig/swriter/statusbar/statusbar.xml
index d5e2271..0df1585 100644
--- a/sw/uiconfig/swriter/statusbar/statusbar.xml
+++ b/sw/uiconfig/swriter/statusbar/statusbar.xml
@@ -6,7 +6,7 @@
<statusbar:statusbaritem xlink:href=".uno:PageStyleName" statusbar:align="left" statusbar:autosize="true" statusbar:width="79" statusbar:helpid="helpid:21182"/>
<statusbar:statusbaritem xlink:href=".uno:LanguageStatus" statusbar:align="center" statusbar:autosize="true" statusbar:width="100" />
<statusbar:statusbaritem xlink:href=".uno:InsertMode" statusbar:align="center" statusbar:width="55" statusbar:helpid="helpid:10221"/>
- <statusbar:statusbaritem xlink:href=".uno:SelectionMode" statusbar:align="center" statusbar:width="30" statusbar:helpid="helpid:21185"/>
+ <statusbar:statusbaritem xlink:href=".uno:SelectionMode" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="9" statusbar:helpid="helpid:21185"/>
<statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="9" statusbar:helpid="helpid:5584"/>
<statusbar:statusbaritem xlink:href=".uno:Signature" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="16" statusbar:helpid="helpid:5699"/>
<statusbar:statusbaritem xlink:href=".uno:Size" statusbar:align="left" statusbar:autosize="true" statusbar:ownerdraw="true" statusbar:width="110" statusbar:helpid="helpid:10224"/>
diff --git a/sw/uiconfig/swxform/statusbar/statusbar.xml b/sw/uiconfig/swxform/statusbar/statusbar.xml
index 87b3edd..e6c495f 100644
--- a/sw/uiconfig/swxform/statusbar/statusbar.xml
+++ b/sw/uiconfig/swxform/statusbar/statusbar.xml
@@ -5,7 +5,7 @@
<statusbar:statusbaritem xlink:href=".uno:PageStyleName" statusbar:align="left" statusbar:autosize="true" statusbar:width="79" statusbar:helpid="helpid:21182"/>
<statusbar:statusbaritem xlink:href=".uno:LanguageStatus" statusbar:align="center" statusbar:autosize="true" statusbar:width="100" />
<statusbar:statusbaritem xlink:href=".uno:InsertMode" statusbar:align="center" statusbar:width="55" statusbar:helpid="helpid:10221"/>
- <statusbar:statusbaritem xlink:href=".uno:SelectionMode" statusbar:align="center" statusbar:width="30" statusbar:helpid="helpid:21185"/>
+ <statusbar:statusbaritem xlink:href=".uno:SelectionMode" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="9" statusbar:helpid="helpid:21185"/>
<statusbar:statusbaritem xlink:href=".uno:ModifiedStatus" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="9" statusbar:helpid="helpid:5584"/>
<statusbar:statusbaritem xlink:href=".uno:Signature" statusbar:align="center" statusbar:ownerdraw="true" statusbar:width="16" statusbar:helpid="helpid:5699"/>
<statusbar:statusbaritem xlink:href=".uno:Size" statusbar:align="left" statusbar:autosize="true" statusbar:ownerdraw="true" statusbar:width="110" statusbar:helpid="helpid:10224"/>
commit f183d4b873afc8ac36ee6bb3510969e4261f9732
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri May 25 10:01:15 2012 +0200
SwFlySaveArr: Apple GCC complains about constructors
diff --git a/sw/source/filter/rtf/swparrtf.hxx b/sw/source/filter/rtf/swparrtf.hxx
index ff9fa97..8d06a9c 100644
--- a/sw/source/filter/rtf/swparrtf.hxx
+++ b/sw/source/filter/rtf/swparrtf.hxx
@@ -149,8 +149,10 @@ struct SwListEntry
class SwFlySaveArr : public std::vector<SwFlySave*>
{
public:
- SwFlySaveArr() : vector() {}
- SwFlySaveArr(const SwFlySaveArr& other) : vector(other) {}
+ SwFlySaveArr() : ::std::vector<SwFlySave*>() {}
+ SwFlySaveArr(const SwFlySaveArr& rOther)
+ : ::std::vector<SwFlySave*>(rOther)
+ {}
~SwFlySaveArr()
{
commit 4aaa7e44f2bcbd5ce208d31ced37fafa805768c1
Author: Muhammad Haggag <mhaggag at gmail.com>
Date: Thu May 24 19:49:41 2012 +0200
Followup to fdo#34772: Add resource strings for word-count messages
Change-Id: I7b32f5b6ed973fd4ad4635a5265d75d4e51f04ba
diff --git a/sw/source/ui/app/app.src b/sw/source/ui/app/app.src
index 890e8b9..3dc412b 100644
--- a/sw/source/ui/app/app.src
+++ b/sw/source/ui/app/app.src
@@ -550,6 +550,16 @@ String STR_OUTLINE_NUMBERING
Text [ en-US ] = "Outline Numbering";
};
+String STR_STATUSBAR_WORDCOUNT_NO_SELECTION
+{
+ Text [ en-US ] = "Words: $1";
+};
+
+String STR_STATUSBAR_WORDCOUNT
+{
+ Text [ en-US ] = "Words: $1 Selected: $2";
+};
+
ToolBox RID_MODULE_TOOLBOX
{
HelpID = HID_MODULE_TOOLBOX ;
diff --git a/sw/source/ui/inc/app.hrc b/sw/source/ui/inc/app.hrc
index 5de0537..95356a5 100644
--- a/sw/source/ui/inc/app.hrc
+++ b/sw/source/ui/inc/app.hrc
@@ -125,7 +125,11 @@
#define STR_FDLG_STYLE (RC_APP_BEGIN + 106)
//<-end,zhaojianwei
-#define APP_ACT_END STR_FDLG_STYLE
+// Status bar strings
+#define STR_STATUSBAR_WORDCOUNT_NO_SELECTION (RC_APP_BEGIN + 110)
+#define STR_STATUSBAR_WORDCOUNT (RC_APP_BEGIN + 111)
+
+#define APP_ACT_END STR_STATUSBAR_WORDCOUNT
#if APP_ACT_END > RC_APP_END
#error Resource-Id Ueberlauf in #file, #line
diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx
index 9292185..58b5ce4 100644
--- a/sw/source/ui/uiview/view2.cxx
+++ b/sw/source/ui/uiview/view2.cxx
@@ -1210,10 +1210,15 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
documentStats = rShell.GetUpdatedDocStat();
rShell.EndAction();
}
- rSet.Put(SfxStringItem(FN_STAT_WORDCOUNT, rtl::OUStringBuffer("Words: ")
- .append(rtl::OUString::valueOf(static_cast<sal_Int64>(selectionStats.nWord)))
- .append('/')
- .append(rtl::OUString::valueOf(static_cast<sal_Int64>(documentStats.nWord))).makeStringAndClear()));
+
+ const sal_uInt32 stringId = selectionStats.nWord? STR_STATUSBAR_WORDCOUNT : STR_STATUSBAR_WORDCOUNT_NO_SELECTION;
+ rtl::OUString wordCount(SW_RES(stringId));
+ wordCount = wordCount.replaceAll("$1", rtl::OUString::valueOf(static_cast<sal_Int64>(documentStats.nWord)));
+ if (selectionStats.nWord)
+ {
+ wordCount = wordCount.replaceAll("$2", rtl::OUString::valueOf(static_cast<sal_Int64>(selectionStats.nWord)));
+ }
+ rSet.Put(SfxStringItem(FN_STAT_WORDCOUNT, wordCount));
}
break;
commit 9dd22f63a5477f3eafcda799d066f7b4057d3953
Author: Muhammad Haggag <mhaggag at gmail.com>
Date: Tue May 22 16:59:37 2012 +0200
fdo#34772 Add word count to the status bar in writer
This change adds a new status bar control,
"SwWordCountStatusBarControl". The control shows the number of words
selected as well as the number of words in the whole
document. Double-clicking the control launches the modeless word count
dialog.
Change-Id: I756183ab1aaf4d059e782dfb05508370178cfbe3
diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk
index 45975a0..1ddc142 100644
--- a/sw/Library_sw.mk
+++ b/sw/Library_sw.mk
@@ -708,6 +708,7 @@ $(eval $(call gb_Library_add_exception_objects,sw,\
sw/source/ui/utlui/uitool \
sw/source/ui/utlui/unotools \
sw/source/ui/utlui/viewlayoutctrl \
+ sw/source/ui/utlui/wordcountctrl \
sw/source/ui/utlui/zoomctrl \
sw/source/ui/web/wdocsh \
sw/source/ui/web/wformsh \
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index 7802db7..ca5a872 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -1165,6 +1165,7 @@ included in c-context files, so c++ style stuff will cause problems.
#define FN_STAT_SELMODE (FN_STAT + 5)
#define FN_STAT_CONTEXT (FN_STAT + 7)
#define FN_STAT_BOOKMARK (FN_STAT + 8) /* For Popup Bookmarks*/
+#define FN_STAT_WORDCOUNT (FN_STAT + 9)
/*--------------------------------------------------------------------
Region: Page preview
diff --git a/sw/sdi/_viewsh.sdi b/sw/sdi/_viewsh.sdi
index a17fbb8..d4486af 100644
--- a/sw/sdi/_viewsh.sdi
+++ b/sw/sdi/_viewsh.sdi
@@ -317,6 +317,11 @@ interface BaseTextEditView
ExecMethod = ExecuteStatusLine ;
StateMethod = StateStatusLine ;
]
+ FN_STAT_WORDCOUNT // status()
+ [
+ ExecMethod = ExecuteStatusLine ;
+ StateMethod = StateStatusLine ;
+ ]
FN_STAT_BOOKMARK // status()
[
ExecMethod = ExecuteStatusLine ;
diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi
index edb7809..89e1530 100644
--- a/sw/sdi/swriter.sdi
+++ b/sw/sdi/swriter.sdi
@@ -8027,6 +8027,31 @@ SfxStringItem StateZoom FN_STAT_ZOOM
]
//--------------------------------------------------------------------------
+SfxStringItem StateWordCount FN_STAT_WORDCOUNT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = TRUE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
SfxBoolItem SubScript FN_SET_SUB_SCRIPT
[
diff --git a/sw/sdi/viewsh.sdi b/sw/sdi/viewsh.sdi
index 1005c96..d5d8380 100644
--- a/sw/sdi/viewsh.sdi
+++ b/sw/sdi/viewsh.sdi
@@ -275,8 +275,8 @@ interface TextPrintPreview
[
StateMethod = StateUndo ;
]
- //---------------------------------------------------------------------
- //Ab hier Statusleiste
+ //---------------------------------------------------------------------
+ // Begin StatusBar
FN_STAT_ZOOM // status()
[
ExecMethod = Execute ;
@@ -307,13 +307,18 @@ interface TextPrintPreview
ExecMethod = Execute ;
StateMethod = GetState ;
]
- SID_ATTR_ZOOMSLIDER // status()
- [
- ExecMethod = Execute ;
- StateMethod = GetState ;
- ]
- //----------------------------------------------
- //End mit Statusleiste
+ SID_ATTR_ZOOMSLIDER // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ FN_STAT_WORDCOUNT // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ //----------------------------------------------
+ // End StatusBar
}
//=========================================================================
diff --git a/sw/source/ui/app/swmodule.cxx b/sw/source/ui/app/swmodule.cxx
index 03bb5a2..4c97524 100644
--- a/sw/source/ui/app/swmodule.cxx
+++ b/sw/source/ui/app/swmodule.cxx
@@ -107,6 +107,7 @@
#include <svx/zoomsliderctrl.hxx>
#include <tblctrl.hxx>
#include <zoomctrl.hxx>
+#include <wordcountctrl.hxx>
#include <workctrl.hxx>
#include <tbxanchr.hxx>
#include <fldwrap.hxx>
@@ -372,6 +373,7 @@ void SwDLL::RegisterControls()
SvxInsertStatusBarControl::RegisterControl(SID_ATTR_INSERT, pMod );
SvxSelectionModeControl::RegisterControl(FN_STAT_SELMODE, pMod );
XmlSecStatusBarControl::RegisterControl( SID_SIGNATURE, pMod );
+ SwWordCountStatusBarControl::RegisterControl(FN_STAT_WORDCOUNT, pMod);
SwBookmarkControl::RegisterControl(FN_STAT_PAGE, pMod );
SwTemplateControl::RegisterControl(FN_STAT_TEMPLATE, pMod );
diff --git a/sw/source/ui/inc/wordcountctrl.hxx b/sw/source/ui/inc/wordcountctrl.hxx
new file mode 100644
index 0000000..d62652f
--- /dev/null
+++ b/sw/source/ui/inc/wordcountctrl.hxx
@@ -0,0 +1,32 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Copyright 2012 LibreOffice contributors.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+#ifndef _WORDCOUNTCTRL_HXX
+#define _WORDCOUNTCTRL_HXX
+
+#include <sfx2/stbitem.hxx>
+
+/**
+Word count status bar control for Writer.
+
+ at remarks This is a simple status bar control of type SfxStringItem, and it has no custom
+logic whatsoever. The actual updating of the word count string happens in
+SwView::StateStatusLine (see sw/source/ui/uiview/view2.cxx).
+*/
+class SwWordCountStatusBarControl : public SfxStatusBarControl
+{
+public:
+ SFX_DECL_STATUSBAR_CONTROL();
+
+ SwWordCountStatusBarControl(sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar& rStb);
+ ~SwWordCountStatusBarControl();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx
index febc076..9292185 100644
--- a/sw/source/ui/uiview/view2.cxx
+++ b/sw/source/ui/uiview/view2.cxx
@@ -140,6 +140,7 @@
#include <fmthdft.hxx>
#include <svx/ofaitem.hxx>
#include <unomid.h>
+#include <docstat.hxx>
const char sStatusDelim[] = " : ";
const char sStatusComma[] = " , ";//#outlinelevel, define a Variable for "," add by zhaojianwei
@@ -1197,6 +1198,25 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
}
}
break;
+
+ case FN_STAT_WORDCOUNT:
+ {
+ SwDocStat selectionStats;
+ SwDocStat documentStats;
+ {
+ SwWait aWait( *GetDocShell(), sal_True );
+ rShell.StartAction();
+ rShell.CountWords(selectionStats);
+ documentStats = rShell.GetUpdatedDocStat();
+ rShell.EndAction();
+ }
+ rSet.Put(SfxStringItem(FN_STAT_WORDCOUNT, rtl::OUStringBuffer("Words: ")
+ .append(rtl::OUString::valueOf(static_cast<sal_Int64>(selectionStats.nWord)))
+ .append('/')
+ .append(rtl::OUString::valueOf(static_cast<sal_Int64>(documentStats.nWord))).makeStringAndClear()));
+ }
+ break;
+
case FN_STAT_TEMPLATE:
{
rSet.Put(SfxStringItem( FN_STAT_TEMPLATE,
@@ -1471,6 +1491,13 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
}
break;
+ case FN_STAT_WORDCOUNT:
+ {
+ GetViewFrame()->GetDispatcher()->Execute(FN_WORDCOUNT_DIALOG,
+ SFX_CALLMODE_SYNCHRON|SFX_CALLMODE_RECORD );
+ }
+ break;
+
case FN_STAT_BOOKMARK:
if ( pArgs )
{
diff --git a/sw/source/ui/utlui/wordcountctrl.cxx b/sw/source/ui/utlui/wordcountctrl.cxx
new file mode 100644
index 0000000..a0146d0
--- /dev/null
+++ b/sw/source/ui/utlui/wordcountctrl.cxx
@@ -0,0 +1,26 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Copyright 2012 LibreOffice contributors.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+#include "wordcountctrl.hxx"
+#include <svl/stritem.hxx>
+
+SFX_IMPL_STATUSBAR_CONTROL(SwWordCountStatusBarControl, SfxStringItem);
+
+SwWordCountStatusBarControl::SwWordCountStatusBarControl(
+ sal_uInt16 _nSlotId,
+ sal_uInt16 _nId,
+ StatusBar& rStb) :
+ SfxStatusBarControl(_nSlotId, _nId, rStb)
+{
+}
+
+SwWordCountStatusBarControl::~SwWordCountStatusBarControl()
+{
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/uiconfig/swriter/statusbar/statusbar.xml b/sw/uiconfig/swriter/statusbar/statusbar.xml
index 87b3edd..d5e2271 100644
--- a/sw/uiconfig/swriter/statusbar/statusbar.xml
+++ b/sw/uiconfig/swriter/statusbar/statusbar.xml
@@ -2,6 +2,7 @@
<!DOCTYPE statusbar:statusbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "statusbar.dtd">
<statusbar:statusbar xmlns:statusbar="http://openoffice.org/2001/statusbar" xmlns:xlink="http://www.w3.org/1999/xlink">
<statusbar:statusbaritem xlink:href=".uno:StatePageNumber" statusbar:align="left" statusbar:autosize="true" statusbar:width="54" statusbar:helpid="helpid:21181"/>
+ <statusbar:statusbaritem xlink:href=".uno:StateWordCount" statusbar:align="left" statusbar:autosize="true" statusbar:helpid="helpid:21184"/>
<statusbar:statusbaritem xlink:href=".uno:PageStyleName" statusbar:align="left" statusbar:autosize="true" statusbar:width="79" statusbar:helpid="helpid:21182"/>
<statusbar:statusbaritem xlink:href=".uno:LanguageStatus" statusbar:align="center" statusbar:autosize="true" statusbar:width="100" />
<statusbar:statusbaritem xlink:href=".uno:InsertMode" statusbar:align="center" statusbar:width="55" statusbar:helpid="helpid:10221"/>
commit 73f9b02e11bc162d6e2c96bbdbb275d79d82b5b8
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Fri May 25 02:12:59 2012 -0400
Accidentally committed this...
Change-Id: I0335111dd30850db435d728ddcc6b4554eea6f5b
diff --git a/filter/type-detection-debug.diff b/filter/type-detection-debug.diff
deleted file mode 100644
index 84fc5dc..0000000
--- a/filter/type-detection-debug.diff
+++ /dev/null
@@ -1,135 +0,0 @@
-diff --git a/filter/source/config/cache/typedetection.cxx b/filter/source/config/cache/typedetection.cxx
-index cac9b14..f24198b 100644
---- a/filter/source/config/cache/typedetection.cxx
-+++ b/filter/source/config/cache/typedetection.cxx
-@@ -43,6 +43,49 @@
- #include <tools/urlobj.hxx>
- #include <unotools/localfilehelper.hxx>
-
-+
-+#include <stdio.h>
-+#include <string>
-+#include <sys/time.h>
-+
-+namespace {
-+
-+class stack_printer
-+{
-+public:
-+ explicit stack_printer(const char* msg) :
-+ msMsg(msg)
-+ {
-+ fprintf(stdout, "%s: --begin\n", msMsg.c_str());
-+ mfStartTime = getTime();
-+ }
-+
-+ ~stack_printer()
-+ {
-+ double fEndTime = getTime();
-+ fprintf(stdout, "%s: --end (duration: %g sec)\n", msMsg.c_str(), (fEndTime-mfStartTime));
-+ }
-+
-+ void printTime(int line) const
-+ {
-+ double fEndTime = getTime();
-+ fprintf(stdout, "%s: --(%d) (duration: %g sec)\n", msMsg.c_str(), line, (fEndTime-mfStartTime));
-+ }
-+
-+private:
-+ double getTime() const
-+ {
-+ timeval tv;
-+ gettimeofday(&tv, NULL);
-+ return tv.tv_sec + tv.tv_usec / 1000000.0;
-+ }
-+
-+ ::std::string msMsg;
-+ double mfStartTime;
-+};
-+
-+}
-+
- //_______________________________________________
- // namespace
-
-@@ -108,6 +151,21 @@ TypeDetection::~TypeDetection()
-
- namespace {
-
-+void print(const FlatDetection& rFD, const char* msg)
-+{
-+ fprintf(stdout, "--- %s\n", msg);
-+ FlatDetection::const_iterator i = rFD.begin(), iend = rFD.end();
-+ for (; i != iend; ++i)
-+ {
-+ const FlatDetectionInfo& r = *i;
-+ fprintf(stdout, " * type = '%s' match by extension = %d match by pattern = %d pre-selected as type = %d pre-selected as filter = %d pre-selected as doc service = %d\n",
-+ rtl::OUStringToOString(r.sType, RTL_TEXTENCODING_UTF8).getStr(),
-+ r.bMatchByExtension, r.bMatchByPattern, r.bPreselectedAsType,
-+ r.bPreselectedByFilter, r.bPreselectedByDocumentService);
-+ }
-+ fprintf(stdout, "---\n");
-+}
-+
- /**
- * Types with matching extension come first, then types that are supported
- * by the document service come next.
-@@ -129,6 +187,7 @@ struct SortByPriority : public std::binary_function<FlatDetectionInfo, FlatDetec
- sal_Bool bAllowDeep )
- throw (css::uno::RuntimeException)
- {
-+ stack_printer __stack_printer__("filter/config/TypeDetection::queryTypeByDescriptor");
- // make the descriptor more useable :-)
- ::comphelper::MediaDescriptor stlDescriptor(lDescriptor);
-
-@@ -164,16 +223,21 @@ struct SortByPriority : public std::binary_function<FlatDetectionInfo, FlatDetec
- FlatDetection lFlatTypes;
- impl_getPreselection(aURL, stlDescriptor, lFlatTypes);
-
-+ print(lFlatTypes, "pre-selection");
-+
- //*******************************************
- // get all types, which match to the given descriptor
- // That can be true by: extensions/url pattern/mime type etcpp.
- m_rCache->detectFlatForURL(aURL, lFlatTypes);
-
-+ print(lFlatTypes, "flat by url");
-+
- aLock.clear();
- // <- SAFE ----------------------------------
-
- // Properly prioritize all candidate types.
- lFlatTypes.sort(SortByPriority());
-+ print(lFlatTypes, "sorted by priority");
-
- ::rtl::OUString sType ;
- ::rtl::OUString sLastChance;
-@@ -190,8 +254,16 @@ struct SortByPriority : public std::binary_function<FlatDetectionInfo, FlatDetec
- // stream failed by e.g. an IO exception ...
- OUStringList lUsedDetectors;
- if (lFlatTypes.size()>0)
-+ {
- sType = impl_detectTypeFlatAndDeep(stlDescriptor, lFlatTypes, bAllowDeep, lUsedDetectors, sLastChance);
-
-+ {
-+ rtl::OUString aFilter = stlDescriptor.getUnpackedValueOrDefault(comphelper::MediaDescriptor::PROP_FILTERNAME(), rtl::OUString());
-+ fprintf(stdout, "TypeDetection::queryTypeByDescriptor: filter = '%s' type = '%s' (flat and deep)\n",
-+ rtl::OUStringToOString(aFilter, RTL_TEXTENCODING_UTF8).getStr(), rtl::OUStringToOString(sType, RTL_TEXTENCODING_UTF8).getStr());
-+ }
-+ }
-+
- //*******************************************
- // if no flat detected (nor preselected!) type could be
- // verified and no error occurred during creation of
-@@ -203,6 +275,11 @@ struct SortByPriority : public std::binary_function<FlatDetectionInfo, FlatDetec
- )
- {
- sType = impl_detectTypeDeepOnly(stlDescriptor, lUsedDetectors);
-+ {
-+ rtl::OUString aFilter = stlDescriptor.getUnpackedValueOrDefault(comphelper::MediaDescriptor::PROP_FILTERNAME(), rtl::OUString());
-+ fprintf(stdout, "TypeDetection::queryTypeByDescriptor: filter = '%s' type = '%s' (deep only)\n",
-+ rtl::OUStringToOString(aFilter, RTL_TEXTENCODING_UTF8).getStr(), rtl::OUStringToOString(sType, RTL_TEXTENCODING_UTF8).getStr());
-+ }
- }
-
- //*******************************************
commit 41eae1bde5940690741ca35bba61c2c0f6d8f99f
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Fri May 25 01:39:52 2012 -0400
Removed writer_Text type; combined it with generic_Text.
Change-Id: Id7d5744af4800ef5ac6bd70b97f79a76299a2e6b
diff --git a/filter/Configuration_filter.mk b/filter/Configuration_filter.mk
index a41e421..149be2a 100644
--- a/filter/Configuration_filter.mk
+++ b/filter/Configuration_filter.mk
@@ -427,7 +427,6 @@ $(call filter_Configuration_add_ui_filters,fcfg_langpack,filter/source/config/fr
# fcfg_global
$(call filter_Configuration_add_types,fcfg_langpack,fcfg_global_types.xcu,filter/source/config/fragments/types,\
generic_Text \
- writer_Text \
writer_StarOffice_XML_Writer \
writer_globaldocument_StarOffice_XML_Writer_GlobalDocument \
pdf_Portable_Document_Format \
diff --git a/filter/qa/complex/filter/detection/typeDetection/files.csv b/filter/qa/complex/filter/detection/typeDetection/files.csv
index 362335d..9a3cb3b 100644
--- a/filter/qa/complex/filter/detection/typeDetection/files.csv
+++ b/filter/qa/complex/filter/detection/typeDetection/files.csv
@@ -46,7 +46,7 @@ csv2;Writer/Text_CSV.txt;writer_Text_encoded:generic_Text;writer_Text_encoded:ge
###################################
# C A L C D O C U M E N T S
##################################
-csv1;Calc/Text_CSV.csv;generic_Text;writer_Text_encoded:writer_Text
+csv1;Calc/Text_CSV.csv;generic_Text;writer_Text_encoded:generic_Text
Calc1;Calc/Calc1.SDC;calc_StarCalc_10;calc_StarCalc_10
Calc2_document;Calc/Calc3.SDC;calc_StarCalc_30_VorlageTemplate;calc_StarCalc_30
Calc2_template;Calc/Calc3.vor;calc_StarCalc_30;calc_StarCalc_30
diff --git a/filter/qa/complex/filter/detection/typeDetection/preselectedFilter.csv b/filter/qa/complex/filter/detection/typeDetection/preselectedFilter.csv
index 827e1ee..c7055a2 100644
--- a/filter/qa/complex/filter/detection/typeDetection/preselectedFilter.csv
+++ b/filter/qa/complex/filter/detection/typeDetection/preselectedFilter.csv
@@ -1,6 +1,6 @@
fileAlias;FilterName;FilterOptions;FilterData;expectedFileType
-text1;%SO6productname %SO6formatversion Textdokument;;;writer_Text_encoded:writer_Text
-csv1;%SO6productname %SO6formatversion Textdokument;;;writer_Text_encoded:writer_Text
+text1;%SO6productname %SO6formatversion Textdokument;;;writer_Text_encoded:generic_Text
+csv1;%SO6productname %SO6formatversion Textdokument;;;writer_Text_encoded:generic_Text
csv1;Text - txt - csv (StarCalc);;;generic_Text
-csv2;%SO6productname %SO6formatversion Textdokument;;;writer_Text_encoded:writer_Text
+csv2;%SO6productname %SO6formatversion Textdokument;;;writer_Text_encoded:generic_Text
csv2;Text - txt - csv (StarCalc);;;generic_Text
diff --git a/filter/qa/complex/filter/detection/typeDetection/preselectedType.csv b/filter/qa/complex/filter/detection/typeDetection/preselectedType.csv
index 0d879de..ff8f090 100644
--- a/filter/qa/complex/filter/detection/typeDetection/preselectedType.csv
+++ b/filter/qa/complex/filter/detection/typeDetection/preselectedType.csv
@@ -1,6 +1,6 @@
fileAlias;preselectFileType;expectFileType
-csv1;writer_Text;writer_Text_encoded:writer_Text
+csv1;generic_Text;writer_Text_encoded:generic_Text
csv1;generic_Text;generic_Text
#csv2;writer_Text_encoded
#csv2;generic_Text
-text1;writer_Text_encoded;writer_Text_encoded:writer_Text
+text1;writer_Text_encoded;writer_Text_encoded:generic_Text
diff --git a/sc/source/ui/vba/vbaworkbooks.cxx b/sc/source/ui/vba/vbaworkbooks.cxx
index eb2dd68..00461b1 100644
--- a/sc/source/ui/vba/vbaworkbooks.cxx
+++ b/sc/source/ui/vba/vbaworkbooks.cxx
@@ -194,8 +194,7 @@ ScVbaWorkbooks::isTextFile( const rtl::OUString& sType )
// b) a csv file
// c) unknown
// returning true basically means treat this like a csv file
- const static rtl::OUString txtType( RTL_CONSTASCII_USTRINGPARAM("writer_Text" ) );
- const static rtl::OUString csvType("generic_Text");
+ const static rtl::OUString txtType("generic_Text");
const static rtl::OUString encodedTxtType( RTL_CONSTASCII_USTRINGPARAM("writer_Text_encoded" ) );
return sType.equals( txtType ) || sType.isEmpty() || sType.equals( encodedTxtType );
}
commit 65434e2f13ea6e3910e987b427ad7d22b7f586b2
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Fri May 25 01:18:42 2012 -0400
Renamed calc_Text_text_csv_StarCalc type to generic_Text.
Change-Id: Ica6aef56733c7c71568e37166a2f78d6aa05a118
diff --git a/filter/Configuration_filter.mk b/filter/Configuration_filter.mk
index 149be2a..a41e421 100644
--- a/filter/Configuration_filter.mk
+++ b/filter/Configuration_filter.mk
@@ -427,6 +427,7 @@ $(call filter_Configuration_add_ui_filters,fcfg_langpack,filter/source/config/fr
# fcfg_global
$(call filter_Configuration_add_types,fcfg_langpack,fcfg_global_types.xcu,filter/source/config/fragments/types,\
generic_Text \
+ writer_Text \
writer_StarOffice_XML_Writer \
writer_globaldocument_StarOffice_XML_Writer_GlobalDocument \
pdf_Portable_Document_Format \
diff --git a/filter/qa/complex/filter/detection/typeDetection/files.csv b/filter/qa/complex/filter/detection/typeDetection/files.csv
index 9a3cb3b..362335d 100644
--- a/filter/qa/complex/filter/detection/typeDetection/files.csv
+++ b/filter/qa/complex/filter/detection/typeDetection/files.csv
@@ -46,7 +46,7 @@ csv2;Writer/Text_CSV.txt;writer_Text_encoded:generic_Text;writer_Text_encoded:ge
###################################
# C A L C D O C U M E N T S
##################################
-csv1;Calc/Text_CSV.csv;generic_Text;writer_Text_encoded:generic_Text
+csv1;Calc/Text_CSV.csv;generic_Text;writer_Text_encoded:writer_Text
Calc1;Calc/Calc1.SDC;calc_StarCalc_10;calc_StarCalc_10
Calc2_document;Calc/Calc3.SDC;calc_StarCalc_30_VorlageTemplate;calc_StarCalc_30
Calc2_template;Calc/Calc3.vor;calc_StarCalc_30;calc_StarCalc_30
diff --git a/filter/qa/complex/filter/detection/typeDetection/preselectedFilter.csv b/filter/qa/complex/filter/detection/typeDetection/preselectedFilter.csv
index c7055a2..827e1ee 100644
--- a/filter/qa/complex/filter/detection/typeDetection/preselectedFilter.csv
+++ b/filter/qa/complex/filter/detection/typeDetection/preselectedFilter.csv
@@ -1,6 +1,6 @@
fileAlias;FilterName;FilterOptions;FilterData;expectedFileType
-text1;%SO6productname %SO6formatversion Textdokument;;;writer_Text_encoded:generic_Text
-csv1;%SO6productname %SO6formatversion Textdokument;;;writer_Text_encoded:generic_Text
+text1;%SO6productname %SO6formatversion Textdokument;;;writer_Text_encoded:writer_Text
+csv1;%SO6productname %SO6formatversion Textdokument;;;writer_Text_encoded:writer_Text
csv1;Text - txt - csv (StarCalc);;;generic_Text
-csv2;%SO6productname %SO6formatversion Textdokument;;;writer_Text_encoded:generic_Text
+csv2;%SO6productname %SO6formatversion Textdokument;;;writer_Text_encoded:writer_Text
csv2;Text - txt - csv (StarCalc);;;generic_Text
diff --git a/filter/qa/complex/filter/detection/typeDetection/preselectedType.csv b/filter/qa/complex/filter/detection/typeDetection/preselectedType.csv
index ec6a6d8..0d879de 100644
--- a/filter/qa/complex/filter/detection/typeDetection/preselectedType.csv
+++ b/filter/qa/complex/filter/detection/typeDetection/preselectedType.csv
@@ -1,6 +1,6 @@
fileAlias;preselectFileType;expectFileType
-csv1;generic_Text;writer_Text_encoded:generic_Text
+csv1;writer_Text;writer_Text_encoded:writer_Text
csv1;generic_Text;generic_Text
#csv2;writer_Text_encoded
#csv2;generic_Text
-text1;writer_Text_encoded;writer_Text_encoded:generic_Text
\ No newline at end of file
+text1;writer_Text_encoded;writer_Text_encoded:writer_Text
diff --git a/filter/source/config/fragments/types/generic_Text.xcu b/filter/source/config/fragments/types/generic_Text.xcu
index bc003d0..de25022 100644
--- a/filter/source/config/fragments/types/generic_Text.xcu
+++ b/filter/source/config/fragments/types/generic_Text.xcu
@@ -1,4 +1,4 @@
- <node oor:name="calc_Text_txt_csv_StarCalc" oor:op="replace" >
+ <node oor:name="generic_Text" oor:op="replace" >
<prop oor:name="DetectService"><value>com.sun.star.comp.filters.PlainTextFilterDetect</value></prop>
<prop oor:name="URLPattern"/>
<prop oor:name="Extensions"><value>csv txt</value></prop>
diff --git a/filter/source/textfilterdetect/filterdetect.cxx b/filter/source/textfilterdetect/filterdetect.cxx
index 9cb9405..7dd2ddd 100644
--- a/filter/source/textfilterdetect/filterdetect.cxx
+++ b/filter/source/textfilterdetect/filterdetect.cxx
@@ -88,7 +88,7 @@ rtl::OUString SAL_CALL PlainTextFilterDetect::detect(uno::Sequence<beans::Proper
}
}
- if (aType == "calc_Text_txt_csv_StarCalc")
+ if (aType == "generic_Text")
{
// Generic text type. Decide which filter to use based on the
// document service first, then on extension if that's not available.
diff --git a/sc/source/ui/vba/vbaworkbooks.cxx b/sc/source/ui/vba/vbaworkbooks.cxx
index 00461b1..eb2dd68 100644
--- a/sc/source/ui/vba/vbaworkbooks.cxx
+++ b/sc/source/ui/vba/vbaworkbooks.cxx
@@ -194,7 +194,8 @@ ScVbaWorkbooks::isTextFile( const rtl::OUString& sType )
// b) a csv file
// c) unknown
// returning true basically means treat this like a csv file
- const static rtl::OUString txtType("generic_Text");
+ const static rtl::OUString txtType( RTL_CONSTASCII_USTRINGPARAM("writer_Text" ) );
+ const static rtl::OUString csvType("generic_Text");
const static rtl::OUString encodedTxtType( RTL_CONSTASCII_USTRINGPARAM("writer_Text_encoded" ) );
return sType.equals( txtType ) || sType.isEmpty() || sType.equals( encodedTxtType );
}
commit 64af66627767945d339cbacce2b7ad31fb62972b
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Fri May 25 00:22:58 2012 -0400
Do the real detection work for plain text & forgot to add a makefile.
Change-Id: I95edb869b00764464d91e1f396da1bb648b74515
diff --git a/filter/source/textfilterdetect/filterdetect.cxx b/filter/source/textfilterdetect/filterdetect.cxx
index 55bfd0a..9cb9405 100644
--- a/filter/source/textfilterdetect/filterdetect.cxx
+++ b/filter/source/textfilterdetect/filterdetect.cxx
@@ -27,49 +27,98 @@
*/
#include "filterdetect.hxx"
+
+#include "tools/urlobj.hxx"
+
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#define WRITER_TEXT_FILTER "Text"
+#define CALC_TEXT_FILTER "Text - txt - csv (StarCalc)"
+
using namespace ::com::sun::star;
+namespace {
+
+void setFilter(uno::Sequence<beans::PropertyValue>& rProps, sal_Int32 nPos, const rtl::OUString& rFilter)
+{
+ if (nPos >= 0)
+ rProps[nPos].Value <<= rFilter;
+ else
+ {
+ sal_Int32 n = rProps.getLength();
+ rProps.realloc(n+1);
+ rProps[n].Name = "FilterName";
+ rProps[n].Value <<= rFilter;
+ }
+}
+
+}
+
PlainTextFilterDetect::PlainTextFilterDetect(const uno::Reference<lang::XMultiServiceFactory> &xMSF) :
mxMSF(xMSF) {}
PlainTextFilterDetect::~PlainTextFilterDetect() {}
-rtl::OUString SAL_CALL PlainTextFilterDetect::detect(uno::Sequence<beans::PropertyValue>& aArguments) throw (uno::RuntimeException)
+rtl::OUString SAL_CALL PlainTextFilterDetect::detect(uno::Sequence<beans::PropertyValue>& lDescriptor) throw (uno::RuntimeException)
{
+ rtl::OUString aType;
+ rtl::OUString aDocService;
+ rtl::OUString aExt;
+
+ sal_Int32 nFilter = -1;
+
+ for (sal_Int32 i = 0, n = lDescriptor.getLength(); i < n; ++i)
+ {
+ if (lDescriptor[i].Name == "TypeName")
+ lDescriptor[i].Value >>= aType;
+ else if (lDescriptor[i].Name == "FilterName")
+ nFilter = i;
+ else if (lDescriptor[i].Name == "DocumentService")
+ lDescriptor[i].Value >>= aDocService;
+ else if (lDescriptor[i].Name == "URL")
+ {
+ rtl::OUString aURL;
+ lDescriptor[i].Value >>= aURL;
+
+ // Get the file name extension.
+ INetURLObject aParser(aURL);
+ aExt = aParser.getExtension(
+ INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET);
+ aExt = aExt.toAsciiLowerCase();
+ }
+ }
+
+ if (aType == "calc_Text_txt_csv_StarCalc")
+ {
+ // Generic text type. Decide which filter to use based on the
+ // document service first, then on extension if that's not available.
+
+ if (aDocService == "com.sun.star.sheet.SpreadsheetDocument")
+ // Open it in Calc.
+ setFilter(lDescriptor, nFilter, CALC_TEXT_FILTER);
+ else if (aDocService == "com.sun.star.text.TextDocument")
+ // Open it in Writer.
+ setFilter(lDescriptor, nFilter, WRITER_TEXT_FILTER);
+ else if (aExt == "csv")
+ setFilter(lDescriptor, nFilter, CALC_TEXT_FILTER);
+ else if (aExt == "txt")
+ setFilter(lDescriptor, nFilter, WRITER_TEXT_FILTER);
+ else
+ // No clue. Open it in Writer by default.
+ setFilter(lDescriptor, nFilter, WRITER_TEXT_FILTER);
+
+ return aType;
+ }
+
+ // failed!
return rtl::OUString();
}
// XInitialization
-void SAL_CALL PlainTextFilterDetect::initialize(const uno::Sequence<uno::Any>& aArguments)
+void SAL_CALL PlainTextFilterDetect::initialize(const uno::Sequence<uno::Any>& /*aArguments*/)
throw (uno::Exception, uno::RuntimeException)
{
- uno::Sequence<beans::PropertyValue> aAnySeq;
- sal_Int32 nLength = aArguments.getLength();
- if (nLength && (aArguments[0] >>= aAnySeq))
- {
- const beans::PropertyValue * pValue = aAnySeq.getConstArray();
- for (sal_Int32 i = 0, n = aAnySeq.getLength(); i < n; ++i)
- {
- if (pValue[i].Name == "Type")
- {
- fprintf(stdout, "PlainTextFilterDetect::initialize: type = '%s'\n",
- rtl::OUStringToOString(pValue[i].Value.get<rtl::OUString>(), RTL_TEXTENCODING_UTF8).getStr());
- }
- else if (pValue[i].Name == "UserData")
- {
- fprintf(stdout, "PlainTextFilterDetect::initialize: user data = '%s'\n",
- rtl::OUStringToOString(pValue[i].Value.get<rtl::OUString>(), RTL_TEXTENCODING_UTF8).getStr());
- }
- else if (pValue[i].Name == "TemplateName")
- {
- fprintf(stdout, "PlainTextFilterDetect::initialize: template name = '%s'\n",
- rtl::OUStringToOString(pValue[i].Value.get<rtl::OUString>(), RTL_TEXTENCODING_UTF8).getStr());
- }
- }
- }
}
rtl::OUString PlainTextFilterDetect_getImplementationName()
commit 24d5af2ed09a7e3d113b74247430a7322ea35d7d
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Thu May 24 23:14:02 2012 -0400
Use the new plain text type detection service for text/csv type.
Change-Id: I50d5cee6302e8d6b4b329e30b7a5ce47b47bc945
diff --git a/filter/source/config/fragments/types/generic_Text.xcu b/filter/source/config/fragments/types/generic_Text.xcu
index de25022..bc003d0 100644
--- a/filter/source/config/fragments/types/generic_Text.xcu
+++ b/filter/source/config/fragments/types/generic_Text.xcu
@@ -1,4 +1,4 @@
- <node oor:name="generic_Text" oor:op="replace" >
+ <node oor:name="calc_Text_txt_csv_StarCalc" oor:op="replace" >
<prop oor:name="DetectService"><value>com.sun.star.comp.filters.PlainTextFilterDetect</value></prop>
<prop oor:name="URLPattern"/>
<prop oor:name="Extensions"><value>csv txt</value></prop>
commit aacef5340657c358fae2a520236a45d9e703c441
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Thu May 24 22:36:09 2012 -0400
Initial skeleton code for plain text filter detection service.
Right now it will always fail.
Change-Id: I50011bbf7ce59c3b299d23e688dd1af87bcafeb6
diff --git a/filter/source/textfilterdetect/filterdetect.cxx b/filter/source/textfilterdetect/filterdetect.cxx
index 7dd2ddd..55bfd0a 100644
--- a/filter/source/textfilterdetect/filterdetect.cxx
+++ b/filter/source/textfilterdetect/filterdetect.cxx
@@ -27,98 +27,49 @@
*/
#include "filterdetect.hxx"
-
-#include "tools/urlobj.hxx"
-
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#define WRITER_TEXT_FILTER "Text"
-#define CALC_TEXT_FILTER "Text - txt - csv (StarCalc)"
-
using namespace ::com::sun::star;
-namespace {
-
-void setFilter(uno::Sequence<beans::PropertyValue>& rProps, sal_Int32 nPos, const rtl::OUString& rFilter)
-{
- if (nPos >= 0)
- rProps[nPos].Value <<= rFilter;
- else
- {
- sal_Int32 n = rProps.getLength();
- rProps.realloc(n+1);
- rProps[n].Name = "FilterName";
- rProps[n].Value <<= rFilter;
- }
-}
-
-}
-
PlainTextFilterDetect::PlainTextFilterDetect(const uno::Reference<lang::XMultiServiceFactory> &xMSF) :
mxMSF(xMSF) {}
PlainTextFilterDetect::~PlainTextFilterDetect() {}
-rtl::OUString SAL_CALL PlainTextFilterDetect::detect(uno::Sequence<beans::PropertyValue>& lDescriptor) throw (uno::RuntimeException)
+rtl::OUString SAL_CALL PlainTextFilterDetect::detect(uno::Sequence<beans::PropertyValue>& aArguments) throw (uno::RuntimeException)
{
- rtl::OUString aType;
- rtl::OUString aDocService;
- rtl::OUString aExt;
-
- sal_Int32 nFilter = -1;
-
- for (sal_Int32 i = 0, n = lDescriptor.getLength(); i < n; ++i)
- {
- if (lDescriptor[i].Name == "TypeName")
- lDescriptor[i].Value >>= aType;
- else if (lDescriptor[i].Name == "FilterName")
- nFilter = i;
- else if (lDescriptor[i].Name == "DocumentService")
- lDescriptor[i].Value >>= aDocService;
- else if (lDescriptor[i].Name == "URL")
- {
- rtl::OUString aURL;
- lDescriptor[i].Value >>= aURL;
-
- // Get the file name extension.
- INetURLObject aParser(aURL);
- aExt = aParser.getExtension(
- INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET);
- aExt = aExt.toAsciiLowerCase();
- }
- }
-
- if (aType == "generic_Text")
- {
- // Generic text type. Decide which filter to use based on the
- // document service first, then on extension if that's not available.
-
- if (aDocService == "com.sun.star.sheet.SpreadsheetDocument")
- // Open it in Calc.
- setFilter(lDescriptor, nFilter, CALC_TEXT_FILTER);
- else if (aDocService == "com.sun.star.text.TextDocument")
- // Open it in Writer.
- setFilter(lDescriptor, nFilter, WRITER_TEXT_FILTER);
- else if (aExt == "csv")
- setFilter(lDescriptor, nFilter, CALC_TEXT_FILTER);
- else if (aExt == "txt")
- setFilter(lDescriptor, nFilter, WRITER_TEXT_FILTER);
- else
- // No clue. Open it in Writer by default.
- setFilter(lDescriptor, nFilter, WRITER_TEXT_FILTER);
-
- return aType;
- }
-
- // failed!
return rtl::OUString();
}
// XInitialization
-void SAL_CALL PlainTextFilterDetect::initialize(const uno::Sequence<uno::Any>& /*aArguments*/)
+void SAL_CALL PlainTextFilterDetect::initialize(const uno::Sequence<uno::Any>& aArguments)
throw (uno::Exception, uno::RuntimeException)
{
+ uno::Sequence<beans::PropertyValue> aAnySeq;
+ sal_Int32 nLength = aArguments.getLength();
+ if (nLength && (aArguments[0] >>= aAnySeq))
+ {
+ const beans::PropertyValue * pValue = aAnySeq.getConstArray();
+ for (sal_Int32 i = 0, n = aAnySeq.getLength(); i < n; ++i)
+ {
+ if (pValue[i].Name == "Type")
+ {
+ fprintf(stdout, "PlainTextFilterDetect::initialize: type = '%s'\n",
+ rtl::OUStringToOString(pValue[i].Value.get<rtl::OUString>(), RTL_TEXTENCODING_UTF8).getStr());
+ }
+ else if (pValue[i].Name == "UserData")
+ {
+ fprintf(stdout, "PlainTextFilterDetect::initialize: user data = '%s'\n",
+ rtl::OUStringToOString(pValue[i].Value.get<rtl::OUString>(), RTL_TEXTENCODING_UTF8).getStr());
+ }
+ else if (pValue[i].Name == "TemplateName")
+ {
+ fprintf(stdout, "PlainTextFilterDetect::initialize: template name = '%s'\n",
+ rtl::OUStringToOString(pValue[i].Value.get<rtl::OUString>(), RTL_TEXTENCODING_UTF8).getStr());
+ }
+ }
+ }
}
rtl::OUString PlainTextFilterDetect_getImplementationName()
commit c88a3aa86dfb868bbf30a36ee2b3bfda4ceb6cda
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Thu May 24 21:21:31 2012 -0400
Patterns should precede extensions.
Change-Id: Ib401fb6287efda68d07732382fc814961138d8a9
diff --git a/filter/source/config/cache/typedetection.cxx b/filter/source/config/cache/typedetection.cxx
index cac9b14..303ebfc 100644
--- a/filter/source/config/cache/typedetection.cxx
+++ b/filter/source/config/cache/typedetection.cxx
@@ -109,13 +109,16 @@ TypeDetection::~TypeDetection()
namespace {
/**
- * Types with matching extension come first, then types that are supported
- * by the document service come next.
+ * Types with matching pattern first, then extension, then types that are
+ * supported by the document service come next.
*/
struct SortByPriority : public std::binary_function<FlatDetectionInfo, FlatDetectionInfo, bool>
{
bool operator() (const FlatDetectionInfo& r1, const FlatDetectionInfo& r2) const
{
+ if (r1.bMatchByPattern != r2.bMatchByPattern)
+ return r1.bMatchByPattern;
+
if (r1.bMatchByExtension != r2.bMatchByExtension)
return r1.bMatchByExtension;
commit 7eb0ece40284b47f9b166078b577ea29efbc86a3
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Thu May 24 21:14:40 2012 -0400
Prioritize candidate types by extension first, then by document service.
This unfortunately breaks plain text format detection for writer, but I'll
get to that next.
Change-Id: I70382529596dbc3e3af4935d6e98ad6d58bb4d91
diff --git a/filter/source/config/cache/typedetection.cxx b/filter/source/config/cache/typedetection.cxx
index 303ebfc..cac9b14 100644
--- a/filter/source/config/cache/typedetection.cxx
+++ b/filter/source/config/cache/typedetection.cxx
@@ -109,16 +109,13 @@ TypeDetection::~TypeDetection()
namespace {
/**
- * Types with matching pattern first, then extension, then types that are
- * supported by the document service come next.
+ * Types with matching extension come first, then types that are supported
+ * by the document service come next.
*/
struct SortByPriority : public std::binary_function<FlatDetectionInfo, FlatDetectionInfo, bool>
{
bool operator() (const FlatDetectionInfo& r1, const FlatDetectionInfo& r2) const
{
- if (r1.bMatchByPattern != r2.bMatchByPattern)
- return r1.bMatchByPattern;
-
if (r1.bMatchByExtension != r2.bMatchByExtension)
return r1.bMatchByExtension;
commit ff9c37417c1b9384859766a9a07af81767470cf9
Author: Michael Stahl <mstahl at redhat.com>
Date: Thu May 24 22:42:46 2012 +0200
SwCache: fix non-DBGUTIL memory leak in previous commit
diff --git a/sw/source/core/bastyp/swcache.cxx b/sw/source/core/bastyp/swcache.cxx
index 4463a56..8f26bac 100644
--- a/sw/source/core/bastyp/swcache.cxx
+++ b/sw/source/core/bastyp/swcache.cxx
@@ -182,11 +182,11 @@ SwCache::~SwCache()
OSL_TRACE(sOut.getStr());
}
Check();
+#endif
for(SwCacheObjArr::const_iterator it = m_aCacheObjects.begin(); it != m_aCacheObjects.end(); ++it)
delete *it;
}
-#endif
for(SwCacheObjArr::const_iterator it = m_aCacheObjects.begin(); it != m_aCacheObjects.end(); ++it)
delete *it;
diff --git a/sw/source/core/inc/swcache.hxx b/sw/source/core/inc/swcache.hxx
index f04778a..5934c11 100644
--- a/sw/source/core/inc/swcache.hxx
+++ b/sw/source/core/inc/swcache.hxx
@@ -106,8 +106,6 @@ public:
//nur sal_uInt8 hineinstecken!!!
#ifdef DBG_UTIL
SwCache( const sal_uInt16 nInitSize, const rtl::OString &rNm );
- // the destructor will free all objects still in the vector
- ~SwCache();
#else
SwCache( const sal_uInt16 nInitSize );
#endif
commit 10a558e9535363b607b40620ad0c94323470ef29
Author: Noel Grandin <noel at peralex.com>
Date: Wed May 23 16:13:53 2012 +0200
Inline SV_DECL_PTRARR_DEL(SwCacheObjArr) into a std::vector
..inside of the SwCache class.
Change-Id: Ie8cf55c28a04d3776b99a8608880ac7a19f748b2
diff --git a/sw/source/core/bastyp/swcache.cxx b/sw/source/core/bastyp/swcache.cxx
index c63afb5..4463a56 100644
--- a/sw/source/core/bastyp/swcache.cxx
+++ b/sw/source/core/bastyp/swcache.cxx
@@ -182,6 +182,10 @@ SwCache::~SwCache()
OSL_TRACE(sOut.getStr());
}
Check();
+
+ for(SwCacheObjArr::const_iterator it = m_aCacheObjects.begin(); it != m_aCacheObjects.end(); ++it)
+ delete *it;
+}
#endif
for(SwCacheObjArr::const_iterator it = m_aCacheObjects.begin(); it != m_aCacheObjects.end(); ++it)
diff --git a/sw/source/core/inc/swcache.hxx b/sw/source/core/inc/swcache.hxx
index 5934c11..f04778a 100644
--- a/sw/source/core/inc/swcache.hxx
+++ b/sw/source/core/inc/swcache.hxx
@@ -106,6 +106,8 @@ public:
//nur sal_uInt8 hineinstecken!!!
#ifdef DBG_UTIL
SwCache( const sal_uInt16 nInitSize, const rtl::OString &rNm );
+ // the destructor will free all objects still in the vector
+ ~SwCache();
#else
SwCache( const sal_uInt16 nInitSize );
#endif
commit 5bdc12f1ff9a77d57dbe01f9b8ee6ad56fabc284
Author: Michael Stahl <mstahl at redhat.com>
Date: Thu May 24 22:38:52 2012 +0200
fix previous commit:
erase in SwLabDlg::_ReplaceGroup should go until end()
diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx
index 2c6257c..25ca092 100644
--- a/sw/source/ui/envelp/label1.cxx
+++ b/sw/source/ui/envelp/label1.cxx
@@ -84,7 +84,7 @@ void SwLabRec::FillItem( SwLabItem& rItem ) const
void SwLabDlg::_ReplaceGroup( const String &rMake )
{
// Remove old entries
- pRecs->erase( pRecs->begin() + 1, pRecs->begin() + pRecs->size() - 1 );
+ pRecs->erase(pRecs->begin() + 1, pRecs->end());
aLabelsCfg.FillLabels(rtl::OUString(rMake), *pRecs);
aLstGroup = rMake;
}
commit 58e4c290e1a80ab09e0a71a36f5bd3dc62a7c5ab
Author: Noel Grandin <noel at peralex.com>
Date: Wed May 23 14:15:24 2012 +0200
Convert SV_DECL_PTRARR_DEL(SwLabRecs) to std::vector
I can't use boost::ptr_vector here because the code removes
entries from the list without free'ing them.
Change-Id: I1640d0bb97443998c02148ed24bbd6ad0d390234
diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx
index 25ca092..2c6257c 100644
--- a/sw/source/ui/envelp/label1.cxx
+++ b/sw/source/ui/envelp/label1.cxx
@@ -84,7 +84,7 @@ void SwLabRec::FillItem( SwLabItem& rItem ) const
void SwLabDlg::_ReplaceGroup( const String &rMake )
{
// Remove old entries
- pRecs->erase(pRecs->begin() + 1, pRecs->end());
+ pRecs->erase( pRecs->begin() + 1, pRecs->begin() + pRecs->size() - 1 );
aLabelsCfg.FillLabels(rtl::OUString(rMake), *pRecs);
aLstGroup = rMake;
}
commit 911a1ef77ddc77aabe9925cbf9b1016df7cd586f
Author: Noel Grandin <noel at peralex.com>
Date: Tue May 22 10:54:29 2012 +0200
Convert SV_DECL_PTRARR_DEL(SwPageDescs) to std::vector
Change-Id: I2301c1f237b1b08926c80942f459ba6062ed457d
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index f9b829f..b7414db 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -142,9 +142,6 @@
using namespace ::com::sun::star;
using ::rtl::OUString;
-// Page descriptors
-SV_IMPL_PTRARR(SwPageDescs,SwPageDescPtr);
-
/* IInterface */
sal_Int32 SwDoc::acquire()
{
commit 744a67ac6591842667d42840d834f80686cd64b9
Author: Noel Grandin <noel at peralex.com>
Date: Mon May 21 17:01:56 2012 +0200
Convert SV_DECL_PTRARR_DEL(SwFldTypes) to std::vector
Change-Id: Ia1f52f25680d3f970aa4f7f60a8e5203326a6796
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 85282dc..f9b829f 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -144,8 +144,6 @@ using ::rtl::OUString;
// Page descriptors
SV_IMPL_PTRARR(SwPageDescs,SwPageDescPtr);
-// Field types
-SV_IMPL_PTRARR( SwFldTypes, SwFldTypePtr)
/* IInterface */
sal_Int32 SwDoc::acquire()
commit c934054bc6237071bf9a01851a0d1b254b6a9968
Author: Noel Grandin <noel at peralex.com>
Date: Mon May 21 15:49:21 2012 +0200
Convert SV_DECL_PTRARR_DEL(SwTOXTypes) to std::vector
Change-Id: Ibf67e586082132f370659a4c79415d5928758d3a
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index b7414db..85282dc 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -142,6 +142,11 @@
using namespace ::com::sun::star;
using ::rtl::OUString;
+// Page descriptors
+SV_IMPL_PTRARR(SwPageDescs,SwPageDescPtr);
+// Field types
+SV_IMPL_PTRARR( SwFldTypes, SwFldTypePtr)
+
/* IInterface */
sal_Int32 SwDoc::acquire()
{
commit da2701f9cb0fe26df4cce4f939cea2c4f0a10d91
Author: Noel Grandin <noel at peralex.com>
Date: Wed May 16 15:23:09 2012 +0200
Convert SV_DECL_PTRARR_DEL(SwNumRuleTbl) to std::vector
Could not use boost::ptr_vector here because the code manually
moves objects around.
Change-Id: I708270a967ee6663ab1f1ba8d7998c63fa698b8f
diff --git a/sw/inc/docary.hxx b/sw/inc/docary.hxx
index a2cab0a..2a86422 100644
--- a/sw/inc/docary.hxx
+++ b/sw/inc/docary.hxx
@@ -30,6 +30,7 @@
#include <com/sun/star/i18n/ForbiddenCharacters.hpp>
#include <vector>
+#include <algorithm>
class SwFieldType;
class SwFrmFmt;
commit 10993b7c849e117b5207081c6ac221068609941a
Author: Noel Grandin <noel at peralex.com>
Date: Wed May 16 11:48:48 2012 +0200
Convert SV_DECL_PTRARR(SwOLENodes) to std::vector
Change-Id: I384e152b89ed6951417296a5722f831f8ba7cb46
diff --git a/sw/inc/docary.hxx b/sw/inc/docary.hxx
index 2a86422..a2cab0a 100644
--- a/sw/inc/docary.hxx
+++ b/sw/inc/docary.hxx
@@ -30,7 +30,6 @@
#include <com/sun/star/i18n/ForbiddenCharacters.hpp>
#include <vector>
-#include <algorithm>
class SwFieldType;
class SwFrmFmt;
commit 23ae876da7bb7a18a931c5980a1d352ab7bd6759
Author: Michael Stahl <mstahl at redhat.com>
Date: Thu May 24 14:56:47 2012 +0200
oox: generate vmlexport-shape-types into CustomTarget dir
diff --git a/oox/CustomTarget_generated.mk b/oox/CustomTarget_generated.mk
index c2ad511..bcdd5ef 100644
--- a/oox/CustomTarget_generated.mk
+++ b/oox/CustomTarget_generated.mk
@@ -9,7 +9,12 @@
$(eval $(call gb_CustomTarget_CustomTarget,oox/generated))
-$(call gb_GenCxxObject_get_source,oox/source/export/vmlexport-shape-types) : \
+oox_SRC := $(SRCDIR)/oox/source/token
+oox_MISC := $(call gb_CustomTarget_get_workdir,oox/generated)/misc
+oox_INC := $(call gb_CustomTarget_get_workdir,oox/generated)/inc
+oox_GENHEADERPATH := $(oox_INC)/oox/token
+
+$(oox_MISC)/vmlexport-shape-types.cxx : \
$(SRCDIR)/oox/source/export/preset-definitions-to-shape-types.pl \
$(SRCDIR)/oox/source/export/presetShapeDefinitions.xml \
$(SRCDIR)/oox/source/export/presetTextWarpDefinitions.xml
@@ -17,11 +22,6 @@ $(call gb_GenCxxObject_get_source,oox/source/export/vmlexport-shape-types) : \
mkdir -p $(dir $@)
perl $^ > $@.in_progress 2> $@.log && mv $@.in_progress $@
-oox_SRC := $(SRCDIR)/oox/source/token
-oox_MISC := $(call gb_CustomTarget_get_workdir,oox/generated)/misc
-oox_INC := $(call gb_CustomTarget_get_workdir,oox/generated)/inc
-oox_GENHEADERPATH := $(oox_INC)/oox/token
-
$(oox_INC)/tokenhash.inc : $(oox_MISC)/tokenhash.gperf
$(call gb_Output_announce,$@,build,GPF,1)
$(GPERF) --compare-strncmp $< | sed -e 's/(char\*)0/(char\*)0, 0/g' | grep -v '^#line' > $@
@@ -49,7 +49,7 @@ $(eval $(call oox_GenTarget,properties,property,))
$(eval $(call oox_GenTarget,tokens,token,tokenhash.gperf))
$(call gb_CustomTarget_get_target,oox/generated) : \
- $(call gb_GenCxxObject_get_source,oox/source/export/vmlexport-shape-types) \
+ $(oox_MISC)/vmlexport-shape-types.cxx \
$(oox_INC)/tokenhash.inc \
$(oox_INC)/tokennames.inc \
$(oox_INC)/namespacenames.inc \
commit 1b745a0c4a7fd6cc774cea35d66d0ad5c0d013c8
Author: Michael Stahl <mstahl at redhat.com>
Date: Thu May 24 14:45:45 2012 +0200
oox: add some bling so we can see what takes so long
diff --git a/oox/CustomTarget_generated.mk b/oox/CustomTarget_generated.mk
index 55d4ca1..c2ad511 100644
--- a/oox/CustomTarget_generated.mk
+++ b/oox/CustomTarget_generated.mk
@@ -13,6 +13,7 @@ $(call gb_GenCxxObject_get_source,oox/source/export/vmlexport-shape-types) : \
$(SRCDIR)/oox/source/export/preset-definitions-to-shape-types.pl \
$(SRCDIR)/oox/source/export/presetShapeDefinitions.xml \
$(SRCDIR)/oox/source/export/presetTextWarpDefinitions.xml
+ $(call gb_Output_announce,$@,build,PRL,1)
mkdir -p $(dir $@)
perl $^ > $@.in_progress 2> $@.log && mv $@.in_progress $@
@@ -22,6 +23,7 @@ oox_INC := $(call gb_CustomTarget_get_workdir,oox/generated)/inc
oox_GENHEADERPATH := $(oox_INC)/oox/token
$(oox_INC)/tokenhash.inc : $(oox_MISC)/tokenhash.gperf
+ $(call gb_Output_announce,$@,build,GPF,1)
$(GPERF) --compare-strncmp $< | sed -e 's/(char\*)0/(char\*)0, 0/g' | grep -v '^#line' > $@
oox_GenTarget_get_target = $(oox_MISC)/$(1)
@@ -33,6 +35,7 @@ $(oox_GENHEADERPATH)/$(1).hxx $(oox_MISC)/$(2)ids.inc $(oox_INC)/$(2)names.inc \
$(call oox_GenTarget_get_target,$(1)) : $(oox_SRC)/$(1).pl $(oox_SRC)/$(1).txt \
$(oox_SRC)/$(1).hxx.head $(oox_SRC)/$(1).hxx.tail
+ $$(call gb_Output_announce,$$@,build,PRL,1)
mkdir -p $(oox_MISC) $(oox_INC) $(oox_GENHEADERPATH)
perl $(oox_SRC)/$(1).pl $(oox_SRC)/$(1).txt $(oox_MISC)/$(2)ids.inc \
$(oox_INC)/$(2)names.inc $(if $(3),$(oox_MISC)/$(3)) \
commit b556ccf99d2aca0e8865ecab58b4c3d11b1d6151
Author: Michael Stahl <mstahl at redhat.com>
Date: Thu May 24 14:25:05 2012 +0200
oox: move generated stuff to custom target
diff --git a/oox/CustomTarget_generated.mk b/oox/CustomTarget_generated.mk
index bcdd5ef..55d4ca1 100644
--- a/oox/CustomTarget_generated.mk
+++ b/oox/CustomTarget_generated.mk
@@ -9,21 +9,19 @@
$(eval $(call gb_CustomTarget_CustomTarget,oox/generated))
-oox_SRC := $(SRCDIR)/oox/source/token
-oox_MISC := $(call gb_CustomTarget_get_workdir,oox/generated)/misc
-oox_INC := $(call gb_CustomTarget_get_workdir,oox/generated)/inc
-oox_GENHEADERPATH := $(oox_INC)/oox/token
-
-$(oox_MISC)/vmlexport-shape-types.cxx : \
+$(call gb_GenCxxObject_get_source,oox/source/export/vmlexport-shape-types) : \
$(SRCDIR)/oox/source/export/preset-definitions-to-shape-types.pl \
$(SRCDIR)/oox/source/export/presetShapeDefinitions.xml \
$(SRCDIR)/oox/source/export/presetTextWarpDefinitions.xml
- $(call gb_Output_announce,$@,build,PRL,1)
mkdir -p $(dir $@)
perl $^ > $@.in_progress 2> $@.log && mv $@.in_progress $@
+oox_SRC := $(SRCDIR)/oox/source/token
+oox_MISC := $(call gb_CustomTarget_get_workdir,oox/generated)/misc
+oox_INC := $(call gb_CustomTarget_get_workdir,oox/generated)/inc
+oox_GENHEADERPATH := $(oox_INC)/oox/token
+
$(oox_INC)/tokenhash.inc : $(oox_MISC)/tokenhash.gperf
- $(call gb_Output_announce,$@,build,GPF,1)
$(GPERF) --compare-strncmp $< | sed -e 's/(char\*)0/(char\*)0, 0/g' | grep -v '^#line' > $@
oox_GenTarget_get_target = $(oox_MISC)/$(1)
@@ -35,7 +33,6 @@ $(oox_GENHEADERPATH)/$(1).hxx $(oox_MISC)/$(2)ids.inc $(oox_INC)/$(2)names.inc \
$(call oox_GenTarget_get_target,$(1)) : $(oox_SRC)/$(1).pl $(oox_SRC)/$(1).txt \
$(oox_SRC)/$(1).hxx.head $(oox_SRC)/$(1).hxx.tail
- $$(call gb_Output_announce,$$@,build,PRL,1)
mkdir -p $(oox_MISC) $(oox_INC) $(oox_GENHEADERPATH)
perl $(oox_SRC)/$(1).pl $(oox_SRC)/$(1).txt $(oox_MISC)/$(2)ids.inc \
$(oox_INC)/$(2)names.inc $(if $(3),$(oox_MISC)/$(3)) \
@@ -49,7 +46,7 @@ $(eval $(call oox_GenTarget,properties,property,))
$(eval $(call oox_GenTarget,tokens,token,tokenhash.gperf))
$(call gb_CustomTarget_get_target,oox/generated) : \
- $(oox_MISC)/vmlexport-shape-types.cxx \
+ $(call gb_GenCxxObject_get_source,oox/source/export/vmlexport-shape-types) \
$(oox_INC)/tokenhash.inc \
$(oox_INC)/tokennames.inc \
$(oox_INC)/namespacenames.inc \
diff --git a/oox/Library_oox.mk b/oox/Library_oox.mk
index 7e19f29..2301fd7 100644
--- a/oox/Library_oox.mk
+++ b/oox/Library_oox.mk
@@ -294,45 +294,4 @@ $(eval $(call gb_Library_add_generated_exception_objects,oox,\
CustomTarget/oox/generated/misc/vmlexport-shape-types \
))
-$(call gb_GenCxxObject_get_source,oox/source/export/vmlexport-shape-types) : $(SRCDIR)/oox/source/export/preset-definitions-to-shape-types.pl $(SRCDIR)/oox/source/export/presetShapeDefinitions.xml $(SRCDIR)/oox/source/export/presetTextWarpDefinitions.xml
- mkdir -p $(dir $@)
- perl $^ > $@.in_progress 2> $@.log && mv $@.in_progress $@
-
-oox_SRC := $(SRCDIR)/oox/source/token
-oox_MISC := $(WORKDIR)/oox/misc
-oox_INC := $(WORKDIR)/oox/inc
-oox_GENHEADERPATH := $(oox_INC)/oox/token
-
-$(call gb_CxxObject_get_target,oox/source/token/tokenmap) : $(oox_INC)/tokenhash.inc
-
-$(eval $(call gb_Library_set_include,oox,\
- $$(INCLUDE) \
- -I$(oox_INC) \
-))
-
-$(oox_INC)/tokenhash.inc : $(oox_MISC)/tokenhash.gperf
- $(GPERF) --compare-strncmp $< | sed -e 's/(char\*)0/(char\*)0, 0/g' | grep -v '^#line' > $@
-
-oox_GenTarget_get_target = $(oox_MISC)/$(1)
-
-define oox_GenTarget_GenTarget
-$(oox_GENHEADERPATH)/$(1).hxx $(oox_MISC)/$(2)ids.inc $(oox_INC)/$(2)names.inc $(if $(3),$(oox_MISC)/$(3)) : $(call oox_GenTarget_get_target,$(1))
- @touch $$@
-$(call oox_GenTarget_get_target,$(1)) : $(oox_SRC)/$(1).pl $(oox_SRC)/$(1).txt $(oox_SRC)/$(1).hxx.head $(oox_SRC)/$(1).hxx.tail
- mkdir -p $(oox_MISC) $(oox_INC) $(oox_GENHEADERPATH)
- perl $(oox_SRC)/$(1).pl $(oox_SRC)/$(1).txt $(oox_MISC)/$(2)ids.inc $(oox_INC)/$(2)names.inc $(if $(3),$(oox_MISC)/$(3)) \
- && cat $(oox_SRC)/$(1).hxx.head $(oox_MISC)/$(2)ids.inc $(oox_SRC)/$(1).hxx.tail > $(oox_GENHEADERPATH)/$(1).hxx \
- && touch $$@
-endef
-
-$(eval $(call oox_GenTarget_GenTarget,namespaces,namespace,namespaces.txt))
-$(eval $(call oox_GenTarget_GenTarget,properties,property,))
-$(eval $(call oox_GenTarget_GenTarget,tokens,token,tokenhash.gperf))
-
-$(call gb_Library_get_clean_target,oox) : oox_clean
-
-oox_clean :
- rm -rf $(WORKDIR)/oox
-.PHONY: oox_clean
-
# vim: set noet sw=4 ts=4:
commit 253f8d941f0f12165384f5d153fcfa76ac42b1d9
Author: Michael Stahl <mstahl at redhat.com>
Date: Thu May 24 13:24:56 2012 +0200
oox: this rule needs a command
Make doesn't consider targets that depend on this outdated when there is
no command to update it.
diff --git a/oox/Library_oox.mk b/oox/Library_oox.mk
index 29cdd3f..7e19f29 100644
--- a/oox/Library_oox.mk
+++ b/oox/Library_oox.mk
@@ -317,6 +317,7 @@ oox_GenTarget_get_target = $(oox_MISC)/$(1)
define oox_GenTarget_GenTarget
$(oox_GENHEADERPATH)/$(1).hxx $(oox_MISC)/$(2)ids.inc $(oox_INC)/$(2)names.inc $(if $(3),$(oox_MISC)/$(3)) : $(call oox_GenTarget_get_target,$(1))
+ @touch $$@
$(call oox_GenTarget_get_target,$(1)) : $(oox_SRC)/$(1).pl $(oox_SRC)/$(1).txt $(oox_SRC)/$(1).hxx.head $(oox_SRC)/$(1).hxx.tail
mkdir -p $(oox_MISC) $(oox_INC) $(oox_GENHEADERPATH)
perl $(oox_SRC)/$(1).pl $(oox_SRC)/$(1).txt $(oox_MISC)/$(2)ids.inc $(oox_INC)/$(2)names.inc $(if $(3),$(oox_MISC)/$(3)) \
commit 575caf76d10d2ba0f0d7250d44fa8b3045b8c226
Author: Michael Stahl <mstahl at redhat.com>
Date: Thu May 24 13:20:32 2012 +0200
oox: can't see why we need these deps
diff --git a/oox/Library_oox.mk b/oox/Library_oox.mk
index e9ee30f..29cdd3f 100644
--- a/oox/Library_oox.mk
+++ b/oox/Library_oox.mk
@@ -303,16 +303,6 @@ oox_MISC := $(WORKDIR)/oox/misc
oox_INC := $(WORKDIR)/oox/inc
oox_GENHEADERPATH := $(oox_INC)/oox/token
-# these three generated headers are included from just about everywhere--might
-# just as well make them before everything else...
-$(call gb_Package_get_target,oox_inc) : $(oox_GENHEADERPATH)/namespaces.hxx
-$(call gb_Package_get_target,oox_inc) : $(oox_GENHEADERPATH)/properties.hxx
-$(call gb_Package_get_target,oox_inc) : $(oox_GENHEADERPATH)/tokens.hxx
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list