[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang svx/inc svx/source sw/inc sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sat Nov 24 12:23:21 UTC 2018
compilerplugins/clang/unusedenumconstants.readonly.results | 4 ----
svx/inc/galbrws2.hxx | 5 ++---
svx/source/gallery2/galbrws2.cxx | 10 ++--------
svx/source/gallery2/galctrl.cxx | 8 ++++----
sw/inc/IDocumentRedlineAccess.hxx | 5 +----
sw/source/core/doc/DocumentRedlineManager.cxx | 3 +--
sw/source/core/doc/docredln.cxx | 9 ---------
7 files changed, 10 insertions(+), 34 deletions(-)
New commits:
commit 5a291af9969aa6e17a9827e7f6f6b12c7bebcc50
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Nov 22 15:00:07 2018 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Nov 24 13:23:12 2018 +0100
remove unused GalleryItemFlags::ThemeName
Change-Id: Iaf1c82ee454139553dbc9fd1b0cf38b9e7971fdd
Reviewed-on: https://gerrit.libreoffice.org/63931
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/compilerplugins/clang/unusedenumconstants.readonly.results b/compilerplugins/clang/unusedenumconstants.readonly.results
index b82df1554c25..f980ab852405 100644
--- a/compilerplugins/clang/unusedenumconstants.readonly.results
+++ b/compilerplugins/clang/unusedenumconstants.readonly.results
@@ -1296,8 +1296,6 @@ svl/source/numbers/zformat.cxx:386
enum BracketFormatSymbolType BRACKET_SYMBOLTYPE_NATNUM19
svtools/source/contnr/fileview.cxx:110
enum FileViewFlags SHOW_ONLYTITLE
-svx/inc/galbrws2.hxx:53
- enum GalleryItemFlags ThemeName
svx/source/inc/docrecovery.hxx:85
enum EDocStates TryLoadBackup
svx/source/inc/docrecovery.hxx:86
diff --git a/svx/inc/galbrws2.hxx b/svx/inc/galbrws2.hxx
index 02394d5114bc..196ff7dfad6f 100644
--- a/svx/inc/galbrws2.hxx
+++ b/svx/inc/galbrws2.hxx
@@ -50,13 +50,12 @@ enum class GalleryBrowserTravel
};
enum class GalleryItemFlags {
- ThemeName = 0x0001,
Title = 0x0002,
Path = 0x0004
};
namespace o3tl
{
- template<> struct typed_flags<GalleryItemFlags> : is_typed_flags<GalleryItemFlags, 0x0007> {};
+ template<> struct typed_flags<GalleryItemFlags> : is_typed_flags<GalleryItemFlags, 0x0006> {};
}
@@ -132,7 +131,7 @@ private:
public:
- static OUString GetItemText( const GalleryTheme& rTheme, const SgaObject& rObj, GalleryItemFlags nItemTextFlags );
+ static OUString GetItemText( const SgaObject& rObj, GalleryItemFlags nItemTextFlags );
public:
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx
index dd19615bb66f..1e89c6cc4801 100644
--- a/svx/source/gallery2/galbrws2.cxx
+++ b/svx/source/gallery2/galbrws2.cxx
@@ -1115,7 +1115,7 @@ void GalleryBrowser2::Execute(const OString &rIdent)
if( pObj )
{
- const OUString aOldTitle( GetItemText( *mpCurTheme, *pObj, GalleryItemFlags::Title ) );
+ const OUString aOldTitle( GetItemText( *pObj, GalleryItemFlags::Title ) );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
ScopedVclPtr<AbstractTitleDialog> aDlg(pFact->CreateTitleDialog(GetFrameWeld(), aOldTitle));
@@ -1162,18 +1162,12 @@ void GalleryBrowser2::Execute(const OString &rIdent)
}
}
-OUString GalleryBrowser2::GetItemText( const GalleryTheme& rTheme, const SgaObject& rObj, GalleryItemFlags nItemTextFlags )
+OUString GalleryBrowser2::GetItemText( const SgaObject& rObj, GalleryItemFlags nItemTextFlags )
{
OUString aRet;
const INetURLObject& aURL(rObj.GetURL());
- if( nItemTextFlags & GalleryItemFlags::ThemeName )
- {
- aRet += rTheme.GetName();
- aRet += " - ";
- }
-
if( nItemTextFlags & GalleryItemFlags::Title )
{
OUString aTitle( rObj.GetTitle() );
diff --git a/svx/source/gallery2/galctrl.cxx b/svx/source/gallery2/galctrl.cxx
index 1a95c134bedb..af00c3fd15e0 100644
--- a/svx/source/gallery2/galctrl.cxx
+++ b/svx/source/gallery2/galctrl.cxx
@@ -335,7 +335,7 @@ void GalleryIconView::UserDraw(const UserDrawEvent& rUDEvt)
if(pObj)
{
aBitmapEx = pObj->createPreviewBitmapEx(aSize);
- aItemTextTitle = GalleryBrowser2::GetItemText(*mpTheme, *pObj, GalleryItemFlags::Title);
+ aItemTextTitle = GalleryBrowser2::GetItemText(*pObj, GalleryItemFlags::Title);
mpTheme->SetPreviewBitmapExAndStrings(nId - 1, aBitmapEx, aSize, aItemTextTitle, aItemTextPath);
}
@@ -451,7 +451,7 @@ OUString GalleryListView::GetCellText(long _nRow, sal_uInt16 /*nColumnId*/) cons
if( pObj )
{
- sRet = GalleryBrowser2::GetItemText( *mpTheme, *pObj, GalleryItemFlags::Title );
+ sRet = GalleryBrowser2::GetItemText( *pObj, GalleryItemFlags::Title );
}
}
@@ -515,8 +515,8 @@ void GalleryListView::PaintField(vcl::RenderContext& rDev, const tools::Rectangl
if(pObj)
{
aBitmapEx = pObj->createPreviewBitmapEx(aSize);
- aItemTextTitle = GalleryBrowser2::GetItemText(*mpTheme, *pObj, GalleryItemFlags::Title);
- aItemTextPath = GalleryBrowser2::GetItemText(*mpTheme, *pObj, GalleryItemFlags::Path);
+ aItemTextTitle = GalleryBrowser2::GetItemText(*pObj, GalleryItemFlags::Title);
+ aItemTextPath = GalleryBrowser2::GetItemText(*pObj, GalleryItemFlags::Path);
mpTheme->SetPreviewBitmapExAndStrings(mnCurRow, aBitmapEx, aSize, aItemTextTitle, aItemTextPath);
}
commit 969d96b3a844a00181a07b07f7c6dc6db7700876
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Nov 22 14:54:09 2018 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Nov 24 13:23:01 2018 +0100
remove unused RedlineFlags::IgnoreDeleteRedlines
Change-Id: Ic7c1b752c4511a0f55aa8be6b835763715c7738a
Reviewed-on: https://gerrit.libreoffice.org/63930
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/compilerplugins/clang/unusedenumconstants.readonly.results b/compilerplugins/clang/unusedenumconstants.readonly.results
index 65e40e4cb73c..b82df1554c25 100644
--- a/compilerplugins/clang/unusedenumconstants.readonly.results
+++ b/compilerplugins/clang/unusedenumconstants.readonly.results
@@ -1324,8 +1324,6 @@ sw/inc/docufld.hxx:113
enum SwExtUserSubType EU_FATHERSNAME
sw/inc/docufld.hxx:114
enum SwExtUserSubType EU_APARTMENT
-sw/inc/IDocumentRedlineAccess.hxx:57
- enum RedlineFlags IgnoreDeleteRedlines
sw/inc/ndtyp.hxx:42
enum SwNodeType ContentMask
sw/inc/poolfmt.hxx:116
diff --git a/sw/inc/IDocumentRedlineAccess.hxx b/sw/inc/IDocumentRedlineAccess.hxx
index f8b1ee6b1a81..df2091ce6009 100644
--- a/sw/inc/IDocumentRedlineAccess.hxx
+++ b/sw/inc/IDocumentRedlineAccess.hxx
@@ -52,15 +52,12 @@ enum class RedlineFlags
// remove the original Redlines together with their content
// (Clipboard/text modules).
DeleteRedlines = 0x100,
- // When deleting within a RedlineObject
- // ignore the DeleteRedline during Append.
- IgnoreDeleteRedlines = 0x200,
// don't combine any redlines. This flag may be only used in Undo.
DontCombineRedlines = 0x400,
};
namespace o3tl
{
- template<> struct typed_flags<RedlineFlags> : is_typed_flags<RedlineFlags, 0x733> {};
+ template<> struct typed_flags<RedlineFlags> : is_typed_flags<RedlineFlags, 0x533> {};
}
typedef sal_uInt16 RedlineType_t;
diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx
index 4ce414043270..7b7880bafecd 100644
--- a/sw/source/core/doc/DocumentRedlineManager.cxx
+++ b/sw/source/core/doc/DocumentRedlineManager.cxx
@@ -2083,8 +2083,7 @@ bool DocumentRedlineManager::SplitRedline( const SwPaM& rRange )
bool DocumentRedlineManager::DeleteRedline( const SwPaM& rRange, bool bSaveInUndo,
sal_uInt16 nDelType )
{
- if( RedlineFlags::IgnoreDeleteRedlines & meRedlineFlags ||
- !rRange.HasMark() || *rRange.GetMark() == *rRange.GetPoint() )
+ if( !rRange.HasMark() || *rRange.GetMark() == *rRange.GetPoint() )
return false;
bool bChg = false;
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index f9fe20b8953a..02774b88002e 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -136,9 +136,6 @@ static bool CheckPosition( const SwPosition* pStt, const SwPosition* pEnd )
bool SwExtraRedlineTable::DeleteAllTableRedlines( SwDoc* pDoc, const SwTable& rTable, bool bSaveInUndo, sal_uInt16 nRedlineTypeToDelete )
{
- if( RedlineFlags::IgnoreDeleteRedlines & pDoc->getIDocumentRedlineAccess().GetRedlineFlags() )
- return false;
-
bool bChg = false;
if (bSaveInUndo && pDoc->GetIDocumentUndoRedo().DoesUndo())
@@ -215,9 +212,6 @@ bool SwExtraRedlineTable::DeleteAllTableRedlines( SwDoc* pDoc, const SwTable& rT
bool SwExtraRedlineTable::DeleteTableRowRedline( SwDoc* pDoc, const SwTableLine& rTableLine, bool bSaveInUndo, sal_uInt16 nRedlineTypeToDelete )
{
- if( RedlineFlags::IgnoreDeleteRedlines & pDoc->getIDocumentRedlineAccess().GetRedlineFlags() )
- return false;
-
bool bChg = false;
if (bSaveInUndo && pDoc->GetIDocumentUndoRedo().DoesUndo())
@@ -262,9 +256,6 @@ bool SwExtraRedlineTable::DeleteTableRowRedline( SwDoc* pDoc, const SwTableLine&
bool SwExtraRedlineTable::DeleteTableCellRedline( SwDoc* pDoc, const SwTableBox& rTableBox, bool bSaveInUndo, sal_uInt16 nRedlineTypeToDelete )
{
- if( RedlineFlags::IgnoreDeleteRedlines & pDoc->getIDocumentRedlineAccess().GetRedlineFlags() )
- return false;
-
bool bChg = false;
if (bSaveInUndo && pDoc->GetIDocumentUndoRedo().DoesUndo())
More information about the Libreoffice-commits
mailing list