summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorPhilipp Weissenbacher <p.weissenbacher@gmail.com>2014-07-23 00:03:32 +0200
committerNoel Grandin <noelgrandin@gmail.com>2014-07-23 07:32:35 +0000
commit5a51968ca442fe7342b984895a75ef61e47165ce (patch)
treeef192cbbcc2ae61daa16f48afedc2ed19f7b3bfb /svl
parent4ca819b204e6c93c4b4e20b191100aa248b8ff23 (diff)
fdo#39468 Translate German comments
Change-Id: I7f83308125d6d17ec199bbb2edbb69259702ca77 Reviewed-on: https://gerrit.libreoffice.org/10474 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'svl')
-rw-r--r--svl/source/items/aeitem.cxx32
-rw-r--r--svl/source/items/itemiter.cxx2
-rw-r--r--svl/source/items/itemprop.cxx10
-rw-r--r--svl/source/items/macitem.cxx4
-rw-r--r--svl/source/items/poolcach.cxx20
-rw-r--r--svl/source/items/poolitem.cxx95
-rw-r--r--svl/source/items/slstitm.cxx6
-rw-r--r--svl/source/items/stylepool.cxx60
8 files changed, 109 insertions, 120 deletions
diff --git a/svl/source/items/aeitem.cxx b/svl/source/items/aeitem.cxx
index a13eaf2ddfea..09356f2041d4 100644
--- a/svl/source/items/aeitem.cxx
+++ b/svl/source/items/aeitem.cxx
@@ -172,21 +172,16 @@ SfxPoolItem* SfxAllEnumItem::Create( SvStream & rStream, sal_uInt16 ) const
-
+/**
+ * In contrast to @see SfxEnumItemInterface::GetPosByValue(sal_uInt16) const
+ * this internal method returns the position the value would be for non-present values.
+ */
sal_uInt16 SfxAllEnumItem::_GetPosByValue( sal_uInt16 nVal ) const
-
-/* [Beschreibung]
-
- Im Ggs. zu <SfxEnumItemInterface::GetPosByValue(sal_uInt16)const> liefert
- diese interne Methode bei nicht vorhandenen Values die Position,
- an der der Wert liegen w"urde.
-*/
-
{
if ( !pValues )
return 0;
- //!O: binaere Suche oder SortArray verwenden
+ //FIXME: Optimisation: use binary search or SortArray
sal_uInt16 nPos;
for ( nPos = 0; nPos < pValues->size(); ++nPos )
if ( (*pValues)[nPos].nValue >= nVal )
@@ -195,16 +190,13 @@ sal_uInt16 SfxAllEnumItem::_GetPosByValue( sal_uInt16 nVal ) const
}
-
-sal_uInt16 SfxAllEnumItem::GetPosByValue( sal_uInt16 nValue ) const
-
-/* [Beschreibung]
-
- Liefert im Gegensatz zu <SfxEnumItemInterface::GetPosByValue(sal_uInt16)const>
- immer nValue zur"uck, solange nicht mindestens ein Wert mit einer der
- Methoden <SfxAllEnumItem::InsertValue()> eingef"ugt wurde.
+/**
+ * In contrast to @see SfxEnumItemInterface::GetPosByValue(sal_uInt16) const
+ * this method always returns nValue, as long as not at least one value has
+ * been inserted using the SfxAllEnumItem::InsertValue() methods
*/
+sal_uInt16 SfxAllEnumItem::GetPosByValue( sal_uInt16 nValue ) const
{
if ( !pValues || pValues->empty() )
return nValue;
@@ -225,7 +217,7 @@ void SfxAllEnumItem::InsertValue( sal_uInt16 nValue, const OUString &rValue )
// remove when exists
RemoveValue( nValue );
// then insert
- pValues->Insert( _GetPosByValue(nValue), pVal ); //! doppelte?!
+ pValues->Insert( _GetPosByValue(nValue), pVal ); // FIXME: Duplicates?
}
@@ -238,7 +230,7 @@ void SfxAllEnumItem::InsertValue( sal_uInt16 nValue )
if ( !pValues )
pValues = new SfxAllEnumValueArr;
- pValues->Insert( _GetPosByValue(nValue), pVal ); //! doppelte?!
+ pValues->Insert( _GetPosByValue(nValue), pVal ); // FIXME: Duplicates?
}
void SfxAllEnumItem::DisableValue( sal_uInt16 nValue )
diff --git a/svl/source/items/itemiter.cxx b/svl/source/items/itemiter.cxx
index a2cd7036a38f..033d74ab3e07 100644
--- a/svl/source/items/itemiter.cxx
+++ b/svl/source/items/itemiter.cxx
@@ -36,7 +36,7 @@ SfxItemIter::SfxItemIter( const SfxItemSet& rItemSet )
{
SfxItemArray ppFnd = _rSet._aItems;
- // suche das 1. gesetzte Item
+ // Find the first Item that is set
for ( _nStt = 0; !*(ppFnd + _nStt ); ++_nStt )
; // empty loop
if ( 1 < _rSet.Count() )
diff --git a/svl/source/items/itemprop.cxx b/svl/source/items/itemprop.cxx
index 3ba833fb1b17..4179c649652a 100644
--- a/svl/source/items/itemprop.cxx
+++ b/svl/source/items/itemprop.cxx
@@ -293,9 +293,9 @@ PropertyState SfxItemPropertySet::getPropertyState(const SfxItemPropertySimpleEn
PropertyState eRet = PropertyState_DIRECT_VALUE;
sal_uInt16 nWhich = rEntry.nWID;
- // item state holen
+ // Get item state
SfxItemState eState = rSet.GetItemState( nWhich, false );
- // item-Wert als UnoAny zurueckgeben
+ // Return item value as UnoAny
if(eState == SFX_ITEM_DEFAULT)
eRet = PropertyState_DEFAULT_VALUE;
else if(eState < SFX_ITEM_DEFAULT)
@@ -308,7 +308,7 @@ PropertyState SfxItemPropertySet::getPropertyState(const OUString& rName, cons
{
PropertyState eRet = PropertyState_DIRECT_VALUE;
- // which-id ermitteln
+ // Get WhichId
const SfxItemPropertySimpleEntry* pEntry = m_aMap.getByName( rName );
if( !pEntry || !pEntry->nWID )
{
@@ -316,9 +316,9 @@ PropertyState SfxItemPropertySet::getPropertyState(const OUString& rName, cons
}
sal_uInt16 nWhich = pEntry->nWID;
- // get item state
+ // Get item state
SfxItemState eState = rSet.GetItemState(nWhich, false);
- // item-Wert als UnoAny zurueckgeben
+ // Return item value as UnoAny
if(eState == SFX_ITEM_DEFAULT)
eRet = PropertyState_DEFAULT_VALUE;
else if(eState < SFX_ITEM_DEFAULT)
diff --git a/svl/source/items/macitem.cxx b/svl/source/items/macitem.cxx
index b37a1853f0c6..ca0eb4205d47 100644
--- a/svl/source/items/macitem.cxx
+++ b/svl/source/items/macitem.cxx
@@ -75,11 +75,11 @@ SvxMacroTableDtor& SvxMacroTableDtor::operator=( const SvxMacroTableDtor& rTbl )
int SvxMacroTableDtor::operator==( const SvxMacroTableDtor& rOther ) const
{
- // Anzahl unterschiedlich => auf jeden Fall ungleich
+ // Count different => odd in any case
if ( aSvxMacroTable.size() != rOther.aSvxMacroTable.size() )
return sal_False;
- // einzeln verleichen; wegen Performance ist die Reihenfolge wichtig
+ // Compare single ones; the sequence matters due to performance reasons
SvxMacroTable::const_iterator it1 = aSvxMacroTable.begin();
SvxMacroTable::const_iterator it2 = rOther.aSvxMacroTable.begin();
for ( ; it1 != aSvxMacroTable.end(); ++it1, ++it2 )
diff --git a/svl/source/items/poolcach.cxx b/svl/source/items/poolcach.cxx
index 23010ae03d6c..3a383e781e8d 100644
--- a/svl/source/items/poolcach.cxx
+++ b/svl/source/items/poolcach.cxx
@@ -31,7 +31,7 @@ SfxItemPoolCache::SfxItemPoolCache( SfxItemPool *pItemPool,
pSetToPut( 0 ),
pItemToPut( &pItemPool->Put(*pPutItem) )
{
- DBG_ASSERT(pItemPool, "kein Pool angegeben");
+ DBG_ASSERT(pItemPool, "No Pool provided");
}
@@ -42,7 +42,7 @@ SfxItemPoolCache::SfxItemPoolCache( SfxItemPool *pItemPool,
pSetToPut( pPutSet ),
pItemToPut( 0 )
{
- DBG_ASSERT(pItemPool, "kein Pool angegeben");
+ DBG_ASSERT(pItemPool, "No Pool provided");
}
@@ -71,18 +71,18 @@ const SfxSetItem& SfxItemPoolCache::ApplyTo( const SfxSetItem &rOrigItem, bool b
SfxItemModifyImpl &rMapEntry = (*pCache)[nPos];
if ( rMapEntry.pOrigItem == &rOrigItem )
{
- // aendert sich ueberhaupt etwas?
+ // Did anything change at all?
if ( rMapEntry.pPoolItem != &rOrigItem )
{
- rMapEntry.pPoolItem->AddRef(2); // einen davon fuer den Cache
+ rMapEntry.pPoolItem->AddRef(2); // One for the cache
if ( bNew )
- pPool->Put( rOrigItem ); //! AddRef??
+ pPool->Put( rOrigItem ); //FIXME: AddRef?
}
return *rMapEntry.pPoolItem;
}
}
- // die neue Attributierung in einem neuen Set eintragen
+ // Insert the new attributes in a new Set
SfxSetItem *pNewItem = (SfxSetItem *)rOrigItem.Clone();
if ( pItemToPut )
{
@@ -93,15 +93,15 @@ const SfxSetItem& SfxItemPoolCache::ApplyTo( const SfxSetItem &rOrigItem, bool b
else
pNewItem->GetItemSet().Put( *pSetToPut );
const SfxSetItem* pNewPoolItem = (const SfxSetItem*) &pPool->Put( *pNewItem );
- DBG_ASSERT( pNewPoolItem != pNewItem, "Pool: rein == raus?" );
+ DBG_ASSERT( pNewPoolItem != pNewItem, "Pool: same in and out?" );
delete pNewItem;
- // Refernzzaehler anpassen, je einen davon fuer den Cache
+ // Adapt refcount; one each for the cache
pNewPoolItem->AddRef( pNewPoolItem != &rOrigItem ? 2 : 1 );
if ( bNew )
- pPool->Put( rOrigItem ); //! AddRef??
+ pPool->Put( rOrigItem ); //FIXME: AddRef?
- // die Transformation im Cache eintragen
+ // Add the transformation to the cache
SfxItemModifyImpl aModify;
aModify.pOrigItem = &rOrigItem;
aModify.pPoolItem = (SfxSetItem*) pNewPoolItem;
diff --git a/svl/source/items/poolitem.cxx b/svl/source/items/poolitem.cxx
index 22e57f39bb4a..e1c4b0f8f621 100644
--- a/svl/source/items/poolitem.cxx
+++ b/svl/source/items/poolitem.cxx
@@ -184,61 +184,54 @@ void SfxPoolItem::writeUnicodeString(SvStream & rStream, const OUString& rString
rStream.WriteUniOrByteString(rString, RTL_TEXTENCODING_UCS2);
}
-
+/**
+ * This virtual method allows to get a textual representation of the value
+ * for the SfxPoolItem subclasses. It should be overloaded by all UI-relevant
+ * SfxPoolItem subclasses.
+ *
+ * Because the unit of measure of the value in the SfxItemPool is only
+ * queryable via @see SfxItemPool::GetMetric(sal_uInt16) const (and not
+ * via the SfxPoolItem instance or subclass, the own unit of measure is
+ * passed to 'eCoreMetric'.
+ *
+ * The corresponding unit of measure is passed as 'ePresentationMetric'.
+ *
+ *
+ * @return SfxItemPresentation SFX_ITEM_PRESENTATION_NONE
+ * A textual representation could not be
+ * created
+ *
+ * SFX_ITEM_PRESENTATION_NAMELESS
+ * A textual representation (if applicable
+ * with a unit of measure) could be created,
+ * but it doesn't contain any semantic meaning
+ *
+ * SFX_ITEM_PRESENTATION_COMPLETE
+ * A complete textual representation could be
+ * created with semantic meaning (if applicable
+ * with unit of measure)
+ *
+ * Example:
+ *
+ * pSvxFontItem->GetPresentation( SFX_PRESENTATION_NAMELESS, ... )
+ * "12pt" with return SFX_ITEM_PRESENTATION_NAMELESS
+ *
+ * pSvxColorItem->GetPresentation( SFX_PRESENTATION_COMPLETE, ... )
+ * "red" with return SFX_ITEM_PRESENTATION_NAMELESS
+ * Because the SvxColorItem does not know which color it represents
+ * it cannot provide a name, which is communicated by the return value
+ *
+ * pSvxBorderItem->GetPresentation( SFX_PRESENTATION_COMPLETE, ... )
+ * "1cm top border, 2cm left border, 0.2cm bottom border, ..."
+ */
SfxItemPresentation SfxPoolItem::GetPresentation
(
- SfxItemPresentation /*ePresentation*/, // IN: wie formatiert werden soll
- SfxMapUnit /*eCoreMetric*/, // IN: Ma\seinheit des SfxPoolItems
- SfxMapUnit /*ePresentationMetric*/, // IN: Wunsch-Ma\einheit der Darstellung
- OUString& /*rText*/, // OUT: textuelle Darstellung
+ SfxItemPresentation /*ePresentation*/, // IN: how we should format
+ SfxMapUnit /*eCoreMetric*/, // IN: current metric of the SfxPoolItems
+ SfxMapUnit /*ePresentationMetric*/, // IN: target metric of the presentation
+ OUString& /*rText*/, // OUT: textual representation
const IntlWrapper *
) const
-
-/* [Beschreibung]
-
- "Uber diese virtuelle Methode kann von den SfxPoolItem-Subklassen
- eine textuelle Datstellung des Wertes erhalten werden. Sie sollte
- von allen UI-relevanten SfxPoolItem-Subklassen "uberladen werden.
-
- Da die Ma\seinheit des Wertes im SfxItemPool nur "uber
- <SfxItemPool::GetMetric(sal_uInt16)const> erfragbar ist, und nicht etwa
- in der SfxPoolItem-Instanz oder -Subklasse verf"ugbar ist, wird die
- eigene Ma\seinheit als 'eCoreMetric' "ubergeben.
-
- Die darzustellende Ma\seinheit wird als 'ePresentationMetric'
- "ubergeben.
-
-
- [R"uckgabewert]
-
- SfxItemPresentation SFX_ITEM_PRESENTATION_NONE
- es konnte keine Text-Darstellung erzeugt werden
-
- SFX_ITEM_PRESENTATION_NAMELESS
- es konnte eine Text-Darstellung (ggf. mit
- Ma\seinheit) erzeugt werden, die jedoch keine
- semantische Bedeutung enth"alt
-
- SFX_ITEM_PRESENTATION_COMPLETE
- es konnte eine komplette Text-Darstellung mit
- semantischer Bedeutung (und ggf. Ma\seinheit)
- erzeugt werden
-
-
- [Beispiele]
-
- pSvxFontItem->GetPresentation( SFX_PRESENTATION_NAMELESS, ... )
- "12pt" mit return SFX_ITEM_PRESENTATION_NAMELESS
-
- pSvxColorItem->GetPresentation( SFX_PRESENTATION_COMPLETE, ... )
- "rot" mit return SFX_ITEM_PRESENTATION_NAMELESS
- (das das SvxColorItem nicht wei\s, was f"ur eine Farbe es darstellt,
- kann es keinen Namen angeben, was durch den Returnwert mitgeteilt wird.
-
- pSvxBorderItem->GetPresentation( SFX_PRESENTATION_COMPLETE, ... )
- "1cm oberer Rand, 2cm linker Rand, 0,2cm unterer Rand, ..."
-*/
-
{
return SFX_ITEM_PRESENTATION_NONE;
}
diff --git a/svl/source/items/slstitm.cxx b/svl/source/items/slstitm.cxx
index c4ed1d9fce92..2b875f8db728 100644
--- a/svl/source/items/slstitm.cxx
+++ b/svl/source/items/slstitm.cxx
@@ -55,8 +55,8 @@ SfxStringListItem::SfxStringListItem( sal_uInt16 which, const std::vector<OUStri
SfxPoolItem( which ),
pImp(NULL)
{
- // PB: das Putten einer leeren Liste funktionierte nicht,
- // deshalb habe ich hier die Abfrage nach dem Count auskommentiert
+ // FIXME: Putting an empty list does not work
+ // Therefore the query after the count is commented out
if( pList /*!!! && pList->Count() */ )
{
pImp = new SfxImpStringList;
@@ -259,7 +259,7 @@ void SfxStringListItem::SetStringList( const com::sun::star::uno::Sequence< OUSt
if (pImp)
{
- // String gehoert der Liste
+ // String belongs to the list
for ( sal_Int32 n = 0; n < rList.getLength(); n++ )
pImp->aList.push_back(rList[n]);
}
diff --git a/svl/source/items/stylepool.cxx b/svl/source/items/stylepool.cxx
index b3d7b8537915..88f449d52a0f 100644
--- a/svl/source/items/stylepool.cxx
+++ b/svl/source/items/stylepool.cxx
@@ -32,10 +32,11 @@
using namespace boost;
namespace {
- // A "Node" represents a subset of inserted SfxItemSets
- // The root node represents the empty set
- // The other nodes contain a SfxPoolItem and represents an item set which contains their
- // pool item and the pool items of their parents.
+ /** A "Node" represents a subset of inserted SfxItemSets
+ * The root node represents the empty set
+ * The other nodes contain a SfxPoolItem and represents an item set which contains their
+ * pool item and the pool items of their parents.
+ */
class Node
{
std::vector<Node*> mChildren; // child nodes, create by findChildNode(..)
@@ -148,22 +149,23 @@ namespace {
return pNextNode;
}
- /* Find the next node which has a SfxItemSet.
- The input parameter pLast has a sophisticated meaning:
- downstairs only:
- pLast == 0 => scan your children and their children
- but neither your parents neither your siblings
- downstairs and upstairs:
- pLast == this => scan your children, their children,
- the children of your parent behind you, and so on
- partial downstairs and upstairs
- pLast != 0 && pLast != this => scan your children behind the given children,
- the children of your parent behind you and so on.
-
- OD 2008-03-11 #i86923#
- introduce parameters <bSkipUnusedItemSets> and <bSkipIgnorable>
- and its handling.
- */
+ /**
+ * Find the next node which has a SfxItemSet.
+ * The input parameter pLast has a sophisticated meaning:
+ * downstairs only:
+ * pLast == 0 => scan your children and their children
+ * but neither your parents neither your siblings
+ * downstairs and upstairs:
+ * pLast == this => scan your children, their children,
+ * the children of your parent behind you, and so on
+ * partial downstairs and upstairs
+ * pLast != 0 && pLast != this => scan your children behind the given children,
+ * the children of your parent behind you and so on.
+ *
+ * OD 2008-03-11 #i86923#
+ * introduce parameters <bSkipUnusedItemSets> and <bSkipIgnorable>
+ * and its handling.
+ */
Node* Node::nextItemSet( Node* pLast,
const bool bSkipUnusedItemSets,
const bool bSkipIgnorable )
@@ -343,19 +345,21 @@ namespace {
}
-/* This static method creates a unique name from a shared pointer to a SfxItemSet
- The name is the memory address of the SfxItemSet itself. */
-
+/**
+ * This static method creates a unique name from a shared pointer to a SfxItemSet
+ * The name is the memory address of the SfxItemSet itself.
+ */
OUString StylePool::nameOf( SfxItemSet_Pointer_t pSet )
{
return OUString::number( reinterpret_cast<sal_IntPtr>( pSet.get() ), 16 );
}
-// class StylePoolImpl organized a tree-structure where every node represents a SfxItemSet.
-// The insertItemSet method adds a SfxItemSet into the tree if necessary and returns a shared_ptr
-// to a copy of the SfxItemSet.
-// The aRoot-Node represents an empty SfxItemSet.
-
+/**
+ * class StylePoolImpl organized a tree-structure where every node represents a SfxItemSet.
+ * The insertItemSet method adds a SfxItemSet into the tree if necessary and returns a shared_ptr
+ * to a copy of the SfxItemSet.
+ * The aRoot-Node represents an empty SfxItemSet.
+ */
class StylePoolImpl
{
private: